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

Tessier, Philip Philip.Tessier at ngc.com
Fri Jul 18 14:06:12 PDT 2008


Thank you both.

I'm representing a laser beam which is aiming at the camera.  As a preliminary processing step, I'm rendering an image at the laser generator which shows it's cross-section and grabbing that frame.  Specialized software then computes the "bloom" of that in the observer's eye.  So, this step is merely positioning the laser in the scene.  The algorithm that follows is intelligent about distributing the incoming energy across the pixels, but it needs at least one pixel to appear (to give it a starting point).

I've implemented Jean-Sébastien's last suggestion, "node->setCullingActive(false)" on the MatrixTransform whose child is the image, but with no noticeable change.  Does this setting affect a node's children as well?  I've checked my viewing frustrum, and zFar is set to 3.0*(the scene node's getBound()).

Phil

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: Friday, July 18, 2008 3:10 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Node needs to render at least one pixel

Hello Philip,

> I have thought of artificially moving it closer, or scaling it larger, 
> but I was wondering if there is, instead, some attribute I can give it 
> that says, "render me even if I'm small."

I imagine you mean that you don't want your node culled even if it's very small. You can turn off small feature culling for a camera:

   camera->setCullingMode(camera->getCullingMode() &
       ~osg::CullSettings::SMALL_FEATURE_CULLING);

Note that this will not change that it will be culled if it's outside the viewing frustum. It's possible to turn off all culling on a camera, but that would be a big no-no performance wise. You can also set a node not to be culled at all:

   node->setCullingActive(false);

But again, this is pretty bad and should only be done in desperate cases... What are you trying to achieve?

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



More information about the osg-users mailing list