Closed jiahaolu97 closed 4 months ago
We implement the evaluation of the SH coefficients, rather than getting RGB values from SH. If you need RGB colors, you simply need to do a conversion:
sh2rgb = ms.compute_sh(shs.permute(0, 2, 1), direction) rgb = torch.clamp_min(sh2rgb + 0.5, 0.0)
Now, display your image and see!
Thank you @yGaoJiany for clarification!
Indeed we can directly train a RGB or SH model from scratch using your kernels. I found it still has some problems to convert a SH model trained from original 3DGS repo to visualize in this repo, but it is no big problem.
I tried to render with msplat from 3D Gaussian point cloud, and it seems work. After optimization with orginal 3DGS repo (https://github.com/graphdeco-inria/gaussian-splatting), I did a replacement with msplat (see issue #6), and then run:
python render.py -m "output/gs" --skip_train
Hi, thank you for contributing this repo!
When I use your
compute_sh
cuda kernel, I found the converted rgb values are not correct ... I am not sure if I misused the cuda kernel:Here, I give the view_dirs as the normalized vector of (gaussians.xyz - camera_center), where
camera_center
is the camera position in world coordinates. To be more specific,The
rgbs
computed this way does not has range [0,1] (min value around -1.7 and max value around 2.9).Here the spherical harmonics coefficients are from the Gaussian model ply trained by the original 3DGS code. The settings are
sh_degree = 3
, so spherical harmonics has3 * (3 + 1) ** 2 = 48
channels.Anyone has an idea?