Blender 2.8 Transparent GLTF/GLB

I’m also having issues with this and I’m hoping that @donmccurdy can help out quickly.

It’s to do with backface culling.

Here is my basic shader setup.

Backface culling works fine here. When I export the glTF I get this which looks fine.

But, if you look at the object in the distance, it doesn’t appear through the front object, while others do.

If I turn off Backface culling in the material settings and export it, I get these errors.

Any idea what my best options are here?

Are you able to share a file? And, do the same issues appear in viewers other than Gestaltor, like https://gltf.report/ or https://sandbox.babylonjs.com/ ?

I can delete some non-essentials from the file and upload it later.

I checked it in several viewers with the Backface culling option turned on (so the clipping issue with the red circle in the images above).

In Gestaltor and the https://github.khronos.org/glTF-Sample-Viewer-Release/ viewer the transparency/clipping issue happens. In the two you linked, plus your own viewer, it works perfectly.

I’ll re-export with the backface culling turned off and see if the “geo” error appears in the other viewers.

I’ll try and get you a file later today.

This part is a fairly common limitation in current real-time implementations of the PBR Transmission property — opaque objects are visible through the transmissive material but other transmissive materials, and perhaps materials with alpha blended transparency, may not be visible. I think I see the same behavior from Blender’s Eevee renderer as well. Materials using alpha blending transparency instead of transmission will not have this limitation.

In Gestaltor and the https://github.khronos.org/glTF-Sample-Viewer-Release/ viewer the transparency/clipping issue happens. In the two you linked, plus your own viewer, it works perfectly.

This may just be a bug or limitation in the Gestaltor viewer then – if I had to guess, they may need to disable depth writes for transparent materials.

One workaround might by to try exporting with Transmission, but with “Blend Mode: Opaque” instead of using alpha blending. Usually it isn’t necessary to use both, and alpha blending may be causing the issues shown.

1 Like

Thanks for the detailed reply.

After following your advice to no avail, I set up a new test scene with 2 cubes, one with transmission turned on and Alpha Opaque, the other with just a random material. Worked perfectly first time.

For my scene, I just created a new material for the problem area using these settings and it worked straight off the bat. I’ve no idea where the difference in the materials lay. There was something in the Face Maps tab of the object data, which I’ve no idea what it was. I removed that also. Either thing may have been influencing how the object displayed after export.

Long story short, thanks for the help. Got me out of a jam.

1 Like