Jump to content
  • Advertisement
Sign in to follow this  
B_old

"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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!