I’m interested in using the Gaussian Splats sample with the Unity plugin, and I’d like to display my Gaussian splatting there (which I already have ready). When I attempted to upload my splat (a .ply file) online and then load it via the URL with the SplatRenderer script, it didn’t work.
Ideally, I’d like to use Gaussian splatting directly within the Unity project without needing to upload and download files from the web. How can I do this? The readme didn’t clarify it for me.
Hi, currently you can place your .splat or .ply files into the include
directory of your webproject, and then in Unity on the SplatRenderer component specify the path to it:
Thanks - I’ll try that once I export it to the web and have the exported folder created.
But in the meantime: how can I test it within the Unity Editor environment?
What path should I provide for the local file within the project?
The Gaussian Splatting integration of Needle doesn’t come with a splat renderer for inside Unity or Blender.
If you want to preview splats within Unity, please use one of the available packages for that (e.g. Aras’ GitHub - aras-p/UnityGaussianSplatting: Toy Gaussian Splatting visualization in Unity).
Let’s say I keep the splat/ply file in the server like in the used example.
How’s it possible that the provided link in the project works, but when I upload it to another server, and use the link, it doesn’t work in the web?
As usual, I filled the links within the Path
variable in the SplatRenderer
component.
Thank you for your help!
If you look at the browser console, you can see that you need to configure CORS headers if you want to serve files from other origins than your page.
See Cors warning on hosted build using loadsync function - #3 by hybridherbst for a more complete explanation.
If you’re unable to configure those headers on your hosting solution, I recommend hosting the splat/ply file in the same place as your web app – for example, you can put it locally into the include
folder and load it from a relative path: