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

some confusion about source #30

Closed blacksino closed 1 year ago

blacksino commented 1 year ago

Hello, I noticed that in the source code, you first used nvdiffrast to compute the global positions. May I ask if the use of rasterization rendering is for the initialization of ray tracing? I'm not quite sure why nvdiffrast is used in a rendering process that's based on ray tracing.

jmunkberg commented 1 year ago

Hello @blacksino ,

We leverage nvdiffrast to compute (differentiable) primary visibility through rasterization and only apply ray tracing for the shadow rays traced in the hemisphere at each shading point.

It is certainly possible to also use differentiable ray tracing, e.g., http://people.csail.mit.edu/sbangaru/projects/was-2020/ for the primary visibility, but it is often a bit more computationally expensive, and nvdiffrast worked well for our purposes.

blacksino commented 1 year ago

Thank you for your kind explaination