[osg-users] Trying to add an osg::CameraNode to a node

Robert Osfield robert.osfield at gmail.com
Mon Jul 23 01:34:35 PDT 2007


HI Brian,

On 7/23/07, Brian <bpdavis at knology.net> wrote:
> Yes, I realize that the description is a bit confusing.  Let me try again.
>
> First off, I'm unfortunately not in a position to migrate to version 2 yet.
> We have a deadline for the end of August, and we don't believe that we would
> be able to do a port between now and then.

2.0 really isn't that much different than 1.2, its still fundamentally
the same scene graph all the main nodes and API are the same save a
few corrections.  If you still use osgProducer than its still
available and works fine with 2.x.


> As for the RTT question, I'm looking at possibly having to RTT camera nodes.
>  One would be for the 3D scene and the other would be used to render a
>  two-dimensional HUD.  The HUD's camera node subtree would consist of a
>  single drawable that would be responsible for rendering the HUD's 2D
>  symbology.
>
>  I've gotten the 3D camera node to work perfectly, but I am unsure as to
>  whether the second camera node is a good solution for rendering a HUD to
>  ultimately use as an overlay.  I haven't done anything like this before,
> and
>  a camera node was the first thing that came to mind as a potential
> solution.
>  As I think about it, it really doesn't matter whether the 2D camera node is
>  added to the cockpit or not, and it may be better to have it directly
>  attached to the main scene node.
>
>  This might be an easier explanation of what I'm looking to do.  I've looked
>  at some of the osg examples that render a HUD (osgdelaunay comes to mind.)
>  However, the ones that I've looked at render directly to the display.  What
>  I need is a way to render that same type of HUD to a texture that could
> then
>  be applied to a 3D quad.

A 2D hud really is little different than a 2D scene.  As far as the
OSG and OpenGL concerned they area actually all 3D, just using an
orthographic projection.  There "should" be no issue with having 2D
scenes rendering into a texture using a RTT Camera, however, I haven't
tried this myself.

Robert.


More information about the osg-users mailing list