snapshot of my problem with textures

i have a problem using my 1D texture as a color scale. i have used the code provided in the red book. u can follow the link below to c the problem at the bottom of the webpage. i have rotated the terrain by 90 across the x axis, making the z axis the height. could anyone tell me what is wrong with it. this is the first time i m using 1D textures as colorscales.
www.geocities.com/mithunp4u/

thank u.

could someone tell me if im on the right track. plzzzz

What’s your range in z? If your terrain vertices have z between 0 and 50, the texgen will repeat the 1D texture 50 times over the full height. To correct this example, you’d set the third ‘coefficient’ to 1.0f/50.

Btw, use a mipmap filter for the 1D texture. Looks scary …

Originally posted by zeckensack:
[b]What’s your range in z? If your terrain vertices have z between 0 and 50, the texgen will repeat the 1D texture 50 times over the full height. To correct this example, you’d set the third ‘coefficient’ to 1.0f/50.

Btw, use a mipmap filter for the 1D texture. Looks scary …[/b]

what if my z values range from 1681 to 2281? do i just take the difference and set it as 1.0/difference ?
the values of z are 1681 and 2281 before translation.

[This message has been edited by mithun_daa (edited 12-02-2003).]

That would work but you then also need to set the base, and you use the fourth coefficient for that. So I think the fourth coefficient needs to be set to the base * third coefficient (or is it base/3rd coefficient?), anyhoo, something like that will get you there.

[This message has been edited by dorbie (edited 12-02-2003).]

Originally posted by dorbie:
[b]That would work but you then also need to set the base, and you use the fourth coefficient for that. So I think the fourth coefficient needs to be set to the base * third coefficient (or is it base/3rd coefficient?), anyhoo, something like that will get you there.

thanx a millionnnnnnnnnnn. it works. and 4 the records its base * third coeff.
thanx a loot

[This message has been edited by dorbie (edited 12-02-2003).][/b]