Re: [osg-users] Why am I getting this bleed through effect when moving my camera around?

2013-01-20 Thread Robert Osfield
Hi Preet,

This look to be an issue of depth precision, the usual way one tackles
this problem of rendering two flat objects on top of each other is to
use osg::PolygonOffset (see OpenGL docs on glPolygonOffset).

Robert.

On 20 January 2013 05:42, Preet prismatic.proj...@gmail.com wrote:
 I have two geometries close together -- one is an osgText object and the
 other is just a simple set of planar triangles laying flat behind the text.
 The two are separated by a small distance. Both objects are parented with an
 AutoTransform.

 When I move my camera around in a certain way, the object behind the text
 bleeds through it. When the camera is not being moved, both objects appear
 fine. I made a small video because I had trouble capturing the issue with a
 screenshot. In the video, the text is purple. The object in question is the
 black rectangle with the purple border behind the text.

 http://www.youtube.com/watch?v=htj168dJHGw

 When I move the camera relatively fast, you can see the black rectangle's
 triangles bleed through the text momentarily.

 I tried messing around with the placement of the objects; I even tried to
 increase the distance between the text and the geometry behind it a
 substantial amount but this didn't seem to have an effect. Both objects are
 in the same render bin.

 I've never really seen something like this happen before where the effect is
 only present *while* the scene is moving around. If I move the camera around
 slow enough or keep it still, the effect isn't visible.

 Does anyone have any ideas as to what the issue is here?


 Preet

 ___
 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] Why am I getting this bleed through effect when moving my camera around?

2013-01-19 Thread Preet
I have two geometries close together -- one is an osgText object and the
other is just a simple set of planar triangles laying flat behind the text.
The two are separated by a small distance. Both objects are parented with
an AutoTransform.

When I move my camera around in a certain way, the object behind the text
bleeds through it. When the camera is not being moved, both objects appear
fine. I made a small video because I had trouble capturing the issue with a
screenshot. In the video, the text is purple. The object in question is the
black rectangle with the purple border behind the text.

http://www.youtube.com/watch?v=htj168dJHGw

When I move the camera relatively fast, you can see the black rectangle's
triangles bleed through the text momentarily.

I tried messing around with the placement of the objects; I even tried to
increase the distance between the text and the geometry behind it a
substantial amount but this didn't seem to have an effect. Both objects are
in the same render bin.

I've never really seen something like this happen before where the effect
is only present *while* the scene is moving around. If I move the camera
around slow enough or keep it still, the effect isn't visible.

Does anyone have any ideas as to what the issue is here?


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


Re: [osg-users] Why am I getting this bleed through effect when moving my camera around?

2013-01-19 Thread Preet
Nevermind -- it turns out my idea of a 'substantial' amount of distance
wasn't enough.


On Sun, Jan 20, 2013 at 12:42 AM, Preet prismatic.proj...@gmail.com wrote:

 I have two geometries close together -- one is an osgText object and the
 other is just a simple set of planar triangles laying flat behind the text.
 The two are separated by a small distance. Both objects are parented with
 an AutoTransform.

 When I move my camera around in a certain way, the object behind the text
 bleeds through it. When the camera is not being moved, both objects appear
 fine. I made a small video because I had trouble capturing the issue with a
 screenshot. In the video, the text is purple. The object in question is the
 black rectangle with the purple border behind the text.

 http://www.youtube.com/watch?v=htj168dJHGw

 When I move the camera relatively fast, you can see the black rectangle's
 triangles bleed through the text momentarily.

 I tried messing around with the placement of the objects; I even tried to
 increase the distance between the text and the geometry behind it a
 substantial amount but this didn't seem to have an effect. Both objects are
 in the same render bin.

 I've never really seen something like this happen before where the effect
 is only present *while* the scene is moving around. If I move the camera
 around slow enough or keep it still, the effect isn't visible.

 Does anyone have any ideas as to what the issue is here?


 Preet

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