Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

"Valve ambient cube"

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 B_old   Members   

689
Like
0Likes
Like

Posted 26 November 2012 - 12:39 PM

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, 26 November 2012 - 02:50 PM.


#2 MJP   Moderators   

19635
Like
2Likes
Like

Posted 26 November 2012 - 04:27 PM

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.

#3 B_old   Members   

689
Like
0Likes
Like

Posted 27 November 2012 - 07:35 AM

Thanks for the explanation!




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.