Dual Paraboloid mapping

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Simson
Competition winner
Posts: 95
Joined: Wed Nov 30, 2005 8:53 am
Location: France : midi pyrénées

Dual Paraboloid mapping

Post by Simson »

Hello,
I would like to know if anyone here know the good way to render paraboloid render texture with irrlicht ?
It's for making realtime reflection on a small detailled object and I don't know how to setup my camera matrix for the render target.
Thanks for your help :)
CuteAlien
Admin
Posts: 9652
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Dual Paraboloid mapping

Post by CuteAlien »

I suspect you'd have to write your own shader. Sounds a bit complicated.
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
Simson
Competition winner
Posts: 95
Joined: Wed Nov 30, 2005 8:53 am
Location: France : midi pyrénées

Re: Dual Paraboloid mapping

Post by Simson »

If I understand, the pseudo code is:
Render to texture with fov 1.57 and ratio 1 with Z positive for front texture
Render to texture with fov 1.57 and ratio 1 with Z negative for back texture
Use shader to modify textures to spheremap texture
Use shader to render the texture onto the object that was reflective.

Orthographic or perspective camera for render textures ?
I think the more complicated task is generate the spheremap style texture from shader :)
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: Dual Paraboloid mapping

Post by devsh »

You need a custom vertex shader (and tessellated/dense geometry, because paraboloid projection is non-linear and properly computed the triangle edges should "curve"), stefbuet had a post about it on the forum.

The projection is not linear so its neither Perspective or Orthographic.
Post Reply