Re: [osg-users] How to render last with multiple cameras

2010-01-07 Thread Mike Greene
I think I wasn't clear on my question: The HUD works fine, as does the 
other regular 3D camera (behind the HUD). What I'd like to be able to do 
is have some items in the background camera appear on top of the HUD 
while others remain behind it. I thought I could use renderbins, but 
since the HUD and the 3D cameras are separate, that doesn't seem to be 
working.


Mike Greene




010/1/6 Mike Greene mgre...@hiwaay.net mailto:mgre...@hiwaay.net

I have a view with two cameras - a HUD camera and a regular 3D
perspective camera. I have my scene set up so that I can vary the
alpha of the HUD (drawn with a polygon) so that I can see the 3D
view behind at various intensities. What I would like to be able
to do is have some of the 3D components drawn at full brightness
while the HUD is also fully opaque. I tried using renderbins, but
I think the problem is that the HUD and the 3D items are seen with
different cameras. Is there a way to accomplish this?


The important calls for setting up a hud camera are:

  camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
  camera-setClearMask(GL_DEPTH_BUFFER_BIT);
  camera-setRenderOrder(osg::Camera::POST_RENDER);
  camera-setViewport(x, y, w, h);

And maybe also:
  camera-setAllowEventFocus(false);

If that doesn't resolve it, you'll need to post some code and a 
screenshot.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to render last with multiple cameras

2010-01-06 Thread Mike Greene
I have a view with two cameras - a HUD camera and a regular 3D 
perspective camera. I have my scene set up so that I can vary the alpha 
of the HUD (drawn with a polygon) so that I can see the 3D view behind 
at various intensities. What I would like to be able to do is have some 
of the 3D components drawn at full brightness while the HUD is also 
fully opaque. I tried using renderbins, but I think the problem is that 
the HUD and the 3D items are seen with different cameras. Is there a way 
to accomplish this?


Mike Greene
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to render last with multiple cameras

2010-01-06 Thread Simon Hammett
2010/1/6 Mike Greene mgre...@hiwaay.net

I have a view with two cameras - a HUD camera and a regular 3D perspective
 camera. I have my scene set up so that I can vary the alpha of the HUD
 (drawn with a polygon) so that I can see the 3D view behind at various
 intensities. What I would like to be able to do is have some of the 3D
 components drawn at full brightness while the HUD is also fully opaque. I
 tried using renderbins, but I think the problem is that the HUD and the 3D
 items are seen with different cameras. Is there a way to accomplish this?


The important calls for setting up a hud camera are:

  camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
  camera-setClearMask(GL_DEPTH_BUFFER_BIT);
  camera-setRenderOrder(osg::Camera::POST_RENDER);
  camera-setViewport(x, y, w, h);

And maybe also:
  camera-setAllowEventFocus(false);

If that doesn't resolve it, you'll need to post some code and a screenshot.

-- 
http://www.ssTk.co.uk
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org