[osg-users] Adding billboards with different names under the same geometry?

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Wed May 20 23:30:06 PDT 2020


If the approach is producing good enough performance then I'd stick with
it.  It's a long way from the most optimal way you could do this type of
task, but all the alternatives are more complicated and require deeper
understanding of OSG/OpenGL/shaders. I'll not attempt to make suggestions
as you should only ever make solutions more complicated if you really have
to.

As for giving the objects different names, all objects in the scene graph
support setName/getName, if you are reuse the same subgraph the node above
the reused part like the osg::Billboard is what is unique so put your
unique name on that nodes.  The intersection traversal will return the
whole NodePath to the intersected drawable so you just need to check the
NodePath to find all the associated names.

Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200521/07bed436/attachment.html>


More information about the osg-users mailing list