-
Notifications
You must be signed in to change notification settings - Fork 128
Spherical harmonics support #286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Spherical harmonics support #286
Conversation
…d to the frontend
… and shader input
…er is being read incorrectly, going to pivot
… ../../src/viser/client/src/Splatting/ OMG OMG OMG!
eb6b3f9
to
cf7cdad
Compare
Looking for this support as well to accurately represent trained 3DGS models from for example, nerfstudio! |
… nerfstudio viewer!
Perhaps you could try to merge changes from main to see if it works with the current version of Viser? I have been testing some of this on the current version of Viser on my own fork as well if I can aid in development of this @AntonioMacaronio. |
@Crezle Yes! can definitely do that soon - will try to get back to you in 1 or 2 days on that |
Nice @AntonioMacaronio! I have an attempt to replicate what you've done in the newer version of Viser in #399 if you're interested in checking out before having to handle merge conflicts:) |
be9fb67
to
a704ac6
Compare
Overview of Changes
Inside gaussian_splats.py’s load_ply_file() function:
0 mod 3 => red
1 mod 3 => green
2 mod 3 => blue???
Inside _scene_api.py’s _add_gaussian_splats() :
then send this buffer through the websocket
Updated _messages.py’s GaussianSplatsMessage to include the sh_buffer
Updated MessageHandler.tsx ’s “GaussianSplatsMessage” case to pass the sh_buffer into the SplatObject as a prop
Inside GaussianSplats.tsx:
mergeGaussianGroups now also merges the sh_buffer into one big buffer of spherical harmonic coefficients called combinedSHBuffer. It keeps the original gaussianBuffer by filtering out all spherical harmonic buffers from groupBufferFromId based on whether the key associated with the buffer has “sh_buffer_” as a prefix
useGaussianMeshProps gets this combinedShBuffer and creates a texture buffer to pass into the shader.