guduxiaolang / GIR

Official implementation of "GIR: 3D Gaussian Inverse Rendering for Relightable Scene Factorization".
5 stars 0 forks source link

rasterization with mask #1

Open JiatengLiu opened 1 week ago

JiatengLiu commented 1 week ago

Hi, what a wonderful work! I want to add the mask to the rasterization process, I see you did it like this, can you upload this part scripts? bests

guduxiaolang commented 1 week ago

I hope this helps. For each Gaussian, you can compute the view direction using the means3D and the camera center. Then, you can calculate n_dov_v from the view direction and the shading normal, which is the shortest axis. The mask is determined by whether n_dov_v is greater than 0. Finally, you can apply the mask to the shading color (diffuse_color + specular_color) by multiplying them together.