PDA

View Full Version : Texture mapping on warped mesh



Philipp
08-10-2005, 04:13 AM
Hi,
I want to map a rectangular texture to a warped mesh.
Imagine the warped mesh as part of the surface of a sphere and the the texture as a "rubber sheet" (rectangular).
Now I want to stretch this sheet to make it fit on the spherical surface.

This is all about the distortion of the texture. By mapping the texture to the warped mesh I want to achieve a fisheye-effect.

Ive read other posts about image warping, but none of them really deals with the problem of how to create this warped mesh. Ive also gone through tutorials about texture mapping, but they only tell you things like mapping bitmaps to the sides of a cube. ;)

I hope you can help me out.
Example code would be very useful.

Thanks in advance
...philipp

P.S. This is where I got the whole idea with the warped mesh from, so this has to be possible in some way:
Image Warping and Dewarping (http://www.opengl.org/resources/tutorials/sig99/advanced99/notes/node82.html)