occlusion() and distribution

   4025   5   0
User Avatar
Member
4256 posts
Joined: July 2005
Offline
Just a little FYI,
I was playing around and noticed that occlusion() also supports the optional “distrubtion” parameter (uniform or cosine). According to the help only irradiance() supports it.

Attachments:
cosine.png (63.2 KB)
uniform.png (66.2 KB)

if(coffees<2,round(float),float)
User Avatar
Member
1002 posts
Joined: July 2005
Offline
What you've noticed is actually a bug, which is fixed for the next version of Houdini 8.0 (8.0.500). The “uniform” distribution has actually been the behavior of the occlusion() or irradiance() functions for earlier versions of Houdini, with the “cosine” distrubution being a new addition used in H8 that produces somewhat less noisy results. In theory, both distributions should converge to the same result - which you've noticed is not the case.

This change will affect all scenes that use GI, and should result in more accurate (and possibly faster) calculations.

Andrew
User Avatar
Member
941 posts
Joined: July 2005
Offline
andrewc
What you've noticed is actually a bug, which is fixed for the next version of Houdini 8.0 (8.0.500). The “uniform” distribution has actually been the behavior of the occlusion() or irradiance() functions for earlier versions of Houdini, with the “cosine” distrubution being a new addition used in H8 that produces somewhat less noisy results. In theory, both distributions should converge to the same result - which you've noticed is not the case.

Thanks Andrew!

I just tried 8.0.500, and “cosine” now looks like a proper cosine distribution (the way “uniform” used to look).
But now I have to ask the obligatory question: Why keep around a distribution named “uniform” that is in fact not uniform but cosine?
Wouldn't it be better to make the “uniform” distribution be actually uniform and avoid future confusion?

Thanks.
Mario Marengo
Senior Developer at Folks VFX [folksvfx.com] in Toronto, Canada.
User Avatar
Member
1002 posts
Joined: July 2005
Offline
In fact, we do have a third distribution that will produce a nonweighted uniform distribution. You can do this with the “nonweighted” or just “n” distrubution parameter. I agree that there is some confusion in the names, maybe this should be improved in a future version.

Andrew
User Avatar
Member
4256 posts
Joined: July 2005
Offline
andrewc
I agree that there is some confusion in the names








http://en.wikipedia.org/wiki/Exploding_head [en.wikipedia.org]
if(coffees<2,round(float),float)
User Avatar
Member
941 posts
Joined: July 2005
Offline
andrewc
In fact, we do have a third distribution that will produce a nonweighted uniform distribution. You can do this with the “nonweighted” or just “n” distrubution parameter. I agree that there is some confusion in the names, maybe this should be improved in a future version.

OK. I just tried “n” and it does give me a uniform distribution.
But yeah, I think that, barring a renaming of the distributions (which would obviously be the best), the docs should be updated to reflect all of this.

As a temporary thing, I've added some “user notes” to the occlusion and irradiance functions to warn other users.

Thanks Andrew.
Mario Marengo
Senior Developer at Folks VFX [folksvfx.com] in Toronto, Canada.
  • Quick Links