View Full Version : 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

dorbie

04-04-2001, 10:12 PM

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.

dorbie

04-04-2001, 10:14 PM

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.

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

planes configured incorrectly.

Powered by vBulletin® Version 4.2.3 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.