NJU-3DV / Relightable3DGaussian

[ECCV2024] Relightable 3D Gaussian: Real-time Point Cloud Relighting with BRDF Decomposition and Ray Tracing
https://nju-3dv.github.io/projects/Relightable3DGaussian/
Other
376 stars 24 forks source link

Calculation of incident_dir #25

Open yyzzyy78 opened 3 months ago

yyzzyy78 commented 3 months ago

Thanks for the great job! When reading the calculation of the incident direction in render_equation.cu, I don't understand the following calculation:

https://github.com/NJU-3DV/Relightable3DGaussian/blob/77827626db514d59b390da2474de5d71be61a2e6/r3dg-rasterization/render_equation.cu#L100C1-L114C11

It seems that z_s = {x, y, z} is a sampled point on a unit sphere, an the rotation matrix is computed based on normal vector. But I can't understand how to calculate the rotation matrix R, which R is used as: z_s=matmul(R,z_s).

I'm looking forward to your reply!