`Hello there!
Recently I realized that Godot doesn’t want to be a friend with any Blender material that is not Principled BSDF.
My shader (check the screenshot) is pretty simple. However after exporting the model in GLTF to Godot, the model is completely white. Even the texture is not importing from the GLTF file.
I can describe the needed result like this: First we make a basic Toon shader with sharp shadows. Then we make a second, soft shadow overlayed on top.
Since Godot can’t handle such shader exported from Blender, why not making the same thing inside Godot?
The truth is - I have no idea how nodes in Godot’s shader graph work. I can only create shaders inside Blender.
Can you recommend any material to learn Godot’s shaders?`
You are right that Godot can’t parse Blender shaders, I think a similar effect you want is a shader with step’d lighting.
Can’t seem to fumble my way into converting this to visual shader, but here’s a basic texture + sharp lighting. It’s pretty much a stripped down standard material with only albedo texture, color, and lambert lighting made sharp (step makes it sharp).
For what you have, you don’t need shaders, as long as each differently colored part is a separate object in Blender. If it’s not, re-group them in Blender, and then re-export.
Select the .gltf file in FileSystem.
Click on the Import tab.
Click the Advanced… button.
Click the Actions… button. (Top-left of the popup.)
Select Extract Materials from the menu.
Select a spot to save the extracted materials.
Click the Reimport button.
Right-click on your .gltf file and select New Inherited Scene
Select the first MeshInstance3D object in your node tree.
Open up Inspector → GeometryInstance3D → Geometry → Material Override.
Click on the value and select New StandardMaterial3D.
Click on the White ball that appears in the slot.
Change the color under Albedo → Color to the color you chose in Blender.
If you modified Metallic, Roughness, etc, change those values as well.
Click the down arrow next to the Material in Material Override and select Save.
Save the material so you can drag it to other meshes. (I recommend changing the filename to end in .material)
They will not be able to get the hard-shadowed effect from Godot without a custom shader material. Toon shading is close but significantly softer. It would be better to “Use External” for the imported materials in this case.
Fair enough. I was able to make a marble texture using the process I mentioned. I admittedly haven’t tried using the built-in toon shader in Godot, but you can do a lot with a StandardMaterial3D. But in step 11 they could make a New ShaderMaterial instead.
I recommend posting this question on https://blender.stackexchange.com/ if you haven’t already. The people there are very helpful, and might know of some resources for helping with conversion. I ended up playing around after googling Godot 4 Shader Tutorials.