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 3 of 3

Thread: TangentSpace -> WorldSpace

  1. #1
    Senior Member OpenGL Guru
    Join Date
    Dec 2000
    Location
    Reutlingen, Germany
    Posts
    2,052

    TangentSpace -> WorldSpace

    Hi

    This might be a stupid question, but well, i donīt know the answer.

    If i have a normalmap which represents the normals in tangent-space, then how would i need to transform those vectors to have them in world-space?

    I was thinking i would simply need to take the inverse of the TBN-Matrix (which i would use to get other stuff into my tangent-space). However i am not sure if this would work.

    And additionally i donīt know how to get that inverse! I know how to calculate it on a piece of paper, but i donīt know how to teach my cpu that algorithm

    So, i would either need to know how to calculate that inverse, or how to do this in another way.

    Thanks,
    Jan.
    GLIM - Immediate Mode Emulation for GL3

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Oct 2000
    Location
    Belgium
    Posts
    857

    Re: TangentSpace -> WorldSpace

    If the TBN matrix is orthonormal (i.e. the three vectors are normalized and perpendicular to each other), then the inverse of the matrix is simply its transpose.

    If the matrix isn't orthonormal, see the Matrix and Quaternion FAQ .

    -- Tom

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Dec 2000
    Location
    Reutlingen, Germany
    Posts
    2,052

    Re: TangentSpace -> WorldSpace

    Cool, thanks.

    Yes, itīs orthogonal.

    Jan.
    GLIM - Immediate Mode Emulation for GL3

Posting Permissions

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