2
$\begingroup$

I am trying to use textures for transmission for my single material model and export a GLTF file. But various GLTF viewer sites do not display the transmission at all. It recognizes that a transmission texture is plugged in, but does not display it.

Here's my Shader setup to export a transmission map. enter image description here

But here's how it looks like on sandbox.babylon.js enter image description here

Here's how it should look like, this is without a texture and 2 separate materials. enter image description here

I would really help me out to see what I am doing wrong or to know if theres some limitation in blender gltf i/o.

Here's my blender and GLB files for download. https://we.tl/t-N1YMz4bZrd

$\endgroup$
7
  • 1
    $\begingroup$ As a contributor to the Blender's glTF addon, I do not think this issue should have been closed as a duplicate of the (much older) thread about limitations of the FBX exporter. Blender largely supports exporting Principled BSDF materials to glTF when inputs are baked to textures, and the question asked here is a reasonable one with a straight-forward answer. $\endgroup$ Commented Sep 28, 2022 at 2:42
  • 1
    $\begingroup$ To the OP — most realtime viewers today are limited to displaying only opaque materials through a transmissive surface. Surfaces using alpha blending or transmission will appear missing, as you see here when using a single material and a transmission texture. If you find a viewer that supports the "depth peeling" technique, I would expect your original export might work. But this method is currently too expensive/complex for most viewers. $\endgroup$ Commented Sep 28, 2022 at 2:46
  • $\begingroup$ @DonMcCurdy I have assigned the blending mode to Opaque as stated in the blender gltf documentation. Transmission works if I use a value in the Shader. It does not seem to work for me if i use a texture instead. I am basically trying to achieve the red spheres from this Sample model tinyurl.com/4xhkyuht . The various viewers recognizes that I have transmission plugged in but does not display them. I would highly recommend to download my files and have a look at it yourself. Thank you for replying. $\endgroup$ Commented Sep 28, 2022 at 4:55
  • $\begingroup$ By "opaque" in this case I mean the material cannot use alpha blending OR transmission. Transmissive surfaces are not visible through themselves, or through other transmissive surfaces. The entire material would be considered transmissive once the texture is connected to the transmission socket. $\endgroup$ Commented Sep 28, 2022 at 12:21
  • $\begingroup$ Yes you are right transmissive materials cannot be vsisble through themselves thats the problem I am facing. So the only solution is to use a separate material on it. $\endgroup$ Commented Sep 28, 2022 at 17:29

1 Answer 1

3
$\begingroup$

Most realtime viewers today are limited to displaying only opaque materials through a transmissive surface. By "opaque" I mean the material cannot use alpha blending OR transmission. Materials using alpha blending or transmission will appear missing when viewed through a transmissive surface, as you see here when using a shared material with a transmission texture.

Note that once a texture is connected to the transmission socket, the entire material would be considered transmissive, even if some areas of the texture do not enable transmission.

If you find a viewer that supports the "depth peeling" technique, I would expect your original export might work. But this method is currently too expensive/complex for most viewers. Ideally it is best to keep your fully-opaque materials, transmissive materials, and alpha blended materials separate.

$\endgroup$
2
  • $\begingroup$ Even though I don't doubt your answer is correct, I still think this is not the issue here. If the OP had read the linked duplicate fully he would have learned that most exporters don't support image textures that aren't directly connected to the Principled sockets, which is not the case here. $\endgroup$ Commented Sep 29, 2022 at 20:53
  • 1
    $\begingroup$ The OP is asking about the glTF Exporter in particular though. I'm not sure it supports arbitrary channel packing, but this particular setup is fine. See the documentation for Principled BSDF Clearcoat export for a similar case with a Separate RGB node. If you open the exported model in gltf.report, you can see that the texture is exported and connected to the "transmissionTexture" slot. $\endgroup$ Commented Sep 29, 2022 at 21:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .