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

Thread: Object_Linear and Eye_linear

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2001
    Posts
    12

    Object_Linear and Eye_linear

    Hi,

    I need some help figuring out object linear vs Eye_linear. Right now I can generate the correct looking image using Eye_linear for texture mapping auto-gen of coordinates. I figured out recently that I really should be using object_linear but when I switch my images goes from looking like a Triangle, to an bowtie. The bowtie basically looks like my image in a mirror...How can I can make the object_linear view look like the eye_linear view ?

    Thanks for your help

  2. #2
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    4,388

    Re: Object_Linear and Eye_linear

    I don't know what the problem is, possibly the plane equations you have are just wrong and happen to look right in EYE_LINEAR. The other problem may be that your object is under a model transformation and therefore OBJECT_LINEAR is the wrong space and you need to transfrom the texture matrix into "WORLD" space.

    The difference between the two texgen modes is the numbers used to generate the texcoords. OBJECT_LINEAR uses the untransformed values sent to the graphics pipe by the application. EYE_LINEAR uses the values after the MODELVIEW matrix transformation, i.e. the eye space numbers.

    The one major problem with this setup is that you often have objects which are under modelling transformation, and with a moving eye you have separate viewing transformation which is also on the MODELVIEW matrix. That's whi it's called the MODEL VIEW matrix, it's MODEL*VIEW. This means that if you have any texgen you want in world space, for example a street light, or underwater caustics, there is no simple texgen which can create this, you therefore need to generate in eye or object space and transform the texture coordinates into world space.

    Hope this helps you. See the Aqua and the UAV sections on http://www.dorbie.com for more detailed discussion on texgen.

  3. #3
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    4,388

    Re: Object_Linear and Eye_linear

    I don't know what the problem is, possibly the plane equations you have are just wrong and happen to look right in EYE_LINEAR. The other problem may be that your object is under a model transformation and therefore OBJECT_LINEAR is the wrong space and you need to transfrom the texture matrix into "WORLD" space.

    The difference between the two texgen modes is the numbers used to generate the texcoords. OBJECT_LINEAR uses the untransformed values sent to the graphics pipe by the application. EYE_LINEAR uses the values after the MODELVIEW matrix transformation, i.e. the eye space numbers.

    The one major problem with this setup is that you often have objects which are under modelling transformation, and with a moving eye you have separate viewing transformation which is also on the MODELVIEW matrix. That's whi it's called the MODEL VIEW matrix, it's MODEL*VIEW. This means that if you have any texgen you want in world space, for example a street light, or underwater caustics, there is no simple texgen which can create this, you therefore need to generate in eye or object space and transform the texture coordinates into world space.

    Hope this helps you. See the Aqua and the UAV sections on http://www.dorbie.com for more detailed discussion on texgen.

  4. #4
    Junior Member Newbie
    Join Date
    Mar 2001
    Posts
    12

    Re: Object_Linear and Eye_linear

    Thanks, this helped quite a bit! I figured out my problem, I had one of the viewing
    planes configured incorrectly.

Posting Permissions

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