View Full Version : Golden cube mapping?

04-22-2001, 06:34 AM
Hey guys,
OK when you use real time cube mapping,your object totally reflects off all it's surroundings and,thereby,giving the object a silvery texture or color.Is it possible to do all this but make the object golden in color? Like,instead of a silver ball,I want a golden ball.Any ideas? All the demos I've seen about cube mapping showed only silvery objects http://www.opengl.org/discussion_boards/ubb/frown.gif

04-22-2001, 07:56 AM
No problem Gecko-
If you check out a tutorial somewhere on how cubic or spherical environment mapping is done, you'll see that the 'maps' are the actual colors reflected, so if you want gold, you just use a golden map.

All types of environment mapping (cubic, spherical, or even dual-paraboloid), are just texture maps that use an object's normals (or eye-light-reflection-vector) as texture coordinates, instead of explicit values. [[ Technically, the normals are halved and offsetted to place the 0,0,1 value in the center of the map ]]

Anyways, find a good tutorial and you can get the gold shining-

04-22-2001, 09:55 AM
Couldn't you just set a golden color with glColor3f ? Then the cube map textures would automatically get tinted to the material color of the sphere.


04-22-2001, 12:01 PM
That will do the trick, assuming that you are using GL_MODULATE as your texture blend mode.