Skip to main content
gamedev.net
🔒 Locked

Environment mapping...

Started by Zakwayda Jul 3, 2004 at 9:47 PM 3 replies 600+ views
Original Post
Zakwayda
Zakwayda
I was just wondering how the reflections in Quake 3, such as on the columns in the last level, are done. I gather it's some sort of generic 'reflection' texture blended with the main texture, with the texture coordinates for the reflection texture based on the camera position. I've been looking into various forms of environment mapping (sphere, cube, etc.), but am curious as to what method Quake uses to get its relatively simple metalic and glass reflection effects. Does it use OpenGL's texcoord generation capabilities? Or does it calculate texcoords on its own? Thanks in advance for any answers.
vincoof
vincoof
Quote:
Original post by jykDoes it use OpenGL's texcoord generation capabilities? Or does it calculate texcoords on its own?

I guess it uses texgen as it's by far the easiest and fastest way to do it. Calculating its own texture coordinates is useful for specific effects like refraction. But for reflection, OpenGL's texgen already has everything you need.
python_regious
python_regious
Yeah, it's bound to use the TexGen facilities to get the reflection effects.
If at first you don't succeed, redefine success.
Zakwayda
Zakwayda
Ok, so you can use OpenGL's texgen capabilities. But what type of mapping is it? Is it sphere mapping? I've looked at the environment map textures for Quake and they're simply rectangular, not distorted into a spherical shape, as I assumed sphere mapping textures had to be.

So if anyone can offer a little more info, it'd be appreciated. Meanwhile, I'll keep googling, etc., to try and figure this out.
vincoof
vincoof
If handled correctly, both look roughly the same.
It's easier to use cubemap reflections, but generally uses more memory and needs better hardware.
However, if the environment map is static and you want the reflections to look "real" (ie not just some kind of blurry effect), sphere mapping is much worse than cube mapping because with sphere mapping you have to recompute the texture everytime the POV turns around the object.
On the other hand, if you just want to give some kind of metallic look to your object, sphere mapping is more than enough.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.