Another lighting question...

Started by
4 comments, last by yodaman 21 years ago
Ok, well, Im kinda new to the world of lighting. I well know how to use every aspect of opengl's lighting, but I want to start doing lighting on my own. I made the mistake of trying to jump straight into PerPixel Lighting, then crashed and burned. Anyway, Static Lightmaps, correct me if im wrong, a static lightmap is made at load time by calculating the light on each surface and then turning that data into a texture, correct? And dynamic lighting is done by changing the color of the polys in a radius around the lightsource into the lights color and the further away the poly from the lightsource, the darker it gets (attenuation, right?). What about 3d static lightmaps? There basicly made the same as a 2d static lightmap, but can be mapped over many surfaces, no matter the angle, correct? Thanx alot! [edited by - yodaman on March 31, 2003 4:23:59 PM]
www.jinx.com www.thebroken.org www.suprnova.org www.mozilla.org
Advertisement
um.. yes.
Static lightmaps are normaly precalcylated when the map is made(not at loadtime), that way you can add shadows, radiosity and stuff.
Those calcylations takes hours.
I am actuarly currently compiling an medium sized q3 map, the 3d static lightmap(grid) took 89 seconds and the lightmap pass took 1381 seconds.
During the first radiosity pass the grid took 1151 seconds.
Imagine how long the lightmap is going to take, well it''s been about 3 hours and it''s only about 25% done.

So don''t do it at load time.
LoL

Wow, I had no idea. I dont think any one wanting to play a game is going to wait 3 hours+ lol. I was right though about how its done in the first place though right? How is that data saved in the file?

[edited by - yodaman on March 31, 2003 4:57:25 PM]
www.jinx.com www.thebroken.org www.suprnova.org www.mozilla.org
In q3 i think that they are stored as lowres textures in the .bsp file.

The later versions of q3map2 is pretty eficient to compress the textures to a single texture.
Again, this is extreamly low res so a texture has something like 16x16 pixels
From what I''ve heard, Q3 uses higher res lightmaps, like 128x128...

Death of one is a tragedy, death of a million is just a statistic.
If at first you don't succeed, redefine success.
yes, but they are divided in smaller sections.
the latest map i did had something like 15 highres lightmaps and took more than 10 hours to render.

This topic is closed to new replies.

Advertisement