Gaussian Splatting + PlayCanvas

hi @slimbuck.

When dragging the .PLy (330 mb) into the asset window it gave me a message that the filesize was too big. I wasnt able to drag in the .splat variant (which is smaller)
Maybe I should host the file on my server and learn how to add the url to the scene instead.

Did you try using the compressed PLY format?

If you haven’t already, load up your PLY into super-splat and export to “Compressed Ply Format”. They’re smaller than .splat files.

Thanks, I didnt notice the menu was longer so had not seen the compressed ply export.
Is there a tutorial that will help me create a web element I can embed in a website using a .ply? I have looked at some of your video’s but Can’t seem to find the right one. I created a legacy model element to drag it in there, I tried a bunch of ways to add the .PLY to the scene but I can’t seem figure out how… I all honesty, the project is a bit bigger even. I’d like to also have the QR to AR features accessible aswell. But to start off, a way to host my 3DGS on a site would be really usefull.

Probably doing what this example does would be easiest way to get this done

Hi. Is the feature supported in the editor?
I tried to embed the playcanvas-extras.js into a project and load a ply
it doesn’t return error, it seems able to create a render with meshinstance in it, but it doesn’t render.

@slimbuck created a test project in the editor that worked

Hi @SunnyChow,

We currently need to specify a filter when loading the PLY asset because by default only a few bits of data are loaded (the rest are ignored to save memory).

Please PlayCanvas 3D HTML5 Game Engine for an example of loading a compressed gaussian splat PLY and rendering it.


This example doesn’t work for me.
If I press Play from the link I get a black screen, no content. The console shows:

 Uncaught DOMException: Worker.postMessage: attempting to access detached ArrayBuffer

If I go into Editor and Launch, I get a series of errors starting with ‘superclass is not defined’.

I know things are changing rapidly, has the API changed since this was created?

I traced it back:
playcanvas.RenderPassShaderQuad is undefined

I’ll see if I can work out what that is and why it’s not available.

Sounds like the already known Firefox problem, so if you use this browser I recommend to try a different browser.

Ah, yes I am using firefox. Recent convert to it because in Chrome pausing the debugger on a running tab was freezing the editor and code editor too!

I’ll look up the issue for the ‘firefox issue’ because I wasn’t aware of any problems.

1 Like

That doesn’t seem to be the problem. In Chrome using that link, clicking Editor, then clicking Launch, I get an error on the same line (a different error than Firefox, but still broken).

EDIT: running from the linked page using ‘Play’ does work however. Is the ‘Play’ version different to the Editor version or do they launch via a different process perhaps?

EDIT2: I notice that the included ‘playcanvas-extras-1.67.0.js’ is a higher version than the playcanvas Engine version which is 1.66.3.

I see, thanks for reporting. I don’t know anything about it, so we’ll have to wait for an answer from the team.

Yup, understood!

Steps to repro in Chrome: open the project using that link, press editor, press launch.

Windows 10 Pro, GTX 3080.

The FF issue is almost certainly why I’ve got a black screen in that browser when pressing ‘Play’ but is not related to the console log errors that I reported from using ‘Launch’ there.

Interestingly the two browsers give slightly different errors on the same line when the project is launched.

Chrome says ‘undefined prototype’
FF says ‘superclass is undefined’

They both trace back to playcanvas.RenderPassShaderQuad being undefined when _inheritsLoose is called with subClass = RenderPassCompose (superClass should be RenderPassShaderQuad)

Oh that was me being careless.

The gaussian splat PLY asset wasn’t hooked up to the gs.js script. (I unintentionally did this testing something unrelated).

I’ve fixed that now - sorry for the trouble!

1 Like

I’m still seeing the same errors when using launch, in both FF and Chrome.
The launch link is PlayCanvas | HTML5 Game Engine
Am I doing something wrong?

Oh, you must be using latest engine for this to work, like so:

Select “Use Release Candidate” in launch options:
Screenshot 2023-12-01 at 10.54.43

1 Like

This sounds like the answer :smiley:
How do I get that drop-down menu? Hovering launch or click-and-hold don’t do it.

I ran the demo using the link with a version number, and it shows the splat but generates an error a second afterwards:

Uncaught DOMException: Worker.postMessage: attempting to access detached ArrayBuffer



EDIT: tried again on Chrome and the error is gone. Ignore the second part please - but how do I get that drop-down?

The dropdown should appear when you hover over the Launch button. If you have read-only access to the project then the options don’t appear (but probably should!).

Probably best if you fork your own version of the project and run that.

1 Like