Skip to main content
GameDev.net gamedev.net
🔒 Locked

lightmaps - a stupid question

Started by Muncher Mar 10, 2004 at 5:20 AM 1 replies 550+ views
Original Post
Muncher
Muncher
Another stupid question for all... Is there an alternative to having a lightmap for EVERY polyon in our scene. I mean, if we have a 16x16 lightmap for every polygon, thats a lot of added texture space......
Gytis
Gytis
you could have one texture for a few small ones. or adjust lightmap texture size by polygon size.

if poly big, then lmapsize = 256x256
if poly small, then lmapsize = 16x16
Max_Payne
Max_Payne
quote:
Original post by Muncher

Another stupid question for all...
Is there an alternative to having a lightmap for EVERY polyon in our scene. I mean, if we have a 16x16 lightmap for every polygon, thats a lot of added texture space......


There are no stupid questions, you need to remember that.

Some people like to do "lightmap packing". Which is basically what the other poster said. Though I would recommend pushing the lightmap resolution to 512x512. Then all you have to do is to stick as many polygons in it as you can. If a polygon somehow manages to exceed your maximum allowed lightmap size, you can simply separate it in multiple polygons (like Half-Life).

This "lightmap packing" technique has the advantage of minimizing texture changes, but it adds extra complexity. You have to manage your lightmaps so that they fit the 3D arrangement of the map in order to optimize speed, because you are most likely going to divide your world in sectors or with a tree based structure. You also have to mess with the texture coordinates and with the texture data, possibly extending the lightmap calculations a bit over the edges of the polygon so that texture filtering doesnt look SNAFU.

A website that will hopefully help you



Looking for a serious game project?
www.xgameproject.com

[edited by - Max_Payne on March 10, 2004 3:31:10 PM]

Looking for a serious game project?
www.xgameproject.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.