47 lines
1.9 KiB
Markdown
47 lines
1.9 KiB
Markdown
# Unity VFX Graph Gaussian Splatting Renderer
|
|
|
|
A Unity implementation of Gaussian splatting using VFX Graph for real-time rendering. This project uses Unity's VFX Graph system as an alternative to the EWA algorithm to provide more flexibility in accessing the splat's data structures.
|
|
|
|
## Installation
|
|
|
|
Import this project into Unity or copy the `Assets/vfx-graph-gs/` folder to your project
|
|
|
|
## Usage
|
|
|
|
### Importing PLY Files
|
|
|
|
1. Place your PLY file containing Gaussian splat data in your project
|
|
2. The custom `SplatImporter` will automatically process the file
|
|
3. A VFX prefab will be generated that you can drag on to a scene
|
|
|
|
## File Structure
|
|
|
|
```
|
|
Assets/vfx-graph-gs/
|
|
├── Scripts/ # Core C# implementation
|
|
│ ├── SplatData.cs # Data container and GPU buffer management
|
|
│ ├── SplatDataBinder.cs # VFX Graph integration
|
|
│ ├── SplatDataInspector.cs # Custom inspector for SplatData
|
|
│ └── SplatImporter.cs # PLY file importer with burst compilation
|
|
├── VFXGraphHLSL/ # GPU shader functions
|
|
│ ├── CalculateAxes.hlsl # Quaternion to matrix conversion
|
|
│ ├── CalculateSH.hlsl # Spherical harmonics calculations
|
|
│ └── GetMajorAxes.hlsl # Projection axis selection
|
|
├── SplatVFX.vfx # Main VFX Graph asset
|
|
└── [PLY files] # Gaussian splat data files
|
|
```
|
|
|
|
## License
|
|
|
|
This project is licensed under the MIT License. See the LICENSE file for details.
|
|
|
|
## References
|
|
|
|
- [Original Gaussian Splatting Code](https://github.com/graphdeco-inria/gaussian-splatting)
|
|
- [SplatVFX](https://github.com/keijiro/SplatVFX)
|
|
|
|
|
|
> ## Additional Notes
|
|
> - The importer processes files in 256MB chunks to handle large files
|
|
> - Presently, the splat file *must* have all splat data present, including spherical harmonics. It currently only supports `float` type variables and binary-encoded files.
|