Texture Projection
by Jendrik Posche · in Torque Game Engine · 07/01/2008 (2:58 am) · 0 replies
Hi All,
I'm trying to implement a projection texture in software. I'm able to do texture transform in texture space. However after reading http://developer.nvidia.com/object/Projective_Texture_Mapping.html
I can't seem to make the projection work properly.
I want to project a certain on a certan position inside my texture using this algorithm. However my projection ends up way outside the 0,1 range. Even after a scale and translate by 1/2. Or when it is in the 0,1, the orientation is wrong. I use an orthographic projection matrix to have my image always pointing upwards.
I tried using the mObjToWorld as a model matrix or the inverse of the camera matrix.
( my object is at position 0,0,0 and my camera is at 0, -100, 0 )
I'm trying to implement a projection texture in software. I'm able to do texture transform in texture space. However after reading http://developer.nvidia.com/object/Projective_Texture_Mapping.html
I can't seem to make the projection work properly.
I want to project a certain on a certan position inside my texture using this algorithm. However my projection ends up way outside the 0,1 range. Even after a scale and translate by 1/2. Or when it is in the 0,1, the orientation is wrong. I use an orthographic projection matrix to have my image always pointing upwards.
I tried using the mObjToWorld as a model matrix or the inverse of the camera matrix.
( my object is at position 0,0,0 and my camera is at 0, -100, 0 )