Re: [osg-users] Rendering a scene to texture

2018-03-18 Thread Robert Osfield
HI Jochen, On 18 March 2018 at 18:08, Jochen Maier wrote: > I know that the way is to realize this is using different cameras and render > to texture. But I don't know how to initiate the rendering-process; I only > know this by calling Viewer::frame(). I thought there is

Re: [osg-users] Rendering a scene to texture

2018-03-18 Thread Jochen Maier
Thank you very much Robert :) Okay, I'll take a look at the examples you had talked about. I know that the way is to realize this is using different cameras and render to texture. But I don't know how to initiate the rendering-process; I only know this by calling Viewer::frame(). I thought

Re: [osg-users] Render a Scene to texture

2018-03-18 Thread Robert Osfield
HI Jochen, What you need to do is use a render to texture (RTT) technique, with rendering the six scenes to six separate textures or the six scenes to the six faces of a cube map texture. The OSG supports both approaches and each approach is essentially the same setup - you create an osg::Camera

Re: [osg-users] View coordinates of a 3D point

2018-03-18 Thread Wojciech Lewandowski
Hi, Knowing the 3D coordinates of a point, is there an easy way in OSG to > compute its 2D projected equivalent (i.e. in pixel coordinates)? Yes. In general your pixel coord is computed as: pixel_coords = WindowMatrix * ProjectionMatrix * ViewMatrix * ModelMatrix * point; Your solution may

[osg-users] Render a Scene to texture

2018-03-18 Thread Jochen Maier
Hi, I want to do something like offscreen rendering. What I want to do exactly: I have one or more scenes (scene graphs) and one final scene. The final scene contains a cube which has 6 different textures. Now I have 6 different scenes (scene graphs). I want to render all these 6 scenes in 6