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

.spz loading errors #421

Closed
miranbrajsalate opened this issue Feb 13, 2025 · 9 comments
Closed

.spz loading errors #421

miranbrajsalate opened this issue Feb 13, 2025 · 9 comments

Comments

@miranbrajsalate
Copy link

miranbrajsalate commented Feb 13, 2025

Hi @mkkellogg :) I've started playing around with .spz compressed files a bit and found an error when trying to load the examples from Niantic at this link: https://github.com/nianticlabs/spz/tree/main/samples.

I've tested out both examples (the lizard and the raccoons), but both yield the following error when using the demo viewer from the latest main (0.4.7) and dev branches:
Image

Do you know if their compression method is something that's just not supported by the viewer yet? I've also tested them in the 8th wall online viewer and both seem to work fine: https://scaniverse.8thwall.app/model-viewer/.

I've also tested on compressing\converting my own splats to .spz using https://github.com/arrival-space/spz-js. They do load in the 8th wall loader, but not in the demo project (it fails with the same error as the one above).

I'm also curious which .spz library you'd recommend for compressing the .ply.

Thank you in advance!

@mkkellogg
Copy link
Owner

Hmm, I wonder if has something to do with your browser, OS, or viewer settings? Those two .SPZ files load fine for me in Mac OS & Chrome using the default viewer settings:

Image

I'll test with some other combinations of OS, browser, & viewer settings to see if I can reproduce the error.

@miranbrajsalate
Copy link
Author

Oh, interesting. Thank you for looking into it. I've got Windows 10 x64 Professional, and tested it out on Chrome 133.0.6943.99 (Official Build) (64-bit) and Edge 133.0.3065.59 (Official build) (64-bit).

Let me set it up on my Mac to see if it'll work there.

@miranbrajsa
Copy link

miranbrajsa commented Feb 13, 2025

Just tested it out on Apple M1 Pro, Sequoia 15.0 on Chrome 133.0.6943.54 and Safari 18.0 with a fresh npm install & npm run build, and I'm getting the same errors as above. I've also tested it out on the web-deployed version of the viewer here, but still getting the same error:

Image

@miranbrajsa
Copy link

I would just like to add, that if I use the viewer as a package, and try to load the .spz scene in a DropInViewer everything works (apart from the progress update as mentioned in #414.

@meditation-error
Copy link

meditation-error commented Feb 13, 2025

I also tested the file in the demo viewer and got the same Array buffer error as above. (Windows 11, chrome)
But when I upload the file to our server and view it on our website (0.4.7 regular mode, not dropInMode), I see a couple of different errors:

  • GaussianSplats3D.js:3 Error decompressing gzipped data: TypeError: Failed to fetch
  • GaussianSplats3D.js:3 [SPZ ERROR] loadSpzPacked: decompression error TypeError: Failed to fetch
  • GaussianSplats3D.js:3 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'shDegree')

See console.log https://voluma.ai/view/jack/x/lizard

Note: we always load splats with SH=2, regardless of the file, maybe that causes the 3rd error ? although I havent seen that error with other files before. and all .spz files from scaniverse I tried seem to load fine.

@mkkellogg
Copy link
Owner

Ok I was also getting the error on my online demo page, but I pushed a fix and now that works for me too (The fix was to make sure that GaussianSplats3D.SpzLoader was used to load the file, which usually happens automatically because of the .spz extension, but my online demo code is weird 🙂 ). @meditation-error I noticed the link to the .spz on your page above is https://uploads.voluma.ai/files/jack/x/hornedlizard.spz, but that for some reason takes me to github to view the file? In the console it looks like that request is returning HTML, not the .spz file:

Image

@meditation-error
Copy link

Ah, I'm sorry. I actually realized I downloaded the html instead of the file when it didn't work at first. I then redownloaded it the right way, but I somehow messed up reuploading 😢

The correct file works fine now, both on the demo page as on my site!

@miranbrajsalate
Copy link
Author

Thank you @mkkellogg, I can also confirm that the fix works on your project page.

@mkkellogg
Copy link
Owner

Great! Let me know if you run into this again.

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

No branches or pull requests

4 participants