Hi everyone, especially Botman :P
I am writing BSP renderer in Delphi which will use Half-Life .bsp.
Finally I understand *almost everything* except 1 thing -
lightmaps...No, I know what is lightmaps, how they stored, etc. I
don't know how they stored in Half-Life's bsp...
Are all lightmaps 128x128x3 rgb images? I can't find anywhere info
about their size....
Also I looked through the BSP_VIEWER source code and stopped by
ComputeLightmap function, it has such lines of code:
// compute lightmap size
int size[2];
for (c = 0; c < 2; c++)
{
float tmin = (float) floor(mins[c]/16.0f);
float tmax = (float) ceil(maxs[c]/16.0f);
size[c] = (int) (tmax-tmin);
}
I think it *must* get sizes of lightmap? Then what do FLOOR() and
CEIL() functions? I can't find their source :( Please, someone helpme
with that.
Botman, if you are reading this, can you explain me please how they are
written into bsp? For example Quake3 bsp stores them in such way:
lightmaps offset...
repeat
lightmap : Array[0..127, 0..127, 0..2] of Byte; // The RGB data in a 128x128 image
numoflightmap times
Thanks everyone for help :)
--
Slava "Hoaxer" Djura
Level-designer
Deep-Shadows (http://www.deep-shadows.com)
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders