Sign in to follow this  

Quake 3 BSP light volumes

This topic is 2331 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

Has anyone here used them before?

My map has 963171 (141 x 207 x 33) grid points (according to the the QuArK output console).

num_lightvols_x = 141
num_lightvols_y = 207
num_lightvols_z = 33



The grid cell coordinates of an entity at (x,y,z) are:

gridx = (x - models[0].mins[0]) / 64;
gridy = (y - models[0].mins[1]) / 64;
gridz = (z - models[0].mins[2]) / 128 + 0.5f;



I access the light volume at:

gridz * num_lightvols_y * num_lightvols_x + gridy * num_lightvols_x + gridx

But this doesn't give the correct lighting info.

Share this post


Link to post
Share on other sites
It actually says

Grid size = { 112, 96, 160 }

in the QuArK output console, which I have to use instead of {64, 64, 128} to avoid "light grid mismatch" where

lump[lightVolumes].length != numGridPoints * sizeof(lightVolume)

So the grid cell size isn't always 64x64x128?

Share this post


Link to post
Share on other sites

This topic is 2331 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this