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

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Thu May 21 01:11:59 PDT 2020


Thank you for your reply, Robert, but one of us is not understanding the 
other.

"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"

Actually, I have only one osg::Billboard (geodeHidreletrica) for hundreds 
of hydroelectric dam icons (thus hundreds of different names). Should I 
have hundreds of billboards? Hundreds of quads/geometries? I don't quite 
get how addDrawable copies the icons to different places using (what seems 
to be) a single osg::Geometry. In which object exactly should I put each 
different name?

Thanks again,
Rodrigo.

On Thursday, May 21, 2020 at 3:30:32 AM UTC-3, OpenSceneGraph Users wrote:
>
> 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.
>

-- 
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/2f1ac1bd-fc93-4001-89cc-039e4554324e%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200521/dd0a86b4/attachment.html>


More information about the osg-users mailing list