Page MenuHome

UV Map node seems to be broken
Closed, ResolvedPublic


System Information
Operating system: Linux-4.18.0-18-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GTX TITAN X/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 418.56

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-06-19 18:29, hash: rBd30f72dfd8ac
Worked: (optional)

Short description of error
The UV Map node does not seem to give the correct results, no matter what UV Map is chosen.

Exact steps for others to reproduce the error
Open the attached file

Switch to rendered view (Cycles).

Note the while lines on the model.

Note in the material that the texture node set to "Panel_Lines.png" is taking input from the UV output of the Texture Coordinate node.

Change the input of the texture node to the UV Map node.

Note the White lines do not display, no matter what UV map you select in the UV Map node.

I believe this is incorrect behaviour. The texture coordinate node uses the default UV map. The result should be the same using the UV Map node when set to the default UV map.

Event Timeline

I can see the problem. I'm just not yet sure if this is actually a bug or a user error.
The issue seems to be related to the boolean modifiers. When I disable them all, it works as I'd expect.

When I create a new UV map from scratch, it also behaves different. Not sure what is going on...

@Jacques Lucke (JacquesLucke) I don't see how this could be user error. I have had the boolean modifiers for several versions of my file now. It was behaving normally until I created some new UV maps this morning. Adding the new UV maps broke it.

The bottom line of this is - behaviour should not change when literally all you do is swap between the Texture Co-ordinate node and the UV Maps node set to the default UV Map. The result should be identical. I don't see how I can cause that by adding some booleans, it is fundamentally wrong behaviour.

If you Control+Shift+Click the UV Maps node, you can see that it is outputting Black no matter what map it is set to. It seems to me that the UV Maps node has "lost track" of the actual UV data.

This is a bug.

@Lewis Toohey (Lewis2e) I also just showed it to @Sergey Sharybin (sergey), we don't really know what is going on, so you are probably right.

Are you able to reproduce the issue in a new file?

Can you simplify your file as much as possible, so that it is easier to see what might be the cause of the bug?

OK, I think I have figured it out. I'll try and explain what I think is going on....

If you apply all those Boolean modifiers (by just going Convert To-> Mesh), the resulting object has 8 UV maps. I believe 8 is the maximum.

I had assumed that Blender would combine UV maps of the same name when a Boolean modifier is applied, but it actually duplicates them (so you end up with UVMap.001 UVMap.002 etc.)

I assume because it runs into the maximum, the two UV maps I was actually using in the UVMaps Node ("SimpleBake" and "PanelLines") don't exist anymore when all the modifiers are applied. They seem to get overwritten by the multiple UV maps added by applying the Booleans.

So, going back to before the modifiers are applied, I think the vector output of the UV Maps node is taking the modifiers stack into account. As such, it is looking for maps called "SimpleBake" and "PanelLines" but not finding them.

On the other hand, the selection box on the UV Maps node is not taking the modifier stack into account. As such, the options it gives you in the menu are just those UV maps that apply to the model.

I would argue that this is a bug. You may disagree. Users are accustomed to the UV Maps node listing available UV maps, and flashing Red if you input a name that isn't one of the UV Maps. I also don't understand why applying Booleans duplicates a load of UV Maps, even if they have the same name on both objects. You may argue this is not a bug, and that my circumstances are probably going to be infrequent, but I'd kindly ask that you consider if Blender could behave in less misleading way.... even an error about the 8 maximum UV maps or something?

Also, should Blender really overwrite my existing UV Maps like that without telling me?

I fixed the issue where it's duplicating rather than merging the UV maps.

Making the UV map node reflect the modifier would be good, but it's very hard in general and I would not consider it a bug.

Eventually we'll remove the limit on the number of UV maps as well, and then it will be less confusing if you run into a (valid) situation where you have that many UV maps, but it's pretty rare in practice unless there is a bug like this.

@Brecht Van Lommel (brecht) Sounds like a fair resolution to the issue. Thank you for resolving it so quickly.