[osg-users] Regarding Culling in osg

2017-04-22 Thread Rambabu Repaka
Hi,Can anyone tell me is there any example code (i.e .cpp file )for 
Backfaceculling,face culling and frustum culling in osg.

Any Help is appreciated.

... 

Thank you!

Cheers,
Rambabu

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70803#70803





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] iOS build guide locked/checked out on osg website

2017-04-22 Thread Ulrich Hertlein
On 22/4/17 00:43, Thomas Hogarth wrote:
> Hi All
>
> Not sure who can do what about this. A little while back i was going to 
> update the build
guide for osg on iOS, but the document/article was checked out and locked by 
another user.
Since 2014 haha. Says it's been checked out by Ulrich Hertlein. If you're still 
around
could you unlock it?
Oops; damn that wiki has a good memory :-}
I'll unlock it.

Cheers,
/uli
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Vanishing letters in osg::Text

2017-04-22 Thread Tim Hartter
Hello everyone, I have a problem with osg::Text()

Some letters seem to vanish with depth (see picture) - the "h" in "This is a label.." is vanishing if the text is further away from the camera.

 

Do you have any idea what I'm doing wrong?

 

This is how I draw the text node: (the font does not matter by the way...)


		osg::ref_ptr pStateset(new osg::StateSet());
 
		pStateset->setMode(GL_LIGHTING,
			osg::StateAttribute::OFF |
			osg::StateAttribute::PROTECTED |
			osg::StateAttribute::OVERRIDE);
 
		pStateset->setMode(GL_BLEND, osg::StateAttribute::ON);
		pStateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
		pStateset->setRenderBinDetails(INT_MAX, "RenderBin", osg::StateSet::OVERRIDE_RENDERBIN_DETAILS);
 
		osg::ref_ptr pText( new osgText::Text );
		osg::ref_ptr pTextGeode ( new osg::Geode );
		pText->setFont(pFont);	
		pText->setText(Text.c_str());
		pText->setAutoRotateToScreen(true);
		pText->setDrawMode(osgText::Text::TEXT | osgText::Text::FILLEDBOUNDINGBOX);
		pText->setBoundingBoxMargin(FontSize * 0.1);
		pText->setFontResolution(96, 96);
		pText->setCharacterSize(FontSize);
		pText->setPosition(Position);
		pText->setColor(osg::Vec4d(1,0,0,1));
		pText->setStateSet(pStateset.get());
		pText->setUseDisplayList(false);
 
		pTextGeode->addDrawable(pText);
		pTextGeode->setStateSet(pStateset);
		return pTextGeode;


 

I'd be greatful for any help on the matter.

-Tim-

 ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Support for Windows Universal Platform

2017-04-22 Thread Philippe Renon
Hi,

Instead of using OSG_UWP directly to undef unsupported features, I would 
suggest to introduce a define per feature and have UWP turn off the unsupported 
feature one by one. This will make it more future proof and, who knows, might 
be helpful to others.

Philippe

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70806#70806





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] iOS build guide locked/checked out on osg website

2017-04-22 Thread Thomas Hogarth
I thought the name rang a bell,

Thanks for doing that, it's done the trick.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70807#70807





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Near-uniform tessellation of a concave polygon for heightmaps

2017-04-22 Thread Julien Valentin
Hi 
I think nobody respond because there multiple path for it
Your problem can be split in two:
1)tesselation
2)real (not screen space) displacement mapping 

1)Tesselation
-osgUtil::Tesselator 
-Tesselation Shader

2)Real Displacement mapping
For this step You must be sure of your level of understanding of OpenGL(and 
osg) because you'll have to use transformfeedback
Todo so you'll have to draw your vertices as points, displace them according 
your heightmap texture (in VS) and store them is a buffer for future use (in GS)
(The Transformfeedback spec says theres no garanty to indices stay the same but 
in practice i never saw mess in GS ouput sequence)

Cheers




Kanpachi wrote:
> I am given the contour/boundary of a concave polygon which cannot have holes, 
> and I need to apply a heightmap to it. To this end, I need to perform a 
> near-uniform tessellation of the polygon to generate a mesh.
> 
> A picture would be worth a thousand words here, but alas, I don't have 2 
> posts yet. :P
> 
> How can I perform this tessellation? Ideally, the solution could parameterize 
> the 'resolution' of the vertices to adjust the detail of the mesh.
> 
> If this is somehow possible using OSG's built-in tessellation library that 
> would be ideal, but I'm open to introducing an additional (hopefully 
> lightweight) dependency if necessary.
> 
> Thanks!


--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70808#70808





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Regarding Culling in osg

