mkkellogg / GaussianSplats3D

Three.js-based implementation of 3D Gaussian splatting
MIT License
1.37k stars 168 forks source link

Splat scale feature #144

Closed Bishadkoju closed 5 months ago

Bishadkoju commented 7 months ago

Hi, would it be possible to implement "Splat Scale" feature as in Unity GaussianSplatting Viewer .

Screenshot 2024-03-05 at 21 48 33

Also, Instead of showing the mesh cursor, I would like to change the color of the splat that the mouse is hovering. How can i implement this ? Thank you.

mkkellogg commented 6 months ago

This would be a pretty easy thing to control through an API function, something like Viewer.setSplatScale(). I will try to add a function like that soon :)

Bishadkoju commented 6 months ago

Also , in the current implementation would it be possible to change the color of a single or multiple splats in runtime? could you guide me through it ? I'm trying to implement something like this feature (from supersplat). Thanks;

Screenshot 2024-03-15 at 16 26 47
mkkellogg commented 6 months ago

I'm including a function to set splat scale in the branch I'm about to merge: https://github.com/mkkellogg/GaussianSplats3D/pull/177. The function is SplatMesh.setSplatScale() As for changing the color of specific splats, that will be more work, and I'll leave it up to you to implement that :) To do that you'd have to follow a similar approach as sending any of the other splat data to the shader. I would store a boolean to designate whether or not a splat is selected in one of those data textures.

Bishadkoju commented 6 months ago

Sure, thank you :)

nosy-b commented 6 months ago

Oo fun I added a setSplatScale on my code the other day :) Though I didn't find a way in the shader to make splats look like pointclouds when small (dot/circle and not ellipse), I didn't find a way to discard from a length to center quad nor force the scaleX to equal scaleY . if you got an idea that would be awesome @mkkellogg :)

mkkellogg commented 6 months ago

In the branch I'm about to merge (https://github.com/mkkellogg/GaussianSplats3D/tree/orthographic_projection) I'm adding a function to enable point-cloud rendering, where each splat is rendered as a circle: SplatMesh.setPointCloudModeEnabled(), which will hopefully solve that issue :)

mkkellogg commented 5 months ago

These methods are now in the latest release: v0.3.7. Let me know how they work out for you!

mkkellogg commented 5 months ago

I'm going to close this for now, let me know if you encounter any trouble with the updates!