Help with lightmaps


(tman777) #1

Could someone explain ,or point me to a turorial on the basics of lightmaps.

I assume it has something to do with how q3map2 lights a map butI’m cluless as to how this works.

Also how does the worldspawn key ‘gridsize’ effect lighting.Ive tried diffeernt values (64 64 64 for ex) but q3map2 allways readjusts the value to something else.Ive read,I think,somewhere that a smaller grid size gives better quality lighting at the expense of a longer compile time.Any illumination (pun intended) on the subject would be greatly appreciated.


(SCDS_reyalP) #2

gridsize affects the lightgrid, which only controls the lighting on moving objects such as players. If your map is very large (such that the lightgrid would take more than 8MB, if I remember correctly) then q3map will lower the lightgird resolution. The lightgrid is a 3 dimensional, rectangular region. You can control what part of your map has lightgrid information by using a lightgrid brush. This may be useful if there are large areas that players cannot reach.

lightmaps mostly used for non-moving things. Each lightmap is a texture which is blended with the brush textures to produce a the lighting effect.

Both lightmap and lightgrid are created at compile time by q3map2 in the -light phase.


(tman777) #3

Thanks for the reply.When you say lower the resolution you mean increase the gridsize values such as 64 64 128 to 128 128 256.Right?

Also what can cause a lightgrid mismatch and what exactly is it? Thanks


(SCDS_reyalP) #4

Yes, the numbers are distance between lightgrid samples, so bigger numbers = lower resolution = less memory used.

Also what can cause a lightgrid mismatch and what exactly is it? Thanks

Not sure, I think I’ve only seen that on maps I didn’t do a light compile at all.