# "Valve ambient cube"

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

## Recommended Posts

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. Edited by B_old

##### Share on other sites
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.

##### Share on other sites
Thanks for the explanation!

1. 1
2. 2
Rutin
24
3. 3
4. 4
JoeJ
16
5. 5

• 14
• 29
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631773
• Total Posts
3002268
×