Some PNG format images lose transparency as materials?

Hello and welcome to BJS,
The answer is quite simple. Yes, these are 2 png, BUT 1 has a white background (the one that works with the albedoTexture), the second has a transparent background. Since you are not using your design on top of a t-shirt mesh and texture, but simply as an albedo with a normal texture to create both the front t-shirt and design, the transparent background turns black.
It is in fact black because it’s transparent (but not specified). You can verify this in PG by selecting your ‘blinn3SG’ material and setting the parameters of:

newMeshes[3].material.albedoTexture.hasAlpha = true;
newMeshes[3].useAlphaFromAlbedoTexture = true;

Next, the mesh will render the PNG albedoTexture with its transparent background (but then of course your t-shirt will have a hole in it :wink:

So, the answer is: Edit your PNG and fill-in the transparent background with white color.

2 Likes