Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: tuxracer ice reflection

  1. #1
    Intern Newbie
    Join Date
    Apr 2002
    Location
    France
    Posts
    48

    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 :
    glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
    glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
    is not so good as in tuxracer
    thanks
    Software engineer:
    Intertial Measurement Unit, IMU, AHRS, INS :
    www.sbg-systems.com

  2. #2
    Senior Member OpenGL Guru knackered's Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    3,032

    Re: tuxracer ice reflection

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

  3. #3
    Intern Newbie
    Join Date
    Apr 2002
    Location
    France
    Posts
    48

    Re: tuxracer ice reflection

    Software engineer:
    Intertial Measurement Unit, IMU, AHRS, INS :
    www.sbg-systems.com

  4. #4
    Member Regular Contributor
    Join Date
    Mar 2001
    Posts
    466

    Re: tuxracer ice reflection

    Hi

    The terrain looks nice.
    On one of your screenshoots ( http://raphael.siryani.free.fr/mount...s/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?

    Bye
    ScottManDeath

  5. #5
    Junior Member Regular Contributor
    Join Date
    Aug 2001
    Location
    England
    Posts
    174

    Re: tuxracer ice reflection

    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...

  6. #6
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    2,704

    Re: tuxracer ice reflection

    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.
    "If you can't afford to do something right,
    you'd better make sure you can afford to do it wrong!"

  7. #7
    Intern Newbie
    Join Date
    Apr 2002
    Location
    France
    Posts
    48

    Re: tuxracer ice reflection

    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 )
    Software engineer:
    Intertial Measurement Unit, IMU, AHRS, INS :
    www.sbg-systems.com

  8. #8
    Senior Member OpenGL Guru knackered's Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    3,032

    Re: tuxracer ice reflection

    Just use eye linear automatic texture coordinate generation.
    Knackered

  9. #9
    Intern Newbie
    Join Date
    Apr 2002
    Location
    France
    Posts
    48

    Re: tuxracer ice reflection

    ok I will try thanks
    Software engineer:
    Intertial Measurement Unit, IMU, AHRS, INS :
    www.sbg-systems.com

  10. #10
    Intern Newbie
    Join Date
    Apr 2002
    Location
    France
    Posts
    48

    Re: tuxracer ice reflection

    glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
    float eye_plane[4]={0.1f,0.1f,0.1f,0.1f};
    glTexGenfv(GL_S,GL_EYE_PLANE,eye_plane);
    glTexGenfv(GL_T,GL_EYE_PLANE,eye_plane);

    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).]
    Software engineer:
    Intertial Measurement Unit, IMU, AHRS, INS :
    www.sbg-systems.com

Posting Permissions

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