Re: [osg-users] ortho2D camera and frustum camera layering(render order)

2009-08-05 Thread Robert Osfield
Hi Michael,

If you want to have a series of layers of 2D and 3D content then you
simply set up you Camera's with an appropriate RenderOrder number, the
ordering goes :

PRE_RENDER, from negative to positive RenderOrder number
POST_RENDER, from negative to positive RenderOrder number

In your case you 2D background you'd probably just draw with a
PRE_RENDER, the 3D as defaults, and the 2D foreground as POST_RENDER.
The only other item you'd need to tweak is that the clear of the
colour buffer on the 3D and 2D foreground Camera's should be disabled.

Robert.

On Tue, Jul 28, 2009 at 7:43 PM, Michael Irby IImi...@wms.com wrote:
 Hi,

 Yes, I started with this example but it does not completely accomplish what I 
 need. I need more than a hud and there can be N amount of 2D and 3D cameras 
 in the graph. So for an example something like a 2D camera in front with 2D 
 content, then a 3D camera with 3D content and then another 2D camera behind 
 that with 2D content. There can be many layers of 2D and 3D geometry. And the 
 POST_RENDER I believe only serves for having a hud above 3D content. What I 
 am writing must support 2D and 3D graphics living together in the scene graph 
 and have a way to control the layering of the the different cameras. The 
 NESTED_RENDER for cameras seems like it would serve my purpose, but I think 
 that is only for slave cameras? It would be great to be able to have a nested 
 render on cameras in the graph and be able to give an order then render for 
 each camera should happen.

 Thank you!

 Cheers,
 Michael

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





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

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


Re: [osg-users] ortho2D camera and frustum camera layering(render order)

2009-07-28 Thread Michael Irby II
Hi,

Yes, I started with this example but it does not completely accomplish what I 
need. I need more than a hud and there can be N amount of 2D and 3D cameras in 
the graph. So for an example something like a 2D camera in front with 2D 
content, then a 3D camera with 3D content and then another 2D camera behind 
that with 2D content. There can be many layers of 2D and 3D geometry. And the 
POST_RENDER I believe only serves for having a hud above 3D content. What I am 
writing must support 2D and 3D graphics living together in the scene graph and 
have a way to control the layering of the the different cameras. The 
NESTED_RENDER for cameras seems like it would serve my purpose, but I think 
that is only for slave cameras? It would be great to be able to have a nested 
render on cameras in the graph and be able to give an order then render for 
each camera should happen.

Thank you!

Cheers,
Michael

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





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


[osg-users] ortho2D camera and frustum camera layering(render order)

2009-07-27 Thread Michael Irby II
Hi,

I have a 2D ortho camera that contains 2D geometry and a 3d frustum camera that 
contains all my 3d geometry. Is there any way for me to be able to layer the 
drawing order of these cameras. That is a quick way that does not require 
custom code. I know there are slave cameras and nested render but these camera 
are added to the root node of the scene graph and not as a slave camera to the 
view.

Thank you!

Cheers,
Michael

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





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


Re: [osg-users] ortho2D camera and frustum camera layering(render order)

2009-07-27 Thread Robert Osfield
Hi Michael,

Have a look at the osghud example as this illustrates exactly what you
are trying to achieve.  One of the keys to setting up the HUD camera
is to set it's RenderOrder to POST_RENDER.

Robert.

On Mon, Jul 27, 2009 at 8:09 PM, Michael Irby IImi...@wms.com wrote:
 Hi,

 I have a 2D ortho camera that contains 2D geometry and a 3d frustum camera 
 that contains all my 3d geometry. Is there any way for me to be able to layer 
 the drawing order of these cameras. That is a quick way that does not require 
 custom code. I know there are slave cameras and nested render but these 
 camera are added to the root node of the scene graph and not as a slave 
 camera to the view.

 Thank you!

 Cheers,
 Michael

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





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

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