Saving Quake 3 bsp lightmaps to BMP file

Started by
1 comment, last by JinJo 20 years ago
how do i save a bmp file from quake 3 bsp lightmap data? I had originally used the data to save to a TGA file but I only knew how to save to a TGA file with alpha values. I tried a way to store blank alpha values but I don''t know if the file saved is correct. How would I save the data to a bmp file, this would be more appropriate since lightmaps dont have alpha values.
Advertisement
Are Quake3 lightmaps just like Half-Life lightmaps, i.e just a series of RGB values in one big array? If so, you can probably just save it as a 24-bit BMP file. You can read up on the BMP file format at Wotsit. I don''t know what you''d do with the lightmaps in a BMP file though, since the only way to actually extract any relative positioning information out of them would to actually iterate the face patches.
Yes they are just an array of RGB values.
The reason I want them in a bmp file is my scene files (or levels) are quite different from quake 3 and are designed specifically for the engine i am developing, (I don''t want to just render quake 3 maps, i''m only importing this because my level editor isn''t ready for anyone to use seriously and i''m no artist so importing quake 3 level geometry is a good test to check if things are working).

Each face has a material ID and each material has an effect ID with a list of different texture layers. So to render a face (or faces, like a .bsp file) with a lightmap style effect the material points to that specific effect ID which sets up all the geometry for the shader to render the efect and passes the material to it. The shader then sets up multi texturing and renders the texture layers.

I hope I explained this correctly, it seems like a waste of time the way i described it but it allows for my engine to be much more flexible. There''s alot of talk of this sort of thing going on in the graphics forum right now if anyone is interested.

This topic is closed to new replies.

Advertisement