GLB glTF 2.0 Import for PlayCanvas is LIVE! ๐ŸŽ‰

:package: Drag and drop GLB/glTF to the Editor
:house_with_garden: Add template (prefab) to the scene
:art: Edit glTF materials
:running_man: Configure animations

Read more: glTF 2.0 Import Arrives in the PlayCanvas Editor | PlayCanvas

19 Likes

Great work everyone! :tada:

2 Likes

Very useful!!! :two_hearts:

UPDATE:

We have deployed an update to GLB import. We now import GLBs containing:

  • Cameras
  • Lights
  • Draco compressed meshes (note that there will be decompressed on import - a future update will allow you to retain mesh compression or apply compression to uncompressed GLBs that are imported).

Enjoy! And let us know if you have any feedback on this feature. :smile:

3 Likes

Could you share a complete list of all supported extensions? Or does it match the ones supported by the engine?

@queriel We have a ticket on the Editor repo to track progress and expected features :slight_smile:

2 Likes

Itโ€™s goog news, and when will you allow to retain mesh compression of Draco GLB file? Itโ€™s very expected! :smiling_face_with_three_hearts:

Not yet, GLB compression is something we are thinking about but not sure if we will go Draco, MeshOpt or both.

Draco is working great but Iโ€™ve noticed my .glb files are now ~50% larger with mesh compression disabled. Is there any way to use the old compression method?

Hi @Devortel ,

Not sure I follow what you mean. Do you have an example project/file I could take a look at?

Thanks

https://playcanvas.com/editor/scene/1665890

In this example project, Iโ€™ve uploaded the exact same .fbx twice. Once with Draco compression enabled, once with no compression.

With Draco enabled, we can see the resulting .glb is 3.79KB. Without compression the .glb is 28.3KB. My issue is that before the Draco option was added, the resulting .glb files were much smaller. There is one mesh in my project that I canโ€™t use Draco compression with because itโ€™s too lossy. Its .glb size has increased ~50%.

Ahh interesting and unexpected. Do you perhaps have the 50% smaller glb file still? We had to change our glb mesh handling to support draco and we may have inadvertently broken something.

Iโ€™ve uploaded samples of the .fbx and .glb before and after draco: [Link Removed]

Hope this helps!

1 Like

Excellent thank you!

You say the draco compression is too lossy in some cases. Iโ€™m interested to hear which parts of the mesh you find too lossy: position, normal, texture coordinate?

Draco has options to control individual vertex attributes independently. We implemented the defaults initially, but will add options for tweaking these in future.

The positions of some vertices in the mesh have been the most visibly affected. In my sample files, I have a large city map mesh with city blocks, roads, bridges, sidewalks, etc. After draco compression, the map is still 90% correct, however certain street edges, road lines and gutters are at incorrect heights and some critical detail has been lost.

No Compression:

With Draco Enabled:

1 Like

Hey guys!
@yaustar @slimbuck Seems like dynamic refraction isnโ€™t working with Mosquito in Amber GLB anymore? Iโ€™ve tried importing it both in editor and in the viewer, and refraction seems to be not working. Iโ€™ve tried enabling color grab on camera and moving Skybox layer before the World, but still no avail. Any ideas what could be wrong? :slight_smile:

Hi @underlight,

I just tried mosquito in amber in our model viewer and it renders fine for me.

Is this the viewer youโ€™re referring to?

Which device are you testing on?

Can you share the editor project so myself of @yaustar can take a look?

Thanks!

@slimbuck ah sorries, seems like I used corrupted model from here:

When using GLB directly from Khronos - it works fine. Curious what breaks Sketchfab GLBs in relation to PlayCanvas

I see what you mean!

It seems Sketchfab makes custom changes specific to their platform. I tried loading this model in the reference viewer and got similar results to ours (glTF Sample Viewer).

1 Like