Exporting GLTF files witch correct shaders

sorcierlegrandsorcierlegrand Posts: 2Member

I'm trying to export a simple plane with a set of PBR textures from blender 2.8 to godot, here how's shown in blender

and here how's show in godot

I'm ok with a little difference, after all every program is different, but this is unnaceptable.

I know it's not the exporter, because another viewers of gltf files load it correctly, like this on the web

I even tried the same test HDR background for illumination, and doesn't seem to make a lot of difference, this is the shaders that I'm using in blender

the texture set is this one:
https://cc0textures.com/view?id=Tiles058

has color, normals, metallic, roughness, like it should.

So, what I'm doing wrong?

Comments

  • MegalomaniakMegalomaniak Posts: 2,898Admin

    It's likely your normal map. You likely have to invert the green channel.

  • sorcierlegrandsorcierlegrand Posts: 2Member

    @Megalomaniak said:
    It's likely your normal map. You likely have to invert the green channel.

    The normal map has it's own texture, I don't use channel packing textures, you can see it on the shader graph.
    Even if I have to invert the normals, there's any way to export this correctly? I really can't fix every single material on my project by hand one by one.

  • SIsilicon28SIsilicon28 Posts: 757Moderator

    Perhaps Godot isn't taking the normal scale into account?

  • MegalomaniakMegalomaniak Posts: 2,898Admin

    @sorcierlegrand said:

    @Megalomaniak said:
    It's likely your normal map. You likely have to invert the green channel.

    you can see it on the shader graph.

    A normal map consists of 3 gradients, one in the red channel one in green and one in the blue channel. Blender and godot differ in their spatial dimensions and as a result either the green(iirc) or red channel would need to be inverted.

    @sorcierlegrand said:
    Even if I have to invert the normals, there's any way to export this correctly? I really can't fix every single material on my project by hand one by one.

    you could probably create a macro/batch task for this in photoshop, gimp or krita. Or what have you. Or possibly even in blenders compositor.

Leave a Comment

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