Skip to content
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

Left and Right eye Occlusion view in Unity #22

Open
ga28299 opened this issue Apr 24, 2024 · 16 comments
Open

Left and Right eye Occlusion view in Unity #22

ga28299 opened this issue Apr 24, 2024 · 16 comments
Labels
question Further information is requested

Comments

@ga28299
Copy link

ga28299 commented Apr 24, 2024

Hi there,
Thank you for creating this plugin. I want to get the left and right eye view in the game view in unity. How do I do that? Currently I select the GaussianSplattingVR scene then add the Gaussia Splatting Camera script using add component > add the render and depth material parameters to get the one camera view of the splats.

@Peamon
Copy link
Member

Peamon commented Apr 25, 2024

In the GaussianSplattingVR scene you already have a camera.
Just plug you XR device press play and change the Game view render mode in unity for "Occlusion Mesh".

The option is above statistic panel in this image : https://github.com/clarte53/GaussianSplattingVRViewerUnity/blob/master/performance_vr.png

@Peamon Peamon added the question Further information is requested label Apr 25, 2024
@ga28299
Copy link
Author

ga28299 commented Apr 25, 2024

Hey thanks for the quick reply. Is there any way I can get the occluded view without connecting a XR device? Also my inspector after selecting the GaussianSplattingVR scene looks different from the one in the images shared. Here is how it looks:
image

@Peamon
Copy link
Member

Peamon commented Apr 26, 2024

No you cannot have this view without a headset connected.

Your screen looks ok, it start like this, then you can check the 'point_cloud.ply' button to load the file but if you don't have a headset connected you will not see the gaussian splatting.

If you want to see something start with the GaussianSplattingCam scene that is a scene without headset.

@seblanc
Copy link

seblanc commented Jun 18, 2024

I'm facing the same issue, I would like to load by default a *.ply file, and make sure it is placed at the right location. Otherwise, I always end up with the wrong position/rotation of my gaussian splat.

Is there a way to display it in the scene inspector?

@Peamon
Copy link
Member

Peamon commented Jun 19, 2024

You cannot display it in the inspector but you can deactivate "isXR" on GaussianSplattingCamera Script attached to the camera and press Play without headset connected. With this you can see the gaussian in the game view, move it in inspector and copy paste the transform.

@seblanc
Copy link

seblanc commented Jun 19, 2024

Thanks for your advice Peamon.
In GaussianSplattingCamera.cs, isXr is already equal to false:
10: public bool isXr = false;
I tested the game with isXr = false and with true, without any VR headset connected, but no Gaussian Splat is visible in the "Game" view.
Am I doing something wrong?

@Peamon
Copy link
Member

Peamon commented Jun 19, 2024

First if you don't have done that, you have to download and copy "defaultmodel.bytes" file see Starting in the README.md

Then you need to check that "defaultmodel.bytes" is correctly referenced :

image

Then you have to uncheck the "isXR" on main camera :

image

Then you have to press Play and check the "defaultmodel.ply" checkbox (in red) and then move the object (in blue)
image

@Peamon
Copy link
Member

Peamon commented Jun 19, 2024

To Load your own "ply" file when the application start you just have to add a new GameObject and put the script GaussianSplattingModel on it, like this :

image

@seblanc
Copy link

seblanc commented Jun 19, 2024

This is awesome, it works like a charm. Although the quality is much lower than my original splat file when visualized in other viewers, is there a way to improve the quality?

@Peamon
Copy link
Member

Peamon commented Jun 19, 2024

check the "tex factor" parameter on GaussianSplattingCamera Script put it to 1

@tateAtBricksimple
Copy link

To Load your own "ply" file when the application start you just have to add a new GameObject and put the script GaussianSplattingModel on it, like this :

image

Hi, I'm attempting the same. (Adding my own splat into the GaussianSplattingVR scene by creating an empty object, giving it the GaussianSplattingModel script and assigning my .ply file path to it) but the splat does not load when I hit Play. Does the model have to placed in a specific directory or is there another step that I missed? Thank you.
Screenshot 2024-08-13 171055

@seblanc
Copy link

seblanc commented Aug 14, 2024

Hi,
In my project, the *.ply is located at the root directory (same level as the Asset folder). I'm not sure this makes a difference though. Have you tried loading another splat file to check if this not the issue?

@tateAtBricksimple
Copy link

Moved, the first .ply to the root along with a different one, the UI now populates with both, but selecting either of them does not load them. I did notice in the 'Grabable Gaussian Model' object that gets instantiated that the Model File Path is showing as ".\filename.ply". Removing the .ply's from the root has the default model appear again and that one works. I exported both .ply's from poly.cam using their Splat PLY option. I re-exported using their standard PLY but that did not work either.

@seblanc
Copy link

seblanc commented Aug 16, 2024

If the original (demo) splat ply works, it looks like your custom splat have a problem. Could it be that the origin is not well placed, thus rendering the splat in a totally different location? You can use https://playcanvas.com/supersplat/editor/ to edit your splat file and export it again.

@Peamon
Copy link
Member

Peamon commented Aug 16, 2024 via email

@tateAtBricksimple
Copy link

Thanks seblanc, I didn't know about this tool. No luck though. Imported the splat, the origin was right in the middle, exported and still no dice. For my .ply, how can see if my file uses spherical harmonics of degree 3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants