Gaussian Splat with Unity

Hi guys,

I am totally new to Needle. I have some knowledge with Unity, but I am not a pro :slight_smile:

I would like to use Gaussian Splats in my app, but I dont know how. There is no SplatRenderer in the Unity project. I cant find much more infos (I could understand) in the documentation.

Thank you for your help and my regards

Alex

Hello Alex,

To use Gaussian Splats in your Needle Engine application, you’ll need to utilize the SplatRenderer component specifically designed for this purpose. It appears that the resources are available in the Needle Engine samples. Here’s a brief guide on how to integrate it:

  1. Install Gaussian Splatting Package: Make sure you have the Gaussian Splatting package added to your project. You can find it in the Needle Engine samples repository.

  2. Implementing SplatRenderer: You can create a new GameObject in your Unity scene and add the SplatRenderer component. This component handles the rendering of Gaussian splats. Here’s a basic representation of how to set it up in code for a Unity script:

    import { SplatRenderer } from "@needle-tools/engine";
    
    // Assuming you're in a MonoBehaviour script
    public class GaussianSplatSetup : MonoBehaviour
    {
        private SplatRenderer splatRenderer;
    
        void Start()
        {
            // Create and configure the SplatRenderer
            splatRenderer = gameObject.AddComponent<SplatRenderer>();
            // Set properties such as splat size, color, etc.
            splatRenderer.size = 1.0; // Example size
            splatRenderer.color = Color.white; // Example color
        }
    }
    
  3. Referencing Documentation and Samples: Check the Needle Engine documentation and samples repository for more examples and detailed usage.

  4. Explore Sample Scenes: Look at the provided samples specifically related to Gaussian Splatting to understand how the renderings are configured. You can refer to the SplatRenderer located at the following path for more configuration options: SplatRenderer.ts (see the documentation).

Feel free to ask if you need more specific examples or have trouble with any step!

3 replies left
thread_5FeZXoW4A8t67p13lIQOVEPP
Reply to this message to continue the conversation

Hi Alexander,

did the bot reply help you? You need to install the samples package. You can do that in Unity e.g. via the menu item “Needle Engine/Explore Samples” or Unity’s Package Manager and search for Needle Engine Samples or by downloading the installer from https://samples.needle.tools

@marcel Thank you for the answer, it works for me :slight_smile:

This topic was automatically closed 13 days after the last reply. New replies are no longer allowed.