Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Questions about projective texture

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2002
    Posts
    1

    Questions about projective texture

    I had studying a program in advance97 linking of opengl official site called Projectx.c.According to some documents I had read,before OpenGL automatically generated the texture coordinates of projective texture,I have to translate the coordinate system from eye space to world space by multiplying inverse of eye viewing matrix. But in the code, it multiply the inverse of a matrix used to change the view direction of projector. I don't know wht it do this way.I have some thoghts but I don't sure if they are right.

    1.The eye camera in this code is default setting so I don't need to calculate the inverse of eye viewing matrix. Because eye space is the same as world space.

    2.Indeed,the inversed matrix in the code is used to change the projector's view direction. But I don't understand why using inverse matrix.

    I hope anyone who understands my question can help me and correct my thoghts if wrong.Thanks.

  2. #2
    Junior Member Newbie
    Join Date
    Apr 2001
    Location
    UK
    Posts
    15

    Re: Questions about projective texture

    To project a texture you load the perspective transform and modelview matrix for the projection viewpoint into the texture matrix.

    In this case he's rotating his projector with the "textureXform" matrix, so the modelview matrix for the projection viewpoint is just a translation by the focal distance multiplied by the inverse of the "textureXform" matrix.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •