bkaradzic/bgfx

xx-splat - 3D Gaussian Splatting for Real-Time Radiance Field Rendering

bkaradzic opened this issue ยท 11 comments

Port WebGL 3D Gaussian Splatting technique to bgfx as an example:

https://github.com/antimatter15/splat

image

image

I'm on it

@Seyedof check these articles too:
https://aras-p.info/blog/2023/09/13/Making-Gaussian-Splats-smaller/
https://aras-p.info/blog/2023/09/27/Making-Gaussian-Splats-more-smaller/

Also need to find one or few smaller in data-size data sets for example. We don't want to bloat repo with 40+MiB data sets.

For example these data sets are around 13MiB each:
https://gsplat.tech/materials/
https://gsplat.tech/lego/

@bkaradzic
Thanks for the links, yeah I've seen Aras's work on shrinking splat data, he uses textures.
I tend to keep this as simple as I can, since it's just an example.
Regarding data file sizes, the train scene is almost 32mb, the small files you sent are around 13mb.
The output quality is very sensitive to splat density, so for good looking scenes like this Train and the truck we should accept the data size.

There's also a workaround, I can fetch the splat file from http instead of local file system, no need to put it inside repo.

I tend to keep this as simple as I can, since it's just an example.

Yeah, simple is better for examples.

There's also a workaround, I can fetch the splat file from http instead of local file system, no need to put it inside repo.

I would avoid this because it's not guaranteed to be available in the future.

@bkaradzic
It's almost done, the only problem is I couldn't make it work in Direct3D, only works in OGL, it that ok to create a pull request?

What's the issue with D3D? Where is your branch? I can take a look.

What about Vulkan? I thought OpenGL support was EoL

What's the issue with D3D? Where is your branch? I can take a look.

@bkaradzic Sorry I was too busy in past two weeks, just pushed my changes to a fork, here you can see it:

https://github.com/Seyedof/bgfx-gaussian

It works in both OpenGL and Vulkan and I assume it works for all the OGL brid (like WebGL,...) as well, but not on Direct3D family. This code needs a final minor cleanup pass to create a PR/MR on bgfx upstream, please take a look into it and let me know if you figure out how to fix d3d problem and I will fix it quickly and raise a PR.

To my understanding the problem might come from difference in D3D and GL matrix layout or the dynamic vertex buffer is not uploaded correctly or per-instance vertex layout is not right (based on some experiments I ran).

Thanks it worked after fixing this and with some more changes in shader, will clean up the code and raise a PR shortly.

Few other things I noticed:

  • use bx::tan
  • fix resource leaks at exit