3

I'm trying to use geometry nodes on Blender 3.3 to modify existing UVs of a mesh, while keeping the mesh data otherwise unmodified.

For a minute, I had trouble understanding how to put UVs "back in" to the geometry data, until it clicked that it's an attribute. Here's what I currently have: enter image description here

This doesn't work correctly. In my 3D viewport, the UV map appears to be zeroed out. Looks like 0,0 for all vertices, resulting in flat colour of whatever pixel is at 0,0 of the current texture.

I notice that when inspecting corner data in the spreadsheet view, this method produces a 3D vector in the UV data - without this method applied, the spreadsheet shows a 2D vector. Could this be the issue? If so, how to specify a 2D vector in the geometry nodes?

UV data without geometry nodesenter image description here

Above: UV data without geometry nodes, 3d viewport look

UV data with geometry nodesenter image description here

Above: UV data with geometry nodes, and how it looks in viewport. Note that the vector addition seems to be working fine for the x component, but that an extra component now exists in the vector.

t.sa
  • 31
  • 2

2 Answers2

3

You have basically already understood this correctly and set it up correctly.

However, I assume that you use the node Texture Coordinate in the shader to read the UV map.

But this node always uses the original attribute and obviously ignores all changes made in Geometry Nodes.

To read the attribute changed in Geometry Nodes, you would simply have to use the Attribute node in the shader instead, and then it will work as expected:

enter image description here


(Blender 3.2+)

quellenform
  • 35,177
  • 10
  • 50
  • 133
2

Simply modifying and storing UV map as an attribute seems to work in 3.5.1 without anything else needed in the shader.

enter image description here

That's handy if I want to re-use data for some object, but make it unique looking with the same textured material. It gives fine control and also preview in the viewport unlike some shader tricks.

For anyone else who wants to be able to transform existing UV map with geometry nodes group(it's marked as asset in the file):

Martynas Žiemys
  • 24,274
  • 2
  • 34
  • 77