We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

jlTF 2.0 compatible materials

Home Forums Graphics / Blender jlTF 2.0 compatible materials

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #53661
    kdv77kdv
    Participant

    We have the demo app “Gltf Compat” and it works fine whether jlTF 2.0 compatible is checked or not. The difference is minimal (jlTF 2.0 compatible material looks a little darker)

    But when I activate jlTF 2.0 compatible in my application it looks awfull )))

    The texture set is the same (UE4 set), the material nodes are the same, but the result is different. Any ideas what’s going wrong?

    p.s. If I apply the same matrerial to both objects, the colors look the same in Blender but really different in Verge3D )))

    Seems that issue is in the mesh itself. But what exactly is wrong?

    Attachments:
    You must be logged in to view attached files.
    #53669

    Can you share the mesh?

    Co-founder and lead graphics specialist at Soft8Soft.

    #53671
    kdv77kdv
    Participant
    #53700

    Hi,
    There are vertex colors assigned on your mesh. According to glTF 2.0 standard, base colors of the materials are multiplied by vertex colors automatically. So you need to remove them from the mesh.

    Verge3D’s Tech Chief
    FB | Twitter | VK

    #53701
    kdv77kdv
    Participant

    Much better without virtex colors but the difference is still significant…

    #53706

    Checked again and found more issues:

    1) Specular input of Principled BSDF is not supported by glTF, you need to specify default value (0.5) to make Blender viewport look closer to Verge3D.

    2) The second UV (unused in Blender) is assigned to AO (defined by glTF 2.0 standard as well). To use only the first one, you need to cleanup your meshes.

    3) You also need to pay attention to how AO is handled by Blender and glTF 2.0. In Blender it affects both direct lights sources and indirect lighting (provided by World shader). In glTF 2.0 it affects only indirect lighting. That’s why your AO map looks not so contrast when rendered with Verge3D.

    Verge3D’s Tech Chief
    FB | Twitter | VK

    #53708
    kdv77kdv
    Participant

    Separate RGB node works strange if I try to take AO image from G channel

    In fact, the AO image is taken from R channel )))

    Recombinig RGB removes this issue

    Also texture scaling doesn’t work…

    #53720
    Pascal
    Customer

    kdv77kdv
    Participant

    Separate RGB node works strange if I try to take AO image from G channel

    Setting the Color Space to NonColor in this case might help.

    #53721
    kdv77kdv
    Participant

    No, it doesn’t matter. RGB channels contain three different AO images and the correct image for this model is in G channel, but with jlTF 2.0 compatible active after exporting R channel is used instead of G… Looks like it’s also a standard layout for jlTF: R – occlusion, G – roughness, B – metallic…

    Glossy and Diffuse shaders are not supported?

    Verge3D team, please, make your USDZ export independent of this jlTF 2.0 compatibility…

    #53733
    Pascal
    Customer

    glTF 2.0 spec says:

    "metallicRoughnessTexture": {
                "allOf": [ { "$ref": "textureInfo.schema.json" } ],
                "description": "The metallic-roughness texture.",
                "gltf_detailedDescription": "The metallic-roughness texture. The metalness values are sampled from the B channel. The roughness values are sampled from the G channel. These values **MUST** be encoded with a linear transfer function. If other channels are present (R or A), they **MUST** be ignored for metallic-roughness calculations. When undefined, the texture **MUST** be sampled as having <code>1.0</code> in G and B components."
            },

    I guess you want to use glTF 2.0, right? Cause I don’t know about

    jlTF 2.0 compatible

    and guess it is just a typo.

    However, I never tried it the way you describe it. 3 AOs in one image, that might be working within blender and maybe also in Verge3D but not in glTF standard?

    I hope you will find a good solution. Let us know.
    Best regards!

    #53736
    kdv77kdv
    Participant

    and guess it is just a typo.

    It’s not a typo, it’s Verge3D option in Blender )))

    Unfortunately, Verge3D USDZ export doesn’t work without this option…

    #53741

    In gltf compat R channel only used for AO, G for roughness and B for metalness, not way to change it. USDZ and gltf compat works independent.

    Co-founder and lead graphics specialist at Soft8Soft.

    #53748
    kdv77kdv
    Participant

    USDZ and gltf compat works independent.

    Then why export to USDZ puzzle works only with gltf compat materials?

    (
        customLayerData = {
            string creator = "Three.js USDZExporter"
        }
        metersPerUnit = 1
        upAxis = "Y"
    )
    
    def "Materials"
    {
    
    }

    USDZ file is created and can be downloaded to iOS Quick viewer, but its size is 321B and it contains nearly nothing.

    #53749

    In fact export to USDZ it’s just and compressed export to GLTF comapt file, but if you want to use USDZ without gltf compat in the app when exporting from blender.

    Co-founder and lead graphics specialist at Soft8Soft.

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.