uci-rendering / psdr-cuda

Path-space differentiable renderer
BSD 3-Clause "New" or "Revised" License
157 stars 11 forks source link

[Question] Different change-of-variable ratio implement between paper and code #26

Open LiuLinyun opened 2 years ago

LiuLinyun commented 2 years ago

Hi, I am reading the paper with code. I found change-of-variable ratio used integral (formula 61) in paper is:

$$\intM \int{\Delta M[V]} {\varphi(\boldsymbol{x}_0^S, \boldsymbol{x}_0^D) \mathrm{d}l(\boldsymbol{x}_0^D)\mathrm{d}A(\boldsymbol{x}_0^S) }$$

which means $\boldsymbol{x}_0^S$ fixed and $\boldsymbol{x}_0^D$ is "moving" as Fig.9 in paper. image

But I found the code is implemented as following formula:

$$\intM \int{\Delta M[V]} {\varphi(\boldsymbol{x}_0^S, \boldsymbol{x}_0^D) \mathrm{d}l(\boldsymbol{x}_0^S)\mathrm{d}A(\boldsymbol{x}_0^D) }$$

which seems to fix $\boldsymbol{x}_0^D$ and $\boldsymbol{x}_0^S$ is "moving"

Do these two methods get the same result?

andyyankai commented 2 years ago

I believe the code as well as the CPU code might reverse the name of source subpath and the detector subpath. But I will double check later.