Gaussian Splat in VR in Unity Enquiry

Hey everyone, I really love GitHub - aras-p/UnityGaussianSplatting: Toy Gaussian Splatting visualization in Unity for Unity, but I’m having trouble figuring out how to import UnityGaussianSplatting as a custom package for my own VR project instead of using the sample project from Aras. Does anyone have any suggestions? Thanks!

I use Unity 6 with the Universal Render Pipeline (URP). I want to import the GSfile into my VR project. I unzipped the UnityGaussianSplatting-main folder and only copied the entire PACKAGE folder into my project path under ASSETS/GAUSSIANSPLAT.

The creation of the GaussianSplatAsset works, but when I try to add the Data Asset, I encounter the following errors:

NullReferenceException: Object reference not set to an instance of an object
GaussianSplatting.Runtime.GaussianSplatRenderer.InitSortBuffers (System.Int32 count) (at Assets/UnityGaussianSplatting/Runtime/GaussianSplatRenderer.cs:428)
GaussianSplatting.Runtime.GaussianSplatRenderer.CreateResourcesForAsset () (at Assets/UnityGaussianSplatting/Runtime/GaussianSplatRenderer.cs:407)
GaussianSplatting.Runtime.GaussianSplatRenderer.Update () (at Assets/UnityGaussianSplatting/Runtime/GaussianSplatRenderer.cs:612)

I apologize for my questions, but I would be really appreciate if you can help me:

  1. Is there a way to import UnityGaussianSplatting as a Unity Package to use in my own project?
  2. Based on the error above, could it be due to missing files that I didn’t copy into the correct path?

Thank you!

I ran into similar problems recently. There are still some Gotcha things for getting aras-p’s gaussian splatting package to work in VR after the VR port has been merged. The best way to debug is to read through the setup steps in the VR feature pull request and figure out what you missed in the process.

To answer your questions:

  1. Instead of using the “Assets” folder, you can copy the package folder in the original repo to the “Packages” folder of your own project. You can find more info on how to install local packages from Unity’s UPM documentation

  2. The sorting algo in the gaussian splat package is not supported on Win DX11 which is the default Graphics API for most Unity projects. You can change the graphics API to DX12 or Vulkan in the player settings.