How to import transmission texture from gltf file

Godot Version

4.2.2

Question

I am trying to import .glb file which contains a transmission texture.However,Godot didnt render the texture exactly(like the picture below)
I made it in Blender and Blender can render it correctly.It’s an eye model.
Are there any options I need to enable?Help!




this is model’s Blender nodes.I just used principled BSDF shader

Godot’s ability to translate materials from Blender is somewhat limited (see docs).

Even if the exported file contains the relevant textures for transmission, you won’t find a rendering feature in Godot that achieves precisely the same look - at least not out of the box.

As you may already know, the transmission channel in Blender’s Principled BSDF is implemented to achieve the light-bending behaviour of translucent materials (e.g. glass, slime, water etc.). In your case, the transmission is used to make the outer layer of your model (the lens) distort the model within (your eye). Here it is important to note a couple of things. Firstly, the distortion that is achieved through the lens may be minor; viewing the eye from afar may appear identical with or without distortion. Therefore, you should consider whether the transmission texture is even worth using if the eye is not a central visual piece in your game. The second thing is that achieving the same effect from Blender may require you to build a custom shader.

Godot’s closest equivalent to transmission is refraction. The built-in refraction effect is anamorphic and does not appear to take the surface normal into account - it is not useful for your purposes.

The good news is that making such a shader is not too difficult. You can find my take on the simplest version of such a shader below.
EDIT: I forgot to include a texture parameter for distortion. Make sure to add that to the below example if you want to make use of your texture.


Here is a side-by-side comparison to illustrate the difference.

I’m not quite sure how to tackle the dark shading on the underside of the “Custom” solution. Perhaps the material should make use of a different shading technique or reduce shadows somehow - I would have to investigate. Anyway, you get the idea.


If you wish your future imported assets to automatically produce a material that is more comparable to its Blender counterpart, perhaps you will find import scripts intriguing.

1 Like

Thanks to your detailed illustration,now I have learned the difference between Principled BSDF and ORM Material.I will try some shader to achieve my goal.
Appreciate your timely response.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.