lumalabs / luma-web-examples

Luma Interactive Scenes (captures) Web Examples, use lumalabs.ai captures directly in your three.js or other WebGL projects!
https://lumalabs.ai/luma-web-library
MIT License
327 stars 36 forks source link

Library looking for specific files to load #6

Closed GitHubDragonFly closed 9 months ago

GitHubDragonFly commented 9 months ago

I have given it a try and created an online Luma SPLAT Viewer using this library and three.js r159.

It currently only supports URL loading and it does work when using Luma URLs, like this:

The issue can be seen in the attached picture below when I use a URL like this:

The library is treating this URL as a "folder", or a location that hosts multiple files, and is trying to get 1 bin and 3 json files out of it.

If I try to use the WebGL Gaussian Splat Viewer then it works, and the following URL can just be entered in a browser:

This legobrick.splat file is just a lego brick made of points and was created from a ply file which was converted to splat by using the above mentioned WebGL Gaussian Splat Viewer.

The library also does not seem to be able to handle local blob URLs either, created with URL.createObjectURL( splat_file ) , which is another issue.

I might be doing something wrong all together but just looking for a second opinion.

SPLAT Viewer - Error

GitHubDragonFly commented 9 months ago

I just noticed that your repository is specifically stating:

That answers the question in my previous post.

Out of curiosity, how does one go about creating a luma splat file?

EDIT: Luma AI website appears to have an iOS App available for capturing splats, which answers the above question.

eggman28 commented 9 months ago

I am using luma.ai to create and download Gaussian Splat file but I just get a zip file with PLY file in it. I'm also trying to work out what is required to view splat files not hosted by luma and where we're meant to get these other required files that the console is showing as missing.

Posted question here too - https://discord.com/channels/991613372439212142/1027874912066613278/threads/1183991526641127504

Update: I see some responses there that say that this only works with Luma hosted files currently.

artemverbo commented 9 months ago

Hello! Thanks for an amazing library first of all. A question relevant to the above, the library is super easy to drop into an existing r3f/three project. Is there a planned possibility to use it with generic/non-Luma generated splats?

The semantic separation of the background/foreground feature is great, but in my project I would love to manually clean up splats/have more control, from what I understand Luma does not (yet?) allow editing splats manually (like I did say in https://github.com/playcanvas/super-splat).

Would be awesome to either have more control/ability to edit captured splats, upload externally created splats to Luma to use them with this library, or use externally created splats in this library.

UPDATE: just found out that Drei has it's own Splat implementation https://github.com/pmndrs/drei#splat which could be more relevant to my case, if that's useful for anyone else.

GitHubDragonFly commented 9 months ago

For those who might be interested, I have switched to using @pmndrs/drei-vanilla and my new SPLAT Viewer is currently using it for regular splats but URL loading still supports Luma URLs (so it's like 2-in-1). The code is available in my repository.

Also, the original Luma Splat Viewer's link in my initial post was updated for those who might need that code and will wait for Luma developers to update this library.

I will close this topic.

chillbert commented 8 months ago
image

@GitHubDragonFly Which format do I need to export from Lumalabs to be able to view it with the of drei? I tried the .ply or .splat; it's super slow or looks totally different than in the lumas npm package. Do I need somehow to convert the ply into splat correctly with some tool?

point_cloud.ply:

image

point_cloud.splat:

image

with this viewer those files work: https://projects.markkellogg.org/threejs/demo_gaussian_splats_3d.php?art=1&cu=0,1,0&cp=0,1,0&cla=1,0,0

GitHubDragonFly commented 8 months ago

@chillbert there is only one thing I could suggest which is for you to visit my webpage and read the description, specifically notes about Splat Viewer, to see what I have found as available.

None of it might work for your case but you would have nothing to lose by checking it out.