2017-04-22 Thread Julien Valentin
Hi,

Forum is plenty of information about osg culling
http://forum.openscenegraph.org/viewtopic.php?t=15959
http://forum.openscenegraph.org/viewtopic.php?t=16095

More generally, you can search the forum by yourself for the term 
"CullCallback" or "CullVisitor" or "CullFace"
And come back when your question is more precise

Cheers


Rambabu wrote:
> Hi,Can anyone tell me is there any example code (i.e .cpp file )for 
> Backfaceculling,face culling and frustum culling in osg.
> 
> Any Help is appreciated.
> 
> ... 
> 
> Thank you!
> 
> Cheers,
> Rambabu


--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70809#70809





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Vanishing letters in osg::Text

2017-04-22 Thread Julien Valentin
Hi
I'm not really an osg::Text master but my guess is the osg::Text is not mean to 
be used with a explicit transparent stateset.
You should try to modify the osgText example in order to diagnoze this and tell 
me if my guess is right.

Cheers


Tim Hartter wrote:
> Hello everyone, I have a problem with osg::Text()
> Some letters seem to vanish with depth (see picture) - the "h" in "This is a 
> label.." is vanishing if the text is further away from the camera.
> 
> Do you have any idea what I'm doing wrong?
> 
> This is how I draw the text node: (the font does not matter by the way...)
> 
> > osg::ref_ptr�pStateset(new�osg::StateSet());
> > 
> > pStateset->setMode(GL_LIGHTING,
> > osg::StateAttribute::OFF�|
> > osg::StateAttribute::PROTECTED�|
> > osg::StateAttribute::OVERRIDE);
> > 
> > pStateset->setMode(GL_BLEND,�osg::StateAttribute::ON);
> > pStateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
> > 
> > pStateset->setRenderBinDetails(INT_MAX,�"RenderBin",�osg::StateSet::OVERRIDE_RENDERBIN_DETAILS);
> > 
> > osg::ref_ptr�pText(�new�osgText::Text�);
> > osg::ref_ptr�pTextGeode�(�new�osg::Geode�);
> > pText->setFont(pFont);  
> > pText->setText(Text.c_str());
> > pText->setAutoRotateToScreen(true);
> > 
> > pText->setDrawMode(osgText::Text::TEXT�|�osgText::Text::FILLEDBOUNDINGBOX);
> > pText->setBoundingBoxMargin(FontSize�*�0.1);
> > pText->setFontResolution(96,�96);
> > pText->setCharacterSize(FontSize);
> > pText->setPosition(Position);
> > pText->setColor(osg::Vec4d(1,0,0,1));
> > pText->setStateSet(pStateset.get());
> > pText->setUseDisplayList(false);
> > 
> > pTextGeode->addDrawable(pText);
> > pTextGeode->setStateSet(pStateset);
> > return�pTextGeode;
>  
> 
> I'd be greatful for any help on the matter.
> -Tim-
> 
>  --
> Post generated by Mail2Forum


--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70810#70810





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Vanishing letters in osg::Text

2017-04-22 Thread Robert Osfield
Hi TIm,

It's to know what might be wrong from the description, my best guess
is that it might be some depth buffer resolution issue. Could it be
the filled bounding box that is t fault? Try not enabling this and see
what happens.

Robert.

On 22 April 2017 at 11:18, Tim Hartter  wrote:
> Hello everyone, I have a problem with osg::Text()
> Some letters seem to vanish with depth (see picture) - the "h" in "This is a
> label.." is vanishing if the text is further away from the camera.
>
> Do you have any idea what I'm doing wrong?
>
> This is how I draw the text node: (the font does not matter by the way...)
>
>   osg::ref_ptr pStateset(new osg::StateSet());
>
>   pStateset->setMode(GL_LIGHTING,
>   osg::StateAttribute::OFF |
>   osg::StateAttribute::PROTECTED |
>   osg::StateAttribute::OVERRIDE);
>
>   pStateset->setMode(GL_BLEND, osg::StateAttribute::ON);
>   pStateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
>   pStateset->setRenderBinDetails(INT_MAX, "RenderBin",
> osg::StateSet::OVERRIDE_RENDERBIN_DETAILS);
>
>   osg::ref_ptr pText( new osgText::Text );
>   osg::ref_ptr pTextGeode ( new osg::Geode );
>   pText->setFont(pFont);  
>   pText->setText(Text.c_str());
>   pText->setAutoRotateToScreen(true);
>   pText->setDrawMode(osgText::Text::TEXT |
> osgText::Text::FILLEDBOUNDINGBOX);
>   pText->setBoundingBoxMargin(FontSize * 0.1);
>   pText->setFontResolution(96, 96);
>   pText->setCharacterSize(FontSize);
>   pText->setPosition(Position);
>   pText->setColor(osg::Vec4d(1,0,0,1));
>   pText->setStateSet(pStateset.get());
>   pText->setUseDisplayList(false);
>
>   pTextGeode->addDrawable(pText);
>   pTextGeode->setStateSet(pStateset);
>   return pTextGeode;
>
>
> I'd be greatful for any help on the matter.
> -Tim-
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Vanishing letters in osg::Text

