quake 3 lightmap

Started by
0 comments, last by yzzid 19 years, 7 months ago
anybody know how to use lightmaps from quake 3 bsp file? Im using this: http://graphics.stanford.edu/~kekoa/q3/ as a reference and there are some strange lightmap data that are confusing me. Namely: int[2] lm_start (Corner of this face's lightmap image in lightmap. ) int[2] lm_size (Size of this face's lightmap image in lightmap. ) are these the values used to reference into the lightmap texture? but if so how am I supposed to do that? I am creating texture with a given size and while setting it i cant refer to only part of it (these are not uv values ?) whatsmore these valuse give very small rectangles. surelly not power of two texture. also : float[3] lm_origin World space origin of lightmap. float[2][3] lm_vecs World space lightmap s and t unit vectors. how do I use that?
Advertisement
Lightmaps in Quake 3 are 128x128 textures.

The lightmap coords are in the vertex array. It is the second set of texture coordinates.
The lightmap index can be found in the face structure.

I never use the lmindex and lmstart values in my engine.
These values are there to allow dynamic lightmaps to be applied to the faces for things like rocket fire, etc.

-dizzyGame Institute InternPlease rate me. :)

This topic is closed to new replies.

Advertisement