Jump to content
  • Advertisement

Archived

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

yodaman

Another lighting question...

This topic is 5741 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!