Jump to content
  • Advertisement

Archived

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

JinJo

Saving Quake 3 bsp lightmaps to BMP file

This topic is 5211 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!