Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting SG parameter for NDF #13

Closed
HollyDQWang opened this issue Aug 12, 2022 · 4 comments
Closed

Setting SG parameter for NDF #13

HollyDQWang opened this issue Aug 12, 2022 · 4 comments

Comments

@HollyDQWang
Copy link

HollyDQWang commented Aug 12, 2022

Thanks for the great work and releasing the code!

A quick question for the renderer: in line 175 of sg_rendering.py, why did you use $\frac{1}{roughness ^4 \cdot \pi}$ instead of 1 as the value of $\mu$? Are you using Blinn-Phong's model for the shape of D?

@Kai-46
Copy link
Owner

Kai-46 commented Aug 12, 2022

We use disney BRDF; and that \mu term is for energy conservation in this BRDF, I think.

@HollyDQWang
Copy link
Author

I see, thanks so much for the reply! I realized that it is consistent with this Cornell paper on microfacet brdf..

May I ask if you have a source code reference for this part? I checked the Disney paper and I don’t think there’s official code released.

@Kai-46
Copy link
Owner

Kai-46 commented Aug 12, 2022

You might want to check Eq. 8.9 on this page: https://www.pbr-book.org/3ed-2018/Reflection_Models/Microfacet_Models . Note that alpha in that equation equals roughness^2 in this PhySG codebase.

@HollyDQWang
Copy link
Author

Thanks so much! I now see that the alpha term is consistent with definition in Disney brdf :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants