• Advertisement
Sign in to follow this  

Noise Recalculation for Ambient Occlusion

This topic is 597 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 posted this in another area of the forum, but no one was able to give me any feedback. Perhaps here will be better.

 

I have written a shader to successfully do ambient occlusion in XNA and it has given me this result: https://gyazo.com/0bf260d8cdf9853a93440ca1a645eed7

 

The ambient occlusion here is not very intense and that is intentional. My question is should I recalculate my noise map every frame for the more "random" feel of indirect lighting? Or should I just use one static noise map like I currently am. Instead of even recalculating a noise map every time I could just create a coordinate offset every time for the sampling, I guess that's an option. Does anyone here have an opinion or some knowledge if this is commonly done? Or should I leave my shader as is?

Share this post


Link to post
Share on other sites
Advertisement

I don't think there is much benefit to recalculating the random texture every frame.  If anything, you could calculate a random vector once per frame, and then rotate your sampled random vectors around, and you will get a similar effect. 

 

However, if you don't see any artifacts, and you are happy with how it looks, then whey would you be thinking of updating the texture every frame?

Share this post


Link to post
Share on other sites

I found that changing the random vector per frame ended up being too noisy, unless you have a strong blur implemented.  Even with a static camera/scene, you'll still see the ao bouncing around because the random value changes.  If you use the same random value, then in a static scene, the ao will also be static.

Share this post


Link to post
Share on other sites
Thank you both for your input there and I guess I didn't think about how weird that may look on a static scene. I dont think there is any artifacts in the picture I provided so I guess there is no reason to recalculate the noise.

Share this post


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

  • Advertisement