The Godot Community Forums are back up and running! Please read the the announcement post for important information on what happened. Thanks!

Can't import shaders/textures to Godot from Blender 2.8

2dvoxel2dvoxel Posts: 7Member
edited August 12 in 3D

I'm using this shader for my models and then i import them like this

This is the original model in blender:

And the result:

I think i might have missed some step but not sure of which one, i followed the tutorial video on how to import and other similar guides but the results is the same. Any ideas of what i'm doing wrong?
Looks like my model not importing shader and textures correctly, also i treid to assign them manually but still looks the same.

Comments

  • TwistedTwiglegTwistedTwigleg Posts: 3,129Admin

    I'm fairly certain custom Blender shaders will not export correctly to Godot, as Godot doesn't translate Blender Shader code to Godot's GLSL-like shader code, but I could be wrong.

    Regardless, what are the export settings you are using? Also, are you copying the textures along with the 3D file in your Godot project, or are the textures embedded in the file? I think GLTF supports embedded textures, but I'm not positive. If you are embedding the textures, maybe try copying them manually to the Godot project and see if that works?

  • 2dvoxel2dvoxel Posts: 7Member

    oh i see, any ideas on how to export these shaders/materials? i 've reading the docs and not quite sure how to translate from blender nodes to godot code.

  • TwistedTwiglegTwistedTwigleg Posts: 3,129Admin

    That, I do not know, to be honest. It really depends on the complexity of the shader and what it uses.

    I'd look into seeing what the GLSL code is for the Blender nodes, as Godot uses a shader language very similar to GLSL. Then it should, in theory, just be a matter of translating the GLSL to Godot's GLSL, though in practice there may be differences that make this a little more challenging.

    I know in Godot 4.0 there are plans for Godot to support GLSL directly, which would make the Blender shader porting process much easier.

    Also, GDQuest has a cartoon shader that may be of interest. It doesn't quite look like the Blender shader, but it looks similar:

  • There is an exporter that tries to write shader scripts based on the blender nodes, but its pretty incomplete and I havent seen it succeed yet. Still, once thats finished that could make a pretty attractive options (although translating blender nodes to godot nodes would be faaaar more useful, so we can adjust it without having to untangle the autogenerated code)

    For now I strongly suggest learning how to bake your materials into PBR compatible textures, you can get MOST materials into a reasonable state that way

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file