Thank you, Robert. That worked well. Phil
Philip A. Tessier Northrop Grumman IT [EMAIL PROTECTED] Cell 210-867-6775 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Wednesday, July 23, 2008 3:46 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Node needs to render at least one pixel Hi Phil, For the distance from the eye point/view Try: NodeVisitor::getDistanceEyePoint(Vec3) NodeVisitor::getDistanceToViewPoint(Vec3) ViewPoint and EyePoint are usually co-incident, but in some effects like shadows the eye point could be a false one i.e. local to the shadow, rather than the main cameras eye point (which is the viewpoint). Robert. On Tue, Jul 22, 2008 at 10:14 PM, Tessier, Philip <[EMAIL PROTECTED]> wrote: > 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? > > Thanks, > Phil > > Philip A. Tessier > Northrop Grumman IT > [EMAIL PROTECTED] > Cell 210-867-6775 > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] 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. > > J-S > -- > ______________________________________________________ > Jean-Sebastien Guay [EMAIL PROTECTED] > http://www.cm-labs.com/ > http://whitestar02.webhop.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 > _______________________________________________ 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