Gradient for transparency does't work as expected

Godot Version

4.2.1

Question

Hello, could you please help me to understand what I am missing: trying to create gridmap cell highlight with TorusMesh and material with gradient texture in Albedo. It looks correct in editor, but in the game I can still see the shape of scaled torus mesh (it is not really transparent).

What do you mean it’s not really transparent, are you talking at the top it doesn’t go fully transparent at the end of the gradient?

I expect only gradient should be visible and very top of the torus should be fully transparent, so I can’t see the shape of the torus in the game.

I am thinking what you are seeing is maybe specularity or something else though the material/shader you are using, for instance you can try changing the Shading Mode under Shading to Unshaded and see what you see then.

If that doesn’t work, there are other things you can try in the material, but then you’d want to ensure your texture and UV’s are good, more on that below in case.

You’ll want to check your source gradient texture and make sure it goes to pure black where you want it to be pure black (looks like it’s the alpha channel of your source texture).

When it’s in godot and still showing odd, you can try setting your imported texture to lossless to see if that helps, I would just not keep it that way if at all possible.

You can also check the UV’s of the mesh you are mapping that texture to, and make sure where you want the end of the gradient (where it goes pure black) are being drawn on the mesh where you want it to be.

3 Likes

Thanks a lot for your reply, changing shading to Unshaded + disabling the fog (which I have in my scene) did the thing!

1 Like