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

Jean-Sébastien Guay jean-sebastien.guay at cm-labs.com
Fri Jul 18 17:05:01 PDT 2008

Hello Philip,

> 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()).

Well, culling tests each node's bounding sphere. In the case of a group 
(or subclass), the bounding sphere contains the bounding spheres of the 
children. If a given node is not culled, then the children's bounding 
spheres are tested. If the node is culled, then its children are also 
culled (since their bounds were included in their parent's bound).

So if your laser is a group, you would need to setCullingActive(false) 
on the children too. Then, I don't know when the drawables are checked 
for culling too (they are culled with a bounding box). You might have to 
set a CullCallback on the Drawables that just returns false all the time.

Then again, I'm not quite sure that's your problem. If you say you're 
rendering a line, then because of sampling, even if the line is not 
culled it might not render onto any pixels. Not quite sure how I'd fix 
that. Perhaps unprojecting the line's endpoints so they're in screen 
space and then drawing a line in screen space would work?

Hope that gives you something to go with...

Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com

More information about the osg-users mailing list