   Light volumes
  Hi,Anyone know how work light volumes information stored in a quake 3 map?I havent found any information about it.Thanks in advance.   
  This isn't really a 'general programming' question, which may be why it slipped under the radar here. Anyway, the light volumes in Q3 occupy a regular 3D grid. The size of the cells is hard-coded (64x64x128 or something like that - they're taller than they are wide, I think); the dimensions of the grid are then determined from the size of the 'world model' bounding box and the per-cell dimensions.Each cell contains information about the average light for that cell in terms of ambient, diffuse, and diffuse direction. Like other 'direction' vectors in Q3, the light direction vector is encoded as two bytes in azimuth/elevation form.During gameplay, the lighting for entities is determined by trilinear interpolation of the values of the 8 nearest cells with respect to the entity's position.The Q3 source code is not that easy to sort through, but all the code for computing and applying the light volumes can be found there.[Edit: More info here.]   