Importing Materials from Blender

Godot Version

4.6.1.Stable

Question

Hello,

I have recently gotten interested in 3d modeling and wanted to explore how the models work when exported into Godot. For modeling I am using Blender.

This first image is of my Blender scene. I am trying to make a glass bottle (think potion or wine bottle) which is glass and would permit some light through. For those of you familiar with Blender, there is the shader for the bottle.

When I export the object to Godot (.blend on left, .glb on right) it appears as a solid object.

I figure I am misunderstanding something about how each system interprets objects. IE Is Godot expecting low alpha? Or is it some setting in Blender that I have not set?

I will do my best to respond thoroughly but particularly on the Blender side I may have difficulty with using the right terms or finding the right setting.

Also, maybe this just isn’t the right forum, or maybe Godot does not handle such reflections / materials.

Thank you.

The two programs use wildly different rendering pipelines, there is no way to represent most Blender materials in Godot, conversions are done as best as possible automatically but you should get familiar with creating materials in Godot if that’s where you want to use your models. You can set a material override path in the Advanced importer or by surface material overrides in a new inherited scene of your model or enabled Editable Children on an instance.

Yeah, Godot and Blender handle materials and interpret shaders differently. Direct porting is often impossible. It makes sense to model in Blender and work on the materials in Godot. Or use Material Maker.

That all makes sense. I suppose I was being too hopeful to presume blender could properly read the transmission information and immediately make use of it. It seems I have a lot to learn about 3D.

So: Make a 3D model in Blender (designing Level of Detail for its intended use) → Copy to Godot → Create materials and shaders in Godot for any advanced visual effects.

So, while textures could be added in either program, most people would prefer the additional control of adjusting the material in Godot, so better left plain?

Thank you for the wonderful tool link.

If it helps any, what I do is the model/UV work in Blender, then I use a different app to make the specific textures (in PNG) then import them to Blender to make sure I have them right, then import the textures and create materials in Godot.

They’ll never quite look 100% for the more advanced materials, but the PBR stuff will look pretty close.

I use very simple Textures for objects like these, and Godot imports my Tran_Glas (Transparent Glass…)very well. Here’s a screenshot of the Blender object, then the Godot object…

Hope this helps.

In this example, it looks like you used subdivision surfaces in Blender, but didn’t apply the modifier when exporting.

Second, Godot’s standard material doesn’t handle alpha by default. You need to enable transparency on the mesh’s Godot material (I duplicate the material in code, and set the duplicate to the corresponding surface override), and set Alpha as the transparency indicator in the duplicate.

Third, the vast majority of Blender shaders (anything that won’t fit directly and immediately into the Principled BSDF nodes) won’t export to glb. You will have to create textures that use your Blender shaders, and then use the textures on your mesh.

Thank you all,

@Dad3353 Great advice, a mostly transparent slightly metallic texture converts well.

@soapspangledgames Yes, I hadn’t realized exactly what the .glb format does, suspected that was the cause.

So TLDR: Godot can only handle the simplest materials / shaders from blender. If you are trying to make glass with actual reflections or other effects investigate Godot’s material system. It is all similar to Blender, but this shows where the buttons are: https://youtu.be/K7a4hDRxYu8?si=Zj1qOrAemboCKN6E&t=427

New ‘Interpretation’

PS: If doing something similar and the inside material changes it’s appearance based on how it is viewed increase ‘Surface Material Override’ > ‘Render Priority’.