PDA

View Full Version : Cubic, Cylindrical and Spherical texture mapping



devdept
08-23-2008, 05:19 AM
Hi All,

I found this very easy to understand tutorial on spherical texture mapping http://www.mvps.org/directx/articles/spheremap.htm. Cylindrical is very easy to derive but what about Cubic? Can you direct me to a similar tutorial on cubic mapping?


Thanks,

Alberto

zeoverlord
08-23-2008, 07:16 AM
Cubic mappic is also similar, basically you use a planar mapping method (you do know how to do that?) and project from all six sides of the cube, then you use the normal and select one of those projections based on witch one it's facing the most.

devdept
08-23-2008, 07:29 AM
zeoverlord,

I know, but I was looking for a pseudo code to code it faster...

devdept
08-24-2008, 07:44 AM
Hi All,

Can anybody provide me a pseudo code to map triangles normals to a cubic mapping?

Thanks,

Alberto