Closed saedrna closed 1 year ago
Hi @saedrna,
The best way to solve it would unfortunately be to update the Optix code and add a similar transform to https://github.com/NVlabs/nvdiffrec/blob/main/render/light.py#L98 whenever evaluating / sampling the probe. It requires plumbing through extra data (e.g. the light transform matrix), which is why we dropped it.
A possible, workaround is to rotate the actual light image. In that case, it would should go just before updating the light_pdf
https://github.com/NVlabs/nvdiffrecmc/blob/main/train.py#L422
You'd have to:
texture
functionI'm not sure how well this would work in practice, as it requires re-sampling the light image, which will cause additional blurring.
We have made a minor modification by adding the rotation matrix (three float3 for each row) and translation vector to the kernel.cu
. It seems to work better for our dataset collected on a stand table. However, as you mentioned, the code now looks much less elegant.
胡教授好,请问可以请教您一些这个repo代码的问题,感觉还是挺复杂的。
In
nvdiffrec
, there is a mode forcamera_space_light
, which is used when an object is placed on a rotating stand table. I noticed that this feature has been removed innvdiffrecmc
. Is it possible to reintroduce this feature without delving into the CUDA/Optix code, and by simply tweaking the light directions in the Python section?