[SOLVED] Any plans to support glTF?

I know it’s a fairly new format, but the results are amazing.

I was looking through the file and gITF also has a JSON formatting, but the difference from the file I converted from FBX to glTF using www.clara.io and the JSON files on PLAYCANVAS is a *.mapping file which is a JSON file that references the materiales… the materials are also JSON files.

I’m attaching two screnshots from the same model:



I went to https://www.khronos.org/gltf , and didn’t see you guys at the bottom of the page. Hopefully there are future plans to embrace gITF. The gITF compression could really open up the door for many many things (specially the projects I’m trying to get off the ground that have a big amount of 3D models and keeps crashing on iOS).




Such a great thing is that!

Also, Max said that they are working on possibility to write custom plugins for editor and I think import\export module for gIFT could be one of the most useful.

There is a ticket for engine on github: https://github.com/playcanvas/engine/issues/806
By the way, engine is open source, so discussions and PR’s are welcome.

It’s picking up @max @will

Any guidance on how to start this effort towards glTF integration?

Would it be just a matter of formatting a glTF the same as Playcanvas’ JSON?

No, I would instead recommend creating a loader that given a URL to a glTF file, with return a pc.Model. So it would parse the data out of the glTF files and create the runtime object that the engine can render.

There are multiple ways to approach.
One of the good ways would be to directly support loading of glTF format.

You can look into source of engine to figure out different resource loaders: https://github.com/playcanvas/engine/blob/master/src/resources/model.js https://github.com/playcanvas/engine/blob/master/src/resources/parser/json-model.js

And start from there, this can give you example how JSON model is loaded and mapped against engine concepts.

Any more news on when gltf will be supported ? I see this repo can side load it into an application - https://github.com/KILLTUBE/playcanvas-gltf-ts

That looks like a clone of the repo from the official PlayCanvas here: https://github.com/playcanvas/playcanvas-gltf Currently, the official GLTF support is via this library.

1 Like