[osg-users] Help: is prerender camera regarded as slave camera during rendering traversal?

6 views
Skip to first unread message

wang shuiying

unread,
Aug 30, 2012, 5:22:36 PM8/30/12
to osg-...@lists.openscenegraph.org
Hello everyone,

I would like to know where the prerender camera is rendered in OSG.

Is prerender camera regarded as slave camera during rendering traversal
of viewer?

Is there a way to directly render a prerender camera at any time I want
? That is, not at a tempo of 60 Frame per second.


Thank you in advance!

Best regards

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

Robert Osfield

unread,
Aug 31, 2012, 3:27:39 AM8/31/12
to OpenSceneGraph Users
Hi Shuiying,

On 30 August 2012 22:22, wang shuiying <shuiyi...@fu-berlin.de> wrote:
> Hello everyone,
>
> I would like to know where the prerender camera is rendered in OSG.

All Camera in the OSG can prerender, it's just a case of setting the
Camera::RenderOrder parameter to tell the rendering backend which
cameras you want drawn in what order.

Please note that you can use multiple Camera to create multiple
prerender passes within one frame, in some scenes you might have
hundreds active such as when doing impostors.

> Is prerender camera regarded as slave camera during rendering traversal of
> viewer?

You can have a slave Camera in the Viewer that is used a prerendering
camera or a Camera in the scene graph that is used a prerender camera.
Cameras in the scene graph are treated almost exactly the same way as
slave Camera, it's just high level things like threading and how the
view and projection matrices are assigned per frame that differ.

> Is there a way to directly render a prerender camera at any time I want ?
> That is, not at a tempo of 60 Frame per second.

Simply decorate a Camera in the scene graph with a Switch or Sequence
node or use a NodeMask to toggle them on/off. For slave Camera in the
viewer you can toggle them on/off by setting the NodeMask to 0.

Robert.
Reply all
Reply to author
Forward
0 new messages