Re: [osg-users] Is a render to texture master camera critical?

2012-02-22 Thread Martin Großer
Hi,

I try the RTT master camera and for one view it works fine, but when I want to 
use multiple views in a composite viewer my trackball manipulators don't work. 
Only the first view get a new viewmatrix.

There are any experiance about rtt cameras and camera manipulators? 

Thank you!

Cheers,
Martin

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





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


Re: [osg-users] Is a render to texture master camera critical?

2012-02-22 Thread Martin Großer
Hi,

Additionally, the manipulator for the first view only works if I move the 
window at the beginning. It seems to me it only works after the first window 
redraw event. I am not sure. My RTT camera has a viewport with x = 0, y = 0, 
width = textureWidth and height = textureHeight. Is that the problem?

Thank you!

Cheers,
Martin

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





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


Re: [osg-users] Is a render to texture master camera critical?

2012-02-22 Thread Martin Großer
Hello all,

I note only my post sent per mail. I tried the forum and this was the first 
time. Sorry about the confusing mails. However I hope someone understand my 
problem.

I would like to state my question even more clearly. When I define a viewport 
like setViewport(0,0,800,600) to change the influence range of the trackball 
manipulator to the right top corner like (400,300,400,300)?

I think that could solve my problem.

Thanks

Cheers,
Martin

 Original-Nachricht 
 Datum: Wed, 22 Feb 2012 15:56:15 +0100
 Von: Martin Großer grosser.mar...@gmx.de
 An: osg-users@lists.openscenegraph.org
 Betreff: Re: [osg-users] Is a render to texture master camera critical?

 Hi,
 
 Additionally, the manipulator for the first view only works if I move the
 window at the beginning. It seems to me it only works after the first
 window redraw event. I am not sure. My RTT camera has a viewport with x = 0, 
 y =
 0, width = textureWidth and height = textureHeight. Is that the problem?
 
 Thank you!
 
 Cheers,
 Martin
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=45684#45684
 
 
 
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Is a render to texture master camera critical?

2012-01-30 Thread Riccardo Corsi
Hi all,

I've tried  to use the main camera as RTT in several applications and it
works for me as well.
But I'd like to ask a couple of questions on the post process passes
instead:
- is there any conceptual difference between using the final ortho camera
as a in-graph POST_RENDER or as a viewer's slave one?
- if using multiple post process passes, is it a good solution to add all
of the post cameras as children of a group with TraversalOrderBin, to
obtain a specific rendering order? Does this work correctly with all the
threading models?  Or is it better to explicitly assign to each camera its
render order via setRenderOrder()?

Thank you.
Ricky



On Fri, Jan 27, 2012 at 11:40, Tim Moore timoor...@gmail.com wrote:

 2012/1/17 Martin Großer grosser.mar...@gmx.de:
  Hello all,
 
  A few weeks ago, I want to render my scene into a texture, which I want
 to use in the final rendering on a screen aligned quad. My first problem
 was I lost the shadows, because view dependent shadow techniques don't work
 with nested cameras. So I used a RTT slave camera. Now my Callbacks don't
 work, because they don't work with slave cameras (no update visistors for
 slave scene graphs). So now my rtt camera is the master camera and my ortho
 camera for the quad is a nested camera (see the
 render_to_texture_scene_graph.png). It looks fine, but I am not sure
 whether it is a good idea.
 
  There are any special explanatory notes for me? Is it a good or bad
 scene graph pattern for my use case?
 A couple of points:
 The default for a slave camera is to use the master camera's scene
 graph. In that case you don't need to worry about callbacks in the
 main scene graph.

 You can install an UpdateSlaveCallback if you really need it. See osg/View.

 If you set up your windows and contexts explicitly and assign them to
 slave cameras before calling Viewer::realize() or Viewer::run(), then
 the master camera will not be given a graphics context and won't be
 used for rendering. The manipulators will still update the master and
 Its view and projection matrices will be used to control the slave
 cameras if desired.

 When I play with RTT, I like to open the window and set up the
 graphics context with GraphicsContext::createGraphicsContext(), then
 assign that to the slave cameras that render the scene graph and
 display the rendered texture on the screen. I don't put the RTT camera
 in the scene graph.

 Tim
 
  Cheers
 
  Martin
  --
  Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
  belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
 
  ___
  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

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


Re: [osg-users] Is a render to texture master camera critical?

