aras-p / UnityGaussianSplatting

Toy Gaussian Splatting visualization in Unity
MIT License
2.24k stars 256 forks source link

Unity camera is not able to capture gaussian splatting except view port #138

Closed Bluebottle10 closed 1 month ago

Bluebottle10 commented 1 month ago

Hi,

Thanks for your effort in getting Unity Gaussian Splatting available. One quick question is that the regular Unity cameras such as Main Camera is not able to render Gaussian Splatting like view port does. Any idea how to fix this? I am just trying to figure out how to render Gaussian Splatting in Main Camera.

Please share your thoughts.

Thanks, Sungshik

aras-p commented 1 month ago

Not sure I understand what is the problem.

Bluebottle10 commented 1 month ago

Thanks for prompt reply. My question is that from the scene view, I see Gaussian Splatted scene perfectly. But when I instantiate a camera and see the splatted scene through the camera, the camera does not see the splatted Scene. It seems the splatted scene is only visible to scene view but not to instantiated camera.

aras-p commented 1 month ago

Ah, so you instantiate some camera at runtime, instead of using the camera that is already in the scene?

Bluebottle10 commented 1 month ago

Well even the "Main Camera" that is already in the scene is not able to see the splatted scene. However, I see perfectly well from the scene view in Unity. So, I am doing the following:

  1. Get the splatted scene that I can see from the scene view (by importing ply)
  2. Click on the "Main Camera" to see its view (Unity shows small window to display the view form the camera)
  3. In the "Main Camera" view, I don't see the splatted scene
aras-p commented 1 month ago

Ahh, you mean the little preview window. Yeah that one does not show it. I have not investigated why. The actual main camera rendering (i.e. game view) should display it just fine, doesn't it?

Bluebottle10 commented 1 month ago

Oh I see. I have not checked it but let me look at it tonight. Thank you so much!!!

Bluebottle10 commented 1 month ago

Thank you. There is no issue anymore

Bluebottle10 commented 1 month ago

Hi I am sorry the issue is still there. I can see the splatted scene through the main camera but when I click on play button, the splatted scene disappears. Is this by the design?

Bluebottle10 commented 1 month ago

Oh, it was only when I put perception cam. Please ignore.