Hi guys,
most of the time, when a 3d scene is projected to the 2d space, the target (where the camera is looking at) is projected at the center of the projected 2d screen. This is called on-axis projections, where (0,0) of the projected 2d space is at the center of the viewport. However, sometimes it is useful to do off-axis projection (for example stereo view).
I know in OpenGL this is done through glFrustum() but I couldn't figure out how to get this done with Irrlicht. Can anyone explain how to do it?
Thanks,
gtimworks
how to do off-axis projections
Re: how to do off-axis projections
I think you need two camera views, where 1 view has a pan offset distance from the other view to achieve stereoscopic.
Just render the scene two times with camera switching onto different view.
I think I saw some discussion on this topic trolling the forum before.
Regards
thanh
Just render the scene two times with camera switching onto different view.
I think I saw some discussion on this topic trolling the forum before.
Regards
thanh
Re: how to do off-axis projections
I found 2 (old) threads: http://irrlicht.sourceforge.net/forum/v ... =9&t=33463
and http://irrlicht.sourceforge.net/forum/v ... =1&t=43039
and http://irrlicht.sourceforge.net/forum/v ... =1&t=43039
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: how to do off-axis projections
They draw the two images at the same place. The OP wants the images side-by-side. I think he needs two viewports.
Re: how to do off-axis projections
Ah OK, in that case example 18.SplitScreen is probably the better starting point. Or maybe a mixture of that example and the links above.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm