Jump to content
  • Advertisement
Sign in to follow this  
oil_on_glass

How are lightmaps stored?

This topic is 4609 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

Hi all new to this forum and had a question about hi resolution lightmapping for detailed environments. Generally, with most game tools, you can specify lightmap resolution in pixels per square meter of area in world space. Problem is, when you have a large detailed world, keeping it all in one map could be quite burdisome as you might be looking at having an 8k+ size texture. Do most highend games split this lightmapping data up into smaller maps; maybe 1 per BSP section or something similar to be streamed in on the fly? Or do most games keep it all in one enourmous map file that has to constantly be drawn in every frame(mem bandwidth hog?)? thanks and sorry for the newb question, I am an artist trying to understand lightmapping from a performnce issue(memory bandwidth/ cache misses etc). best wishes

Share this post


Link to post
Share on other sites
Advertisement
No, you can split it in multiple 1k or multiple 2k textures. I wouldn't go so far as say there's one per BSP node; there's one per "good unit of coalescence". It's up to you to figure out what that means for your specific game.

Share this post


Link to post
Share on other sites
Quote:
Original post by Luke Philpot
Have you checked out FSRad? It's open source, you might want to have a look at those lightmap packing routines.

Well, he`s an artist so don`t expect him to study the source code of FSRad.


oil_on_glass: You should ask your engine programmer what are the limitations and rules for lightmaps in your specific case. Obviously, the easiest way would be to have one lightmap per some object or a world chunk. But it all depends on a final required quality, e.g. do you have a shadow boundary over some part of broken brick hanging from the wall ? You might find that when the quality is finally OK, the final lightmap size is too big, so you either have to split the object or handle it differently (after consultation with your graphics/engine programmer) or simply change the parameters of the light.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!