Spherical harmonics support#286
Draft
AntonioMacaronio wants to merge 22 commits intonerfstudio-project:mainfrom
Draft
Spherical harmonics support#286AntonioMacaronio wants to merge 22 commits intonerfstudio-project:mainfrom
AntonioMacaronio wants to merge 22 commits intonerfstudio-project:mainfrom
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. |
This was referenced Feb 17, 2025
Author
|
@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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.