Advertisement

Lightmaps

Started by July 12, 2001 06:01 PM
2 comments, last by steveharper101 23 years, 7 months ago
Lightmaps, What are they, How do you use them, What are they for? Thanks ~Steve~
well lightmaps are a kind of textures. The difference is, that lightmaps presents how much light falls onto the object. By blending together a texture and lightmap you can get a pretty nice results (like quake1/2/3) You can also dynamically change the lightmap to achieve the effect of moving light.
With best regards, Mirek Czerwiñski
Advertisement
Hey thanks MirekCz anyone got any ideas on how to use these in OpenGL?

Thanks

~Steve~
I''m guessing up till now you''ve just been putting one texture on each polygon. This can get rather bland. What you want to do is to be able to blend multiple textures onto one polygon, so you would have your base texture, at quite high res, and then you would blend another texture onto it, the second texture could me much lower resolution. Lightmaps are just seperate textures that are calculated per polygon prior to rendering. The renderer blends each polygons lightmap with its base texture to produce nice lighting that doesn''t require huge amounts real time computations.

You don''t have to blend them, you could subtract the lightmap from the base texture, or whatever you want, heaps of effects are possible. And you can blend a maximum of 8 textures per polygon. The multitexturing extensions to OpenGL are by far the best and fastest way to do this, but old cards that don''t support multitexturing will have to be rendered using multipass. Quake3 applies lots of layers, base texture, lightmap, specular, environment map, and some others, which is why it looks so cool.

If you have Q3 go into the graphics options and switch multitexturing off and see the frame rate drop

There are heaps of good tutorials on multitexturing around the net, so I suggest you master that before moving on to calculating your own lightmaps...which is a whole other topic.

Hope that answers some of your questions

FatalXC

This topic is closed to new replies.

Advertisement