godot icon indicating copy to clipboard operation
godot copied to clipboard

Detail mask only applies UV1 even when set to UV2

Open ErinZaharris opened this issue 1 year ago • 1 comments

Tested versions

v4.3.stable.steam [77dcf97d8]

System information

Windows 10

Issue description

Just trying to get a hang of material importing in Godot and I think I found a really annoying bug. I was making a road texture with the road lines as a detail texure on top. The asphalt and the roadlines have 2 seperate UVs that both imported properly

I used the detail section of the material to put the roadlines on top and set it to UV2. The roadlines need a mask to mask out just the roadlines.

Everything works fine without the mask: godot bug

But when I add the (obviously needed) mask to the detail section it reverts to UV1 even though its still set to UV2 godot bug 2 png

Steps to reproduce

Take a mesh with two UV maps.

enable Detail in material, Set Detail to UV2, add Detail Mask

Minimal reproduction project (MRP)

detailmask_bugreport.zip

all you have to do is go into the surface 0 material on the included model and under Detail/Mask add the Roadlines_mask.png

before you add that mask you can see UV2 is working properly. After you add the mask you can see it's still using UV1

ErinZaharris avatar Oct 18 '24 21:10 ErinZaharris

godot hard codes the second uv for gi mapping in many places. I suggest using the uvs from 3rd to 8th uvs for this purpose.

fire avatar Oct 18 '24 23:10 fire

This PR adds scale/offset as separate properties from uv2.

Radivarig avatar Jul 02 '25 21:07 Radivarig