2012-01-27 Thread Tim Moore
2012/1/17 Martin Großer grosser.mar...@gmx.de:
 Hello all,

 A few weeks ago, I want to render my scene into a texture, which I want to 
 use in the final rendering on a screen aligned quad. My first problem was I 
 lost the shadows, because view dependent shadow techniques don't work with 
 nested cameras. So I used a RTT slave camera. Now my Callbacks don't work, 
 because they don't work with slave cameras (no update visistors for slave 
 scene graphs). So now my rtt camera is the master camera and my ortho camera 
 for the quad is a nested camera (see the render_to_texture_scene_graph.png). 
 It looks fine, but I am not sure whether it is a good idea.

 There are any special explanatory notes for me? Is it a good or bad scene 
 graph pattern for my use case?
A couple of points:
The default for a slave camera is to use the master camera's scene
graph. In that case you don't need to worry about callbacks in the
main scene graph.

You can install an UpdateSlaveCallback if you really need it. See osg/View.

If you set up your windows and contexts explicitly and assign them to
slave cameras before calling Viewer::realize() or Viewer::run(), then
the master camera will not be given a graphics context and won't be
used for rendering. The manipulators will still update the master and
Its view and projection matrices will be used to control the slave
cameras if desired.

When I play with RTT, I like to open the window and set up the
graphics context with GraphicsContext::createGraphicsContext(), then
assign that to the slave cameras that render the scene graph and
display the rendered texture on the screen. I don't put the RTT camera
in the scene graph.

Tim

 Cheers

 Martin
 --
 Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
 belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

 ___
 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


[osg-users] Is a render to texture master camera critical?

2012-01-17 Thread Martin Großer
Hello all,

A few weeks ago, I want to render my scene into a texture, which I want to use 
in the final rendering on a screen aligned quad. My first problem was I lost 
the shadows, because view dependent shadow techniques don't work with nested 
cameras. So I used a RTT slave camera. Now my Callbacks don't work, because 
they don't work with slave cameras (no update visistors for slave scene 
graphs). So now my rtt camera is the master camera and my ortho camera for the 
quad is a nested camera (see the render_to_texture_scene_graph.png). It looks 
fine, but I am not sure whether it is a good idea.

There are any special explanatory notes for me? Is it a good or bad scene graph 
pattern for my use case?

Cheers

Martin
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
attachment: render_to_texture_scene_graph.png___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Is a render to texture master camera critical?

2012-01-17 Thread Jean-Sébastien Guay

Hello Martin,


So now my rtt camera is the master camera and my ortho camera for the quad is a 
nested camera (see the render_to_texture_scene_graph.png). It looks fine, but I 
am not sure whether it is a good idea.


That's always how I've done it too. I think it's fine.

For me, the motivation was that I wanted my app to work whether I was 
doing normal rendering or RTT of the main pass + post effects on a 
full-screen quad afterwards, so the common factor between the two needed 
to be that the master camera did the main scene rendering. Then I can 
switch between the two cases by simply changing the 
renderTargetImplementation of the main camera, attaching the output 
texture to the main camera's color buffer, and finally setting the node 
mask of the child ortho camera (that has the full-screen quad) to 
non-zero value.


Hope this helps,

J-S
--
__
Jean-Sebastien Guay  jean_...@videotron.ca
http://whitestar02.dyndns-web.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Is a render to texture master camera critical?

2012-01-17 Thread Martin Großer

Hello Jean-Sébastien,

yes, it helps. :-)

thank you very much for your feedback.

Cheers

Martin

Am 17.01.2012 18:21, schrieb Jean-Sébastien Guay:

Hello Martin,

So now my rtt camera is the master camera and my ortho camera for the 
quad is a nested camera (see the render_to_texture_scene_graph.png). 
It looks fine, but I am not sure whether it is a good idea.


That's always how I've done it too. I think it's fine.

For me, the motivation was that I wanted my app to work whether I was 
doing normal rendering or RTT of the main pass + post effects on a 
full-screen quad afterwards, so the common factor between the two 
needed to be that the master camera did the main scene rendering. Then 
I can switch between the two cases by simply changing the 
renderTargetImplementation of the main camera, attaching the output 
texture to the main camera's color buffer, and finally setting the 
node mask of the child ortho camera (that has the full-screen quad) to 
non-zero value.


Hope this helps,

J-S


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