NVlabs / nvdiffrecmc

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

How to enable shadow visibility gradient? #37

Open Yingyan-Xu opened 3 weeks ago

Yingyan-Xu commented 3 weeks ago

Hi,

Thanks a lot for the excellent work. I'm trying your code out on a single view case where I want to enable the shadow visibility gradients. How can I do that in the code, i.e. how to reproduce Figure 16 in the paper when the shadow gradient is enabled?

Thanks in advance!

jmunkberg commented 3 weeks ago

Hello @Yingyan-Xu ,

Unfortunately, we did not include the code for the shadow gradient experiments in the code release. Note that most results (except the results presented in Fig 16-17) were generated without shadow gradients as mentioned in Section 3.1.

If you want to experiment with shadow gradients, I would recommend some of the more recent visibility gradient techniques, like WAS/PSDR/projective sampling: https://shuangz.com/projects/psdr-was-sa23/
https://rgl.epfl.ch/publications/Zhang2023Projective

Yingyan-Xu commented 3 weeks ago

Hi @jmunkberg, thanks for the reply! How did you implement the shadow gradients in this project? Did you do edge sampling or one of the area sampling methods you mentioned? Is it possible to share the code?

Thanks in advance!

jmunkberg commented 3 weeks ago

Hello @Yingyan-Xu ,

We used a biased approach for computing shadow gradients for the ablation study, similar to the nvdiffrast antialiasing primitive (https://arxiv.org/abs/2011.03277) but adapted for shadow rays. While we thought it sufficient for motivating that shadow gradients do not significantly contribute in our use cases, we do not recommend using it in the general case, and the research field has progressed substantially since.

Unfortunately we can not release that piece of code. Please refer to the links above for better solutions.