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
462 stars 34 forks source link

Question about trace_bvh_cuda #31

Open YanhaoZhang opened 3 months ago

YanhaoZhang commented 3 months ago

Thanks a lot for releasing the code. I would like to ask a quick question about the function trace_bvh_cuda. My understanding is it first calculates the Gaussian candidates based on aabb bounding box. Then calculate the ray-Gaussian to further check if there is an intersection here.

However, I was wondering why you using the following function, which calculates the dot product of (mean-ray_o) * ray_d?

__device__ __host__
inline float ray_intersects(const float3 mean, const float3& ray_o, const float3& ray_d) noexcept
{
    return (mean.x - ray_o.x)*ray_d.x + (mean.y - ray_o.y)*ray_d.y + (mean.z - ray_o.z)*ray_d.z;
}