[osg-users] osg newbie question: billboard with multiple drawables?

41 views
Skip to first unread message

paul graham

unread,
Sep 28, 2010, 6:03:09 AM9/28/10
to osg-...@lists.openscenegraph.org
Hi, I'm hoping someone can help. I'm trying to develop an in-scene 'label' for my 3D objects (consisting of text and geometry). I was hoping I'd be able to use the osg billboard and add my geometry and text to it as drawables, but I now realise that each drawable will have its own pivot point, so my text and geometry will become misaligned.

Is there a way to massage the billboard such that it 'groups' all its children and effectively applies a single transformation about a single pivot point (hence keeping the text and geometry in the same plane)? Or can anyone suggest a simpler / better approach to the problem?

Just to reiterate - I'm trying to create screen-facing labels to insert into my 3D scene - the label needs to support text and geometry. Any advice on how to best approach this is much appreciated - I'm hoping someone has tackled a similar problem in the past.

Many thanks

Paul

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32125#32125

_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Robert Osfield

unread,
Sep 28, 2010, 8:53:00 AM9/28/10
to osg-...@lists.openscenegraph.org
Hi Paul,

The easiest way to do it is use an osg::AutoTransform, this is like a
Billboard but can rotate to screen a whole subgraph rather than just
drawables. Billboard is lightweight for things like trees, but
AutoTransform is more flexible.

Robert.

paul graham

unread,
Sep 28, 2010, 10:13:28 AM9/28/10
to osg-...@lists.openscenegraph.org
Hi Robert, many thanks for the prompt reply - I've been playing around with the autotransform and you're right - it is much more suited to our needs than the billboard.

Thanks again

Paul

------------------
Read this topic online here:

http://forum.openscenegraph.org/viewtopic.php?p=32133#32133

paul graham

unread,
Sep 28, 2010, 11:10:29 AM9/28/10
to osg-...@lists.openscenegraph.org
Hi, on the subject of the autotransform: in scale_to_screen mode, I was trying to use minScale and maxScale to effectively bound the drawn screen size of my geode between a minimum and maximum, but I think I'm mis-interpreting these parameters.

Increasing maxScale does not appear to increase the maximum drawn size of my geode, and setting minScale doesn't seem to permit me to define a minimum drawn size? I've had a look at the AutoTransform code and I can see that the application of these scale settings are affected by the transition width, but it's not clear to me how they are connected?

If anyone can clarify for me, the relationship between transition width, minScale and maxScale and whether or not these could be used to define a minimum and maximum drawn size of a geode, I'd really appreciate it.

Many thanks in advance.

Paul

------------------
Read this topic online here:

http://forum.openscenegraph.org/viewtopic.php?p=32137#32137

Reply all
Reply to author
Forward
0 new messages