NVlabs / nvdiffrecmc

Official code for the NeurIPS 2022 paper "Shape, Light, and Material Decomposition from Images using Monte Carlo Rendering and Denoising".
Other
363 stars 28 forks source link

Confused about __raygen__rg() #28

Closed cctgem closed 1 year ago

cctgem commented 1 year ago

Hello, thank you for your amazing work first of all! I try to understand the theory about BRDF with MC in your code. I found the pdf before function "process_sample"" is sum of pdf_light and pdf_bsdf, in kernel.cu Line 517 . I really confused about it. In my opinion, it should be only pdf_light when performing light importance sampling and only pdf_bsdf when performing BSDF sampling, so the integral can be one. But if use the sum of pdf_light and pdf_bsdf, the integral of pdf seem to be not equal one when performing MC, thanks.

jmunkberg commented 1 year ago

Thanks @cctgem ,

We are using multiple importance sampling with a set of sampling techniques (bsdf and light importance sampling). Please refer to the paper, section 4.1 for details and relevant citations.

cctgem commented 1 year ago

I got it thanks