Skip to content
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

Gaussian splatting + WebGL #110

Draft
wants to merge 39 commits into
base: main
Choose a base branch
from
Draft

Gaussian splatting + WebGL #110

wants to merge 39 commits into from

Conversation

brentyi
Copy link
Collaborator

@brentyi brentyi commented Oct 1, 2023

I spent some time studying + adapting https://github.com/antimatter15/splat/. It's really cool stuff.

splat.mp4

Work in progress: there's a lot of low hanging fruit for optimization, and the current implementation clashes with the <EffectComposer /> we use for outline/hover effects.

@brgrp
Copy link

brgrp commented Oct 4, 2023

Hey, I just tried to run the demo with Chrome and Firefox, but my display is getting incredibly slow. GPU and CPU usage stays low.

Ubuntu 22.04 LTS + GTX3080
Chrome: 117.0.5938.132 (64-bit)
Firefox: 117.0.1 (64-bit)
NVIDIA-SMI 525.125.06 Driver Version: 525.125.06

Does anyone have an idea what the problem could be?

@jkulhanek
Copy link
Contributor

Can you confirm hardware acceleration is enabled (chrome://gpu)?

@brgrp
Copy link

brgrp commented Oct 6, 2023

Can you confirm hardware acceleration is enabled (chrome://gpu)?

Graphics Feature Status

  • Canvas: Hardware accelerated
  • Canvas out-of-process rasterization: Enabled
  • Direct Rendering Display Compositor: Disabled
  • Compositing: Hardware accelerated
  • Multiple Raster Threads: Enabled
  • OpenGL: Enabled
  • Rasterization: Hardware accelerated
  • Raw Draw: Disabled
  • Skia Graphite: Disabled
  • Video Decode: Hardware accelerated
  • Video Encode: Software only. Hardware acceleration disabled
  • Vulkan: Disabled
  • WebGL: Hardware accelerated
  • WebGL2: Hardware accelerated
  • WebGPU: Hardware accelerated

@brentyi
Copy link
Collaborator Author

brentyi commented Oct 6, 2023

Which splat file are you loading? Splats are currently rendering smoothly in Chrome on both my laptop (M1 Mac) and phone (Samsung S21+).

@brentyi
Copy link
Collaborator Author

brentyi commented Oct 10, 2023

sort timing notes:

# Gaussians 270K 1M
Array.sort 79ms 380ms
JS counting sort 25ms 140ms
C++ counting sort 14ms 53ms

@jkulhanek
Copy link
Contributor

What is the current state of things? Is it ready to be merged soon?

@brentyi
Copy link
Collaborator Author

brentyi commented Dec 29, 2023

I'm leaning toward closing the PR; it's working, but:

  • Still clashes with outline effects / EffectComposer.
  • Doesn't sort properly when there are multiple splat files.
  • Can be optimized a lot. (in particular I would want to move more data into textures, as opposed to attributes)

After I implemented this splatting capabilities have also popped up in external libraries (example: https://github.com/pmndrs/drei#Splat); it may make sense to adapt one of these instead.

@brentyi brentyi mentioned this pull request Jan 4, 2024
@brentyi brentyi force-pushed the main branch 9 times, most recently from 6ea47b3 to 7a6ab4a Compare May 25, 2024 07:14
@brentyi brentyi force-pushed the main branch 3 times, most recently from 47b87b5 to 87062c8 Compare June 2, 2024 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants