huggingface / gsplat.js

JavaScript Gaussian Splatting library.
MIT License
1.33k stars 87 forks source link

Does it work with polycam models? #15

Closed karen-pal closed 10 months ago

karen-pal commented 11 months ago

Hello! Thank you for your work, it looks very promising. Got it working with the README file... Just tried it with a .ply object out of polycam and got error

Uncaught (in promise) RangeError: byte length of Float32Array should be a multiple of 4
    at new Float32Array (<anonymous>)
    at R.setData (Scene.ts:43:25)
    at W.LoadAsync (Loader.ts:31:15)
    at async main (main.ts:11:5)

with what file type is it compatible? Thanks!

dylanebert commented 11 months ago

Are you using SPLAT.PLYLoader? You can see an example of converting .ply to .splat here: https://github.com/dylanebert/gsplat.js/blob/main/examples/ply-converter/src/main.ts

sameeryel commented 10 months ago

Are you using SPLAT.PLYLoader? You can see an example of converting .ply to .splat here: https://github.com/dylanebert/gsplat.js/blob/main/examples/ply-converter/src/main.ts

Is it possible for you to create a working implementation of this and share it as a Codepen space ?

dylanebert commented 10 months ago

Sure, here is an example loading and converting a PLY file from URL: jsfiddle

sameeryel commented 10 months ago

Sure, here is an example loading and converting a PLY file from URL: jsfiddle

Thank You So Much! Great Project.