Meshes with different shades coming from same color. What's wrong?

As you can see, although I have set the exact same color to all meshes it looks different on the result.
What do I have to do to get the correct result?

Thank you in advance.

Hey! we will need a repro (ideally in the playground) to help you further

your normals might be wrong ???

Hello @Neimeg just checking in, are you still having issues?

Hi @carolhmj .
Yes, I’m still facing this problem.

I’m sure that normals is not the problem.
Just to mention: There’s no image texture applied to the mesh, only color.

Could you provide a repro ?

1 Like

Yeah we won’t be able to look further without a repro

I don’t know exactly how to create repro. I tried using my onw GLTF model in Playground without success, same for JSFiddle.

See Using External Assets In the Playground | Babylon.js Documentation (babylonjs.com)

Yeah, I read that article but that did not work with my model (gltf + bin file).
I ended up creating a repro in my own server.
https://neimeg.com/test.html
As you can see, there’s no problem with my repro, I think that the problem is in my setup.

Can you post a uv set screenshot ?

Ok got it. I get your gltf model from you test server and, look at the picture attached, you have 4 materials for this model (witch is not optimised at all)


Try to get rid of the unecessary material and work on your UV set to have ONE material.

2 Likes

I have to work with 4 materials because our customers can customize the tshirts, they can apply up to 4 images (1 for each side) to the tshirt.
I don’t know if there’s a way to apply 4 different images using only one material.

Decals | Babylon.js Documentation (babylonjs.com) are perfect for that :slight_smile:

2 Likes

Like @Deltakosh said on another question on the forum you can create custom procedural textures and consume them.

1 Like

Ok, as stated by @carolhmj decals will work fine. Yet, there’s another solution (there nearly always is in BJS :smiley:. As used in my ‘BSA Bantam motorcyle project’, you can create another mesh for just your personalization portion of the t-shirt with just a tiny-mini little offset from your t-shirt mesh. Sure, it creates (in your case 4) more portions of meshes but the advantages are:

  1. you can use this to create a bump/embrodery or flockage effect on the design without affecting the t-shirt texture.
  2. you can easily change this texture or remove it (although you can do the same with a decal).
    In the end, decal or offset mesh will provide a similar effect. It’s basically a choice of preference towards the handling. In any case, the only thing I would recommend is not to choose an option that would affect the ‘plain’ look and rendering of your t-shirt. Although, it might feel ‘sexy’ to work it with say a node material, it would be just too much trouble (my opinion only). Let’s just keep things simple (that would be my moto :wink:
2 Likes