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

The lobe of fs is wr rather than normal? #17

Closed
yihua7 opened this issue Oct 17, 2022 · 2 comments
Closed

The lobe of fs is wr rather than normal? #17

yihua7 opened this issue Oct 17, 2022 · 2 comments

Comments

@yihua7
Copy link

yihua7 commented Oct 17, 2022

Hi Kai, I really appreciate your excellent work!
I just have a question about the implementation of sg rendering code: here

final_lobes, final_lambdas, final_mus = lambda_trick(lgtSGLobes, lgtSGLambdas, lgtSGMus, warpBrdfSGLobes, warpBrdfSGLambdas, warpBrdfSGMus)

warpBrdfSGLobes here is the reflection direction of views, rather than surface normals.
But in the paper, Eq(8) tells that the Gaussian is aligned with surface normal. Is this a little bug or something I misunderstand?

Screenshot from 2022-10-17 23-43-22

By the way, I am looking forward to your future works!

@Kai-46
Copy link
Owner

Kai-46 commented Nov 8, 2022

Here's an intuitive way to think about the spherical warping of the brdf lobe.

Imagine we want to render the color for a specific viewing direction w_o; then the rendering equation says that we need to sum up the contributions of light coming from all directions w_i that lies on the hemisphere centered around surface normal n.

Of course this is going to be a weighted sum given the surface BRDF, as light from the reflected viewing direction is likely to contribute most (think about mirror reflection)

Hence, in spherical Gaussian model, we place a spherical Gaussian around the reflected viewing direction to model the contribution strength of lights coming from different directions.

To read more about the mathematical derivations, please check Eq. 16 of this SG paper: https://www.microsoft.com/en-us/research/wp-content/uploads/2009/12/sg.pdf

This blog also has nice explanations of the SG-based rendering: https://therealmjp.github.io/posts/sg-series-part-4-specular-lighting-from-an-sg-light-source/

@yihua7
Copy link
Author

yihua7 commented Nov 21, 2022

Thanks Kai! The answer is really clear and makes sense.

@yihua7 yihua7 closed this as completed Nov 21, 2022
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