How to add a model with transparensy?

Hi everyone!

I’m using GLTF format model for my scene.
The original model has clear glass (link: Selfmade Plant Cart - Download Free 3D model by maxim.veretin.2410 (@maxim.veretin.2410) [f84fb37] - Sketchfab).

But when imported into the scene, the glass is not transparent.

Here is code for import model:

function loadModel() {
    GLTF_LOADER.load('./media/models/cart/s/scene.gltf', (object) => {
        //object.scene.material.transparent = true;
        MODEL = object.scene;
        MODEL.position.y = -90;
        SCENE.add(MODEL);
    });

How to fix that problem?

This glTF file is not being exported correctly by Sketchfab. The base color of the glass material has no transparency. I’d suggest fixing it in Blender, you’ll have to replace black areas of the texture with transparency with Imagemagick:

convert Glass_baseColor.png -transparent black Glass_baseColorOut.png

and then probably also reduce the alpha value to 0.5 or so in Blender with a Multiply node. Here’s a quick edited version, compressed most images with JPEG for size:

CartOpt.glb.zip (5.9 MB)

Thank you!

I will try your way, but I have very little experience in blender and I created the model in other programs.
Can I somehow replace textures/materials when uploading a model or something?

After my attempts, I used your model and here is the result. Great thanks!

1 Like