Hi Robert,

I actually found an example in this mailing list (don't exactly know where, the link is in my code which i cannot reach now ;)) today which helped me quite a lot, as it pointed out that I actually had to modify the viewer camera itself, which was not clear to me before. In fact I was confused, because at the end I had three cameras instead of just two, which is a little weird if you just want to render your scene to a texture and this texture to the screen.

Now it works and I just need to take one more step and render the normals to a separate buffer. Let's hope I can do that :-)

Regards
-Thorsten

Am 26.11.2010 10:19, schrieb Robert Osfield:
Hi Thorsten,

From your email I can't get me head around what exactly you mean.
There are a series of render to texture examples that are good places
to start when experimenting, osgprerender, osgprerendercube and
osgdistortion all illustrate various ways of settings things up.

Personally I wouldn't recommend getting too familiar with GLUT, it's a
very very limited windowing toolkit and will hold you back very
quickly.  The standard osgViewer is more capable and flexible to use,
the example is really there to serve as a bridge to those who know
GLUT already, or are attempting to integrate the OSG with a similarly
restricted windowing toolkit.

Robert.

On Thu, Nov 25, 2010 at 6:14 PM, Thorsten Roth
<[email protected]>  wrote:
Hi guys,

I currently have a problem with a simple "experiment" with RTT. I am using
osgviewerGLUT as a base for this. What I am trying is to render my scene
view to a texture and display this afterwards. To achieve this, I first
setup a camera which renders to the texture and then another one which
renders the textured quad to the screen.

The scene root contains these two cameras as a child, while the camera which
renders to the texture has the loaded object as a child. What happens now
seems a little weird to me, because I am completely new to OSG. The
application starts with a view "behind" the object, and this view does not
change when I try to rotate the object. Instead, the camera stays behind the
object in that exact position, which I can tell because the light seems to
be moving, which it is of course not.

Now my question is, how can I decouple the camera from the object movement,
so I can freely rotate the object without the camera following it?

Thanks in advance :)

Regards
-Thorsten
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to