-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullReferenceException Error #153
Comments
Dear @aras-p , I hope this message finds you well. I’m reaching out for assistance regarding an issue I’ve encountered with Gaussian Splatting, as I am eager to integrate it into my VR experiences. I attempted to import your Unity package directly via OpenUPM (link), but I continue to experience the same error I encountered earlier: NullReferenceException: Object reference not set to an instance of an object. (same as las week) Would you be able to provide any guidance on how to debug this issue effectively? Here are some steps I’ve already tried or considered based on my observations: Render Pipeline Alignment: Shader Compatibility: Thank you so much for your incredible work on Gaussian Splatting, and I would be deeply grateful for any insights or suggestions to help resolve this issue. Looking forward to your advice! |
Don't quite know how that would happen. If everything is correct, the GaussianSplatRenderer component should have automatically set up all the needed references, under Resources section in the inspector. It should look like the bottom part of this image: How does it look for you @qiangjiadong ? |
Thanks @aras-p ! I really appreciate, |
I'm at loss in how the error could happen for your case :( |
Because I already have my own Unity project, instead of using your github download with test scenes, I imported your Unity package directly via OpenUPM (link), I’m using URP, I got multi-pass and DX12 all set, I will try later to check what are the differences between ur test scenes and my own scenes, will be interesting to hear what potential part I could look into :))) |
@qiangjiadong I guess one way would be to try to debug, i.e. attach a C#/Unity debugger, with breakpoints inside GaussianSplatRenderer OnEnable and Update methods, and step through to see what is happening. First OnEnable should be called (when adding the component or opening the scene), and then Update should get called when you assign the new asset. |
I encountered the same issue. It happened in the Gaussian Example Demo from the repo. The original GaussianSplats object works and renders properly. But when I create an empty object and add Gaussian Splat Renderer component, it does not render the Gaussian splat. Commenting out line 428 seems to work. |
Thank you, @JOHNW02 and @aras-p. This week, I re-downloaded the file and opened Aras' URP scene using the original version 2022.3.47f1. I was surprised to encounter the same errors as before in my Unity 6 file. I would really appreciate it if this could be addressed and potentially fixed. NullReferenceException: Object reference not set to an instance of an object |
I commented out line 428(the if statement) in /package/Runtime/GaussianSplatRenderer.cs. It works for me. Also, to import the package into a URP project, you need to add the URP faetures to your renderer. Check this page: https://github.com/aras-p/UnityGaussianSplatting/blob/main/docs/render-pipeline-integration.md and tutorial: https://docs.unity3d.com/Packages/[email protected]/manual/urp-renderer-feature-how-to-add.html |
@JOHNW02 do you men comment out as screenshot? I got this further error, i think I already added URP features to the render, pls see this: |
I apologise for bothering you, but I ran another test. The original version, 2022.3.47f1, is working again with the URP scene. However, when I reopened the default URP scene in Unity 6, I encountered similar errors as before. Please see the screenshot for reference. I suspect this may be an issue with Unity 6. I would greatly appreciate any assistance in resolving this. Thank you! Execute is not implemented, the pass GaussianSplatting.Runtime.GaussianSplatURPFeature+GSRenderPass won't be executed in the current render loop. |
Should be fixed in latest code in the repository. If any of you still see it, let me know |
@aras-p I am thrilled to inform you that my GS file under your UnityGaussianSplatting works perfectly in VR mode with Unity 6! You have been a lifesaver for me, and I truly appreciate your contributions to the community. Thank you so much! I would like to address one issue and hear your thoughts on it: I need to ENABLE Compatibility Mode (Render Graph Disabled) from the Project Settings. You can find this under Graphics > Pipeline Specific Settings > URP > Render Graph. If I don't do this, I encounter the following error: Execute is not implemented; the pass GaussianSplatting.Runtime.GaussianSplatURPFeature+GSRenderPass won't be executed in the current render loop. I hope this configuration will be suitable for VR developers. What are your thoughts? |
I have no idea about any of that, but it sounds completely unrelated to the current issue, which is about null reference exception. If you see a new / another issue, please open a new issue in github. |
Hi, 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:
Thank you!
The text was updated successfully, but these errors were encountered: