<p>I implemented a MicrofacetTransmission in nori. But it can not pass all Chi2test when alpha is large(&gt;= 0.4 or ?),part of chi2test is passed.And I can not found the problem.Can someone help me?
<a href="http://wjakob.github.io/nori/" rel="nofollow noreferrer">Nori framework</a>.
Code is below:
<a href="https://i.sstatic.net/FD0cd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/FD0cd.png" alt="sample function" /></a></p>
<p><a href="https://i.sstatic.net/S6PFV.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/S6PFV.png" alt="pdf function" /></a>
<a href="https://i.sstatic.net/1CTLZ.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/1CTLZ.jpg" alt="rendered image" /></a></p>

CC BY-SA 4.0
2021-12-29T20:33:06.890Z
I suggest adding some example pictures. It may help uncovering the problem faster.
ivokabel
CC BY-SA 4.0
2021-12-30T03:23:56.407Z
@ivokabel Well, I added a rendered image.
bin guo
CC BY-SA 4.0
2022-01-01T13:59:15.020Z
Not exactly sure what hypothesis are you testing in your Chi2 test, but it seems that you use the basic microfacet model which only deals with directly scattered ligh and neglects multiple scattering events on the surface. This is not a big deal for low roughnes parameters, but at higher values you get noticeable loss of energy. That's probably why the sphere is so dark. This is pretty much expected behaviour and if you want something better you'll need to implement some kind of energy reinjection method.
ivokabel
CC BY-SA 4.0
2022-01-10T12:52:56.550Z
null hypothesis
bin guo
<raytracing><pathtracing><pbr><microfacet><bsdf>
Why my bsdf can not pass Chi2test?
bin guo
# Why my bsdf can not pass Chi2test?

(Asked by: username_0 on 2021-12-23)

I implemented a MicrofacetTransmission in nori. But it can not pass all Chi2test when alpha is large(>= 0.4 or ?),part of chi2test is passed.And I can not found the problem.Can someone help me?
[Nori framework](http://wjakob.github.io/nori/).
Code is below:
[![sample function](https://i.sstatic.net/FD0cd.png)](https://i.sstatic.net/FD0cd.png)

[![pdf function](https://i.sstatic.net/S6PFV.png)](https://i.sstatic.net/S6PFV.png)
[![rendered image](https://i.sstatic.net/1CTLZ.jpg)](https://i.sstatic.net/1CTLZ.jpg)

**Tags:** raytracing, pathtracing, pbr, microfacet, bsdf

> **Comments:**
> **username_1**: I suggest adding some example pictures. It may help uncovering the problem faster.  
> **username_0**: @username_1 Well, I added a rendered image.  
> **username_1**: Not exactly sure what hypothesis are you testing in your Chi2 test, but it seems that you use the basic microfacet model which only deals with directly scattered ligh and neglects multiple scattering events on the surface. This is not a big deal for low roughnes parameters, but at higher values you get noticeable loss of energy. That's probably why the sphere is so dark. This is pretty much expected behaviour and if you want something better you'll need to implement some kind of energy reinjection method.  
> **username_0**: null hypothesis  

---

## 0 answers

