Translucent meshes are exported opaque from BabylonJS scene when using GLTF2Export class

Hello!

I created a mesh editor, which is based on BabylonJS. There must be an ability to export the created meshes to GLB format. I am trying to implement this by using BabylonJS class GLTF2Export. The problem is that when a mesh is created translucent in editor (for example, with alpha 0.5), the exported model is opaque. Is this a bug, or should I use a different approach?

Here is a small example in the playground:
https://playground.babylonjs.com/#W07QDA

In this example a translucent mesh is being exported to GLB. When I download the model and open it in Sandbox (https://sandbox.babylonjs.com/), it looks opaque.

Pinging @julien-moreau who is the author of the editor

I think you should ping @bghgary instead as the subject is more about using the GLTF exporter and not using the BabylonJS Editor

1 Like

This is a bug in the exporter. I’ve fixed it here: Fix issue with alpha mode in glTF exporter by bghgary · Pull Request #6484 · BabylonJS/Babylon.js · GitHub

cc @Drigax

1 Like

Hello!

I tested the preview version. Now export works fine, thank you!

Mesh to be exported from the editor:

Exported mesh imported to the sandbox:

2 Likes