2017-04-22 Thread Tim Hartter

Hi Robert,

I have been playing around with different settings. Changing the bounding 
box did not solve the problem.


Strangely setting a style with depth 0.1 solves the problem if I connect 
via Remote Desktop. Not assigning any font solves tge problem completely - 
the text is just not pretty anymore.


Can you tell me if you are using any special fallback settings in case no 
font is assigned to osg::text?


Tim




Mit AquaMail Android
http://www.aqua-mail.com gesendet


Am 22. April 2017 7:25:33 nachm. schrieb Robert Osfield 
:



Hi TIm,

It's to know what might be wrong from the description, my best guess
is that it might be some depth buffer resolution issue. Could it be
the filled bounding box that is t fault? Try not enabling this and see
what happens.

Robert.

On 22 April 2017 at 11:18, Tim Hartter  wrote:

Hello everyone, I have a problem with osg::Text()
Some letters seem to vanish with depth (see picture) - the "h" in "This is a
label.." is vanishing if the text is further away from the camera.

Do you have any idea what I'm doing wrong?

This is how I draw the text node: (the font does not matter by the way...)

osg::ref_ptr pStateset(new osg::StateSet());

pStateset->setMode(GL_LIGHTING,
osg::StateAttribute::OFF |
osg::StateAttribute::PROTECTED |
osg::StateAttribute::OVERRIDE);

pStateset->setMode(GL_BLEND, osg::StateAttribute::ON);
pStateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
pStateset->setRenderBinDetails(INT_MAX, "RenderBin",
osg::StateSet::OVERRIDE_RENDERBIN_DETAILS);

osg::ref_ptr pText( new osgText::Text );
osg::ref_ptr pTextGeode ( new osg::Geode );
pText->setFont(pFont);   
pText->setText(Text.c_str());
pText->setAutoRotateToScreen(true);
pText->setDrawMode(osgText::Text::TEXT |
osgText::Text::FILLEDBOUNDINGBOX);
pText->setBoundingBoxMargin(FontSize * 0.1);
pText->setFontResolution(96, 96);
pText->setCharacterSize(FontSize);
pText->setPosition(Position);
pText->setColor(osg::Vec4d(1,0,0,1));
pText->setStateSet(pStateset.get());
pText->setUseDisplayList(false);

pTextGeode->addDrawable(pText);
pTextGeode->setStateSet(pStateset);
return pTextGeode;


I'd be greatful for any help on the matter.
-Tim-


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Near-uniform tessellation of a concave polygon for heightmaps

2017-04-22 Thread Julien Valentin

mp3butcher wrote:
> Hi 
> I think nobody respond because there multiple path for it
> Your problem can be split in two:
> 1)tesselation
> 2)real (not screen space) displacement mapping 
> 
> 1)Tesselation
> -osgUtil::Tesselator 
> -Tesselation Shader
> 
> 2)Real Displacement mapping
> For this step You must be sure of your level of understanding of OpenGL(and 
> osg) because you'll have to use transformfeedback
> Todo so you'll have to draw your vertices as points, displace them according 
> your heightmap texture (in VS) and store them in a buffer for future use (in 
> GS)
> (The Transformfeedback spec says theres no garanty that indices remain the 
> same but in practice i never saw mess in GS output sequence)
> 
> Cheers
> 
> 
> 
> 
> Kanpachi wrote:
> > I am given the contour/boundary of a concave polygon which cannot have 
> > holes, and I need to apply a heightmap to it. To this end, I need to 
> > perform a near-uniform tessellation of the polygon to generate a mesh.
> > 
> > A picture would be worth a thousand words here, but alas, I don't have 2 
> > posts yet. :P
> > 
> > How can I perform this tessellation? Ideally, the solution could 
> > parameterize the 'resolution' of the vertices to adjust the detail of the 
> > mesh.
> > 
> > If this is somehow possible using OSG's built-in tessellation library that 
> > would be ideal, but I'm open to introducing an additional (hopefully 
> > lightweight) dependency if necessary.
> > 
> > Thanks!
> 


--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70812#70812





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org