Loading glb file with KHR_materials_transmission extension

When you load glb at runtime and create an instance of it, for example this way:

    const house = asset.resource.instantiateRenderEntity();

You can then find and change all materials this way:

    const renders = house.findComponents("render");
    renders.forEach((render) => {
        render.meshInstances.forEach((meshInstance) => {
            meshInstance.material.blendType = pc.BLEND_MULTIPLICATIVE;
            meshInstance.material.update();
        });
    });

is this what you need?

1 Like