如何正确钳制贝克曼分布 [英] How to properly clamp beckmann distribution

查看:179
本文介绍了如何正确钳制贝克曼分布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试实现Microfacet BRDF阴影模型(类似于Cook-Torrance模型),并且对本文中定义的Beckmann分布存在一些麻烦:

我的问题是,此分布通常返回令人讨厌的大值,尤其是当ab非常小时.

例如,贝克曼分布用于根据以下公式计算生成微面法线M的概率:

概率必须在[0,1]范围内,如果贝克曼分布给我的值大于或等于1000000000,那么如何使用上面的函数在这个范围内得到一个值?

那么有一种适当的方式来限制发行版吗?还是我误会它还是概率函数?如果值超过1,我尝试将其简单地钳位为1,但这并没有真正给我我想要的结果.

解决方案

我遇到了与您相同的问题.

如果您阅读

http://blog.selfshadow.com/publications/s2012-shading-course/hoffman/s2012_pbs_physics_math_notes.pdf

http://blog.selfshadow.com/publications/s2012-shading-course/hoffman/s2012_pbs_physics_math_notebook.pdf

您会发现这是完全正常的.要引用链接:

"BeckmannΑb参数等于RMS(均方根)微面坡度.因此,其有效范围是从0(非包含–0对应于理想的镜面或Diracδ),并导致除以0的误差. Beckmann公式)以及高达任意高的值.值1并没有特殊意义-这仅表示RMS斜率是1/1或45°.(...)"

还有另一句话:

"通过微刻面正态分布函数D(m)定义了微刻面方向的统计分布.与F()不同,D()的值不限于0到1之间,尽管该值必须为非负数,它们可以任意大(表示法线指向特定方向的微面浓度非常高).(...)"

您应该在Google上搜索Self Shadow的基于物理的阴影"课程,该课程包含许多有用的材料(每年都有一篇博客文章:2010、2011、2012和2013)

I am trying to implement a Microfacet BRDF shading model (similar to the Cook-Torrance model) and I am having some trouble with the Beckmann Distribution defined in this paper: https://www.cs.cornell.edu/~srm/publications/EGSR07-btdf.pdf

Where M is a microfacet normal, N is the macrofacet normal and ab is a "hardness" parameter between [0, 1].

My issue is that this distribution often returns obscenely large values, especially when ab is very small.

For instance, the Beckmann distribution is used to calculate the probability of generating a microfacet normal M per this equation :

A probability has to be between the range [0,1], so how is it possible to get a value within this range using the function above if the Beckmann distribution gives me values that are 1000000000+ in size?

So there a proper way to clamp the distribution? Or am I misunderstanding it or the probability function? I had tried simply clamping it to 1 if the value exceeded 1 but this didn't really give me the results I was looking for.

解决方案

I was having the same question you did.

If you read

http://blog.selfshadow.com/publications/s2012-shading-course/hoffman/s2012_pbs_physics_math_notes.pdf

and

http://blog.selfshadow.com/publications/s2012-shading-course/hoffman/s2012_pbs_physics_math_notebook.pdf

You'll notice it's perfectly normal. To quote from the links:

"The Beckmann Αb parameter is equal to the RMS (root mean square) microfacet slope. Therefore its valid range is from 0 (non-inclusive –0 corresponds to a perfect mirror or Dirac delta and causes divide by 0 errors in the Beckmann formulation) and up to arbitrarily high values. There is no special significance to a value of 1 –this just means that the RMS slope is 1/1 or 45°.(...)"

Also another quote:

"The statistical distribution of microfacet orientations is defined via the microfacet normal distribution function D(m). Unlike F (), the value of D() is not restricted to lie between 0 and 1—although values must be non-negative, they can be arbitrarily large (indicating a very high concentration of microfacets with normals pointing in a particular direction). (...)"

You should google for Self Shadow's Physically Based Shading courses which is full of useful material (there is one blog post for each year: 2010, 2011, 2012 & 2013)

这篇关于如何正确钳制贝克曼分布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