"Valve ambient cube"

Started by
1 comment, last by B_old 11 years, 4 months ago
I have a question about the "Valve ambient cube" and what it actually stores. In my implementation I store the average of one 90 degree fov image per (pixel-)face of the ambient cube (weighted by solid angle). According to the formula, axis aligned vectors will look up exactly on face of the cube which means, that I don't cover the entire hemisphere with my sample.
Is that by design or do I actually need different values in my ambient cube, so that each face is the average of the entire hemisphere around that side? Which doesn't really make sense to me, because than the cube would store too much energy so to speak.
Advertisement
For some function defined about a sphere, the ambient cube will store the value of that function in the direction of the 6 major axis directions. So if you're storing irradiance, then you want to store the irradiance about a hemisphere oriented about +X, then -X, then +Y, and so on. This is not "storing too much energy", because when you "look up" an irradiance value from your ambient cube at runtime your value will be the linear combination of 3 values, where the sum of the weights is <= 1. This way if your normal is exactly oriented, you get the exact irradiance value for that direction. Then if the normal is in between the major axis directions, you approximate the value there by blending the "nearby" samples.
Thanks for the explanation!

This topic is closed to new replies.

Advertisement