[osg-users] scene snapshot
Robert Osfield
robert.osfield at gmail.com
Wed Aug 30 00:59:30 PDT 2017
Hi Nick,
On 30 August 2017 at 07:38, Trajce Nikolov NICK <
trajce.nikolov.nick at gmail.com> wrote:
> I have scene (terrain tile) and I want to take a snapshot in ortho (to
> make a texture out of the scene snapshot). I have RTT camera and an image
> as an attachment. The scene is added as a child to this camera. What would
> be the settings for the Projection and the View matrix for the RTT camera?
>
Just have a look at the osg::Camera header for the setViewMatrixAs*() and
setProjectionMatrix*() methods, they all have GL/GLU counterparts so
general OpenGL documentation on view and projection matrices apply (it's
why I chose to use exactly the same naming).
Exactly what the settings should be will depend upon your application
needs, it's not something we know so can't can't provide specific guidance
on, you'll need to work these out.
As a general comment, to help debug the settings I would recommend creating
a osg::Camera that renders on top of the main window, like a traditonal map
view, and once you are confident that the view and projection matrix
settings make sense you can then just change the Camera to be an offscreen
one.
Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170830/266add62/attachment.htm>
More information about the osg-users
mailing list