Archived

This topic is now archived and is closed to further replies.

Dirge

(Cubic) Environment Mapping tips?

Recommended Posts

So I just read 3 excellent papers on Environment Mapping from the nVidia website and I have a few questions that maybe you guys can answer. So what I want to do in a game is have an object appear to be metalic, yet not completelly. So it has it''s only textures associated with it, but it also has a nice sheen on it, like the cars in Need for Speed or Gran Turismo. So my question is do you just generate extra texture coordinates that the environment maps uses then blend these together (using multitexturing or another mechnism... shaders?) with the normal model''s textures??? Now I also don''t want to have to dedraw the whole scene onto 6 textures every frame, so is it acceptable to just use 6 textures that share characteristics of the scene (like the sky box) to save these calculations. I don''t need accurate reflections but I want it to look shiny. I don''t want to use Spherical EM btw. I''ve seen greate demo''s using Cubic Environment Mapping but it seems very foolish to think you can do this for a whole seen, that is to say multiple objects having dynamic EM. Am I wrong here or is it not usually better (for performance) just use maps that were already created (I use render to texture quite a bit and it can be VERY expensive). Also, is Environment Mapping the perfect alternative for mirrors and other extremelly reflective objects, such as water? I''ve seen other techniques (tricks) to doing reflections but EM seems to be the only "true" one. Thanks a bunch for any help!!! The papers btw are: http://www.nvidia.com/docs/lo/181/SUPP/Cube_Environment_Mapping.pdf http://www.nvidia.com/docs/IO/1333/ATT/CubeEnvMapping2.pdf and http://www.nvidia.com/view.asp?IO=feature_cube "Love all, trust a few. Do wrong to none." - Shakespeare Dirge - Aurelio Reis www.CodeFortress.com Current Causes: Nissan sues Nissan

Share this post


Link to post
Share on other sites
For your first question, the answer is yes, you just have to generate another set of texture coordinates and blend with the original texture.

You can set the upper texture only once with the sky but (and perhaps the bottom with a road...), but you''ll need to render the 4 other faces of the cube. Since you don''t need pefect reflection, use small texture.

If you wan''t use EM on many object try this (just an idee that I got):
- render the backgroud object on your cube (or anyobject that don''t move a lot)
- save your cubbic texture and copy it
- after just draw the object witch change a lot
for exemple in a car game:
- render the tree, the billboard, the sky and the ground)
- copy
- for every cars, draw the other cars on the copy (combine with LOD could be a good idea).

EM is a good idea for non planar object, if you have a mirror just combine stencil (if any) and redraw the scene once.

I hope that I have correctly answer to your questions...
Good Luck :D

Share this post


Link to post
Share on other sites