tuxracer ice reflection

I just want to know how ice reflection works in tuxracer
(he uses a env map ) but I don’t know how …
because :
is not so good as in tuxracer

This is going to be some kind of arctic stategy game, I take it?

go to www.Mountain-tycoon.fr.st


The terrain looks nice.
On one of your screenshoots ( http://raphael.siryani.free.fr/mountain/publique/mountaintycoon/screen/images/shoot030.jpg ) I see that there is some kind of atmoshperic effect in the backgrounds mountains. How do you do this? Is that fog or something special?


It looks more like snow to me ScottManDeath

(You can see it blend to it on the left hand side of the image)

But I could be wrong…

I don’t know how Tux Racer does it.

However, I do know that Sphere Maps don’t look very good, and can’t be updated dynamically because of the warping needed.

I suggest using cubic environment maps, which are a standard part of OpenGL 1.3, and an ARB extension that everyone supports before that.

If all you want is a reflection in a plane (like ice) then you can also look into various mirroring portal techniques, like virtually reflecting the camera position in the ice, and putting a clipping plane along the mirror plane, and re-rendering the scene in additive mode. (Stencil helps here, too) You can also render-to-texture using the same mirrored camera set-up, and put that texture on the ice.

Hope these ideas give you something to go on. Google should be full of hits if you plug in some of these words.

thanks but such techniques is too expensive I just want to do a fake effect (like in tuxracer)
and the atmospheric is just some quad with a texture with a variant alpha channel (like in fs2002 )

Just use eye linear automatic texture coordinate generation.

ok I will try thanks

float eye_plane[4]={0.1f,0.1f,0.1f,0.1f};

I don’t know how I can use the eye_plane params … wich value and why thanks

[This message has been edited by IronRaph (edited 07-11-2002).]

Just try this, and let me know what it looks like…
It should just look like the ice polys are like a mirror, reflecting whatver texture you use for them.

float s[4]={1.0f,0.0f,0.0f,0.0f};

float t[4]={0.0f,0.0f,1.0f,0.0f};

I’m assuming your terrain is in the XZ plane, with Y being ‘up’.

[This message has been edited by knackered (edited 07-11-2002).]

No this will look awfull.

Nah, it’ll look alright. Cartoon stylee!

Texgen linear will not look like a reflection ESPECIALLY in object space as your sample code does.

Look at what you’re suggesting, you just get an incrementing s coordinate along the x axis and t along the z axis.

In otherwords you’ve mapped a texture flat over a horizontal plane. Congratulations, but it won’t look like a reflection, cartoon or no.

Eye linear won’t be much better. It’ll just swim a bit in z as the modelview changes.

Oh yes, sorry IronRaph, I meant EYE not OBJECT. Just replace the word OBJECT with the word EYE in my code snippet.
Dorbie, it will look ok - it won’t be ‘correct’, but it will look ok. Tuxracer is meant to run on really old cards - even ones with only a gl subset, such as voodoo2’s.