The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

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.

in Engine by (12 points)

1 Answer

0 votes

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.

by (1,492 points)

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.

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.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.