[osg-users] Node needs to render at least one pixel

Tessier, Philip Philip.Tessier at ngc.com
Tue Jul 22 14:14:08 PDT 2008

Many thanks!

This will be my first AutoTransform (or first custom Transform with an accept()).  I'll need to know the distance from my image to the camera.  I'm thinking that the accept( NodeVisitor & nv) will call "computeLocalToWorldMatrix( an identity matrix, nv)" to get that.  Am I on the right track?


Philip A. Tessier
Northrop Grumman IT
Philip.Tessier at ngc.com
Cell 210-867-6775

-----Original Message-----
From: osg-users-bounces at lists.openscenegraph.org [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay
Sent: Tuesday, July 22, 2008 3:40 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Node needs to render at least one pixel

Hello Philip,

> As this iamge shrinks into the distance, it (still) becomes invisible.
> My coworker (who is knowledgeable of OpenGL, but not so much of OpenSceneGraph), suggests MIP-mapping.  I can move to that, it that's the next step.

I don't think mipmapping will solve the problem, because that just changes how the texture is filtered when it is minified and magnified. 
If the quad covers 0 pixels, the filtering of the texture on the quad doesn't really matter, the quad still won't be visible.

I really don't know what to suggest as your usage is pretty uncommon... 
You could try using an osg::AutoTransform to keep the quad the same size (in image space) independently of its distance from the viewer. Not sure if that's what you want. Otherwise, attach a callback to the transform above your quad, which would change the transform's scale when the distance from the viewpoint gets larger than some threshold.

Sorry I can't help more.

Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com
                         http://whitestar02.webhop.org/ _______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org

More information about the osg-users mailing list