Skip to main content
gamedev.net
🔒 Locked

lightmapping

Started by billybob Aug 14, 2002 at 12:03 AM 5 replies 500+ views
Original Post
billybob
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?
ktron
ktron
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.
88er
88er
Is there any other way?
where can i get the detail of the first way?
thanks.
billybob
billybob
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.
Waverider
Waverider
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?
It's not what you're taught, it's what you learn.
Naku
Naku
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]
billybob
billybob
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?

Topic Locked

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

Sign in to reply to this topic.