antimatter15 / splat

WebGL 3D Gaussian Splat Viewer
https://antimatter15.com/splat/
MIT License
1.89k stars 193 forks source link

Fail to load costum splat #56

Open DuVogel87 opened 3 days ago

DuVogel87 commented 3 days ago

I am not able to view/load my costum splats. Whatever i do i always get to see the default model "train".

Here is what i did:

  1. I cloned the repo (git clone https://github.com/antimatter15/splat.git)
  2. I did python -m venv venv
  3. I did pip install plyfile
  4. I converted my .ply to a .splat
  5. I created a folder "model" and put in the output.splat (i renamed output.splat to test.splat
  6. I did python -m http-server, server started
  7. I copied this to my browser url: localhost:8000/?model=test

I have no idea what i am doing wrong. Can someone please help me here? Thanks!

daviszhu88 commented 3 days ago

Try this localhost:8000/?url=test.splat

DuVogel87 commented 3 days ago

When i do localhost:8000/?url=test.splat it says:

error: 404 unable to load https://huggingface.co/cakewalk/splat-data/resolve/main/test.splat

daviszhu88 commented 3 days ago

You need to replace the line in the main.js from "https://huggingface.co/cakewalk/splat-data/resolve/main/", to "http://localhost:8000/",

DuVogel87 commented 2 days ago

Doesnt work. I did as you said. here is the code i changed due to your last post:

} catch (err) {} const url = new URL( // "nike.splat", // location.href, params.get("url") || "test.splat", "http://localhost:8000/", ); when i try to open http://localhost:8000/ or localhost:8000/?model=test.splat in my browser both lead to the same error:

Error: 404 Unable to load http://localhost:8000/train.splat

daviszhu88 commented 2 days ago

You might need to refresh the page. It should not say train.splat if you made the code change.

Btw, it should be localhost:8000/?url=test.splat

DuVogel87 commented 1 day ago

i changed to code:

const url = new URL(
    // "nike.splat",
    // location.href,
    params.get("url") || "train.splat",
    "http://localhost:8000/", // Changed from "https://huggingface.co/cakewalk/splat-data/resolve/main/"
);

i do: .\venv\Scripts\activate.bat

i start: python -m http.server

i enter in browser: localhost:8000/?url=test.splat

still no succes! 

Error: 404 Unable to load http://localhost:8000/test.splat

It's really strange why it doesnt work. I do everything as you say.
daviszhu88 commented 1 day ago

Likely it could be CORS. Please install the extension and enable it.

DuVogel87 commented 1 day ago

this?

https://github.com/expressjs/cors

daviszhu88 commented 1 day ago

In Chrome setting menu, click Extensions->Manage Extensions image

DuVogel87 commented 1 day ago

Nope. Doesn't change a thing.

Is there an instruction on how to clone, install and run splat?

I think its something very easy that doesn't work here right now.

daviszhu88 commented 1 day ago

Did you install the extension and turned it on? Please provide a screenshot like this image

The CORS symbol should be red.

DuVogel87 commented 1 day ago

sure. here is a screenshot of my running firefox and cors extension:

Cors

daviszhu88 commented 1 day ago

I am not sure about Firefox. Could you try Google Chrome?

DuVogel87 commented 1 day ago

Okay i installe chrome and the extension. no, nothing happens. just the blue loading cube spinning endlessly.

daviszhu88 commented 1 day ago

The model file should be at the same place as the main.js.

Please post a screenshot of the http server running window. What is the message there? Also you can open the chrome developer tool and see what error raised.