Archived

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

billybob

lightmapping

Recommended Posts

how do i go about making lightmaps. i know for sure of two ways, one make a (grayscale maybe?) texture, and multitexture it with the texture your drawing. or split all the polygons up into the lightmap''s resolution, and make lots of quads all the vertexes with their own vertex colors. that way it would be precalculated, but that would make ridiculous amount of polygons. whcih one do i do?

Share this post


Link to post
Share on other sites
quote:
Original post by billybob
how do i go about making lightmaps. i know for sure of two ways, one make a (grayscale maybe?) texture, and multitexture it with the texture your drawing. or split all the polygons up into the lightmap''s resolution, and make lots of quads all the vertexes with their own vertex colors. that way it would be precalculated, but that would make ridiculous amount of polygons. whcih one do i do?


The way I understand it, most people generate a big tecture full of precomuted lighting info and blend it into the textures of the static geomotry. THis can be, but ussually isn''t stored are a grayscale, since most games these days have colored lighting. So, basically, your first way was almost right on.

Share this post


Link to post
Share on other sites
ktron, doesn''t that require a huge amount of memory, having a second texture for every surface in the game? i can''t imagine this being the best way. that would use tons of memory, and wouldn''t you end up with ''half life lighting'' where the textures are covered in little bilinear filtered boxes? how did the unreal engine do it, they have some sweet lighting going on.

Share this post


Link to post
Share on other sites
The lightmap textures don''t need to be the same resolution as the wall textures. When I played Quake 2, if I looked closely, I could actually see the pixels that made up the lightmap texture. They were quite large. But that didn''t much matter when I wasn''t paying attention.

So maybe the lightmaps don''t need to take up so much memory if they have, say, 1/16th the resolution of the wall textures?

Share this post


Link to post
Share on other sites
As an example all of Quake III's lightmaps are 128x128 pixels no matter what size the surface or normal texture is.

Also you don't need a different lightmap for every surface. You can reuse alot of them.

[edited by - Naku on August 15, 2002 6:50:27 AM]

Share this post


Link to post
Share on other sites
how would you make the program know when to reuse a surface? also, how do you do dynamic lighting with this method, i guess when i make the editor, if a light is dynamic, it sees what surfaces it can affect, and then constanty raytrace those?

Share this post


Link to post
Share on other sites