Models import into Godot pitch black from glitched out roughness settings....

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By linksg

So I randomly run into the problem that when I import my model it shows up completely black in Godot. It imports the materials pitch black. After hours of probing and testing it seems that it imports glitched out roughness settings, and when I edit the material in Godot it shows the roughness setting to be “-1.#J”. When I change this to a real number like “1.0” it shows my material and texture perfectly fine…

I ran into this once before and had to completely remove all materials in Blender and re-create new materials for it to finally import correctly. What is happening? idk why it happened the first time but I know that it started this time after I changed the diffuse shaded from Lambert to Oren-Nayar and modified the roughness setting to “3.14” in Blender. I tried changing it back to Lambert, and it still imported with the weird “-1.#J” setting in roughness. I even cleared out all the old material and texture data-blocks in the Blender file and it still happens. This all started from me trying to get the shinyness to go away from Godot, and I know that changing roughness in the editor makes the shinyness go away, but I wanted this to be done in the Blender file, and I thought this was the way to go, but it just messed it up.

What can I do? Anyone encounter this before? It’s annoying to continue to re-make all these materials every time it happens.

Thanks.

:bust_in_silhouette: Reply From: MysteryGM

I ran into this once before and had to completely remove all materials
in Blender and re-create new materials for it to finally import correctly.

I can’t stress this enough: Don’t import materials into your game engine.
The software you use to make models isn’t a real-time application it doesn’t use the same materials as your engines.

When exporting a material from your 3D software.
1.) It gets translated in the Exporter 2.) It gets stored in a special format with limited exporting support. 3.) The importer has to read it and translate it to work with the game.
That is 3 possible points of failure, it is much better to make the materials you need in the engine.

Only time you should export materials is when you have more than one material on a mesh, this allows the importer to make sub meshes. Once the mesh is imported, delete the materials and make new in-engine ones.

It’s a vehicle mesh and it has 3 different materials used… are you sure there isn’t a way to make the two (Godot and Blender) cooperate together? It’s a huge hassle to keep re-making material in Godot as I’m constantly working on the model.

linksg | 2018-11-24 08:33

Yes, there is a way. Write your own exporter for Blender. Write your own 3D format that can pass all the data you need. Write your own importer that reads the data how you want.
The problem is that these 3 tools where made by 3 individuals, so they don’t lineup 100%. If you made them yourself it will work as you want. Every time Blender updates or Godot updates you will have to fix them.

It is much easier to just replace the materials in the engine
Unity and Unreal are both commercial engines and suffer from the exact same problem. It is just to much of a hassle to maintain importers and exporters.

MysteryGM | 2018-11-24 16:29