I have a scene setup problem that I am sure is easy to solve with OSG
if someone could help me properly understand the use of node masks.
Consider this scene:
Root
/\
/ \
______/ \______
/ \
DecorateGroup RenderGroup
\ |
\ /\
\ ___/ \____
\ / \
\___ PAT Subgraph with more objects
/\
/ \
GeodeA GeodeB
I have a group of objects that I want to render, all children of the
RenderGroup. Some of these objects I want to decorate by drawing the
same geometry with a different stateset that enables cartoon outlines
when I pick it. Now I want to add a subgraph to this decoration, but
I only want to allow some of the nodes within the subgraph to be
affected by the stateset in DecorateGroup. For example, if I attach
PositionAttitudeTransform PAT to DecorateGroup, I only want GeodeA to
be decorated.
I think one way would be to protect attributes that are overridden by
the stateset in DecorateGroup, but I don't want to have to do that for
all objects that might be picked. I expect this can be done with node
masks, but I am not sure how to set up a node mask so that GeodeB is
drawn only once when RenderGroup is traversed and not drawn when
DecorateGroup is traversed.
I would be really grateful if someone could explain this to me.
Thanks!
Morne Pistorius
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org