5
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ BTW, applying the geometry nodes from the object's modifier stack removes the UV data - not even the "UVMap" channel remains. $\endgroup$
    – t.sa
    Commented Sep 27, 2022 at 12:20
  • $\begingroup$ You could use a similar technique to this one: Assign vertex group in Geometry Nodes (v3.3) except you would use a single UV Project modifier instead of vertex edit + proximity modifiers. $\endgroup$ Commented Oct 2, 2022 at 14:03
  • $\begingroup$ If your question has been solved, please be so kind and mark the answer that contributed to the solution as "Accepted answer" so that this question will not continue to be displayed as unsolved. Thank you! Here you can find more information: What should I do if someone answers my question?. If you still haven't gotten a solution to your question, please be kind enough to address it. $\endgroup$
    – quellenform
    Commented Nov 3, 2022 at 9:26

2 Answers 2

4
$\begingroup$

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):

$\endgroup$
1
  • $\begingroup$ The key here is to store a 2D Vector (not a Vector [3D]) $\endgroup$ Commented May 4 at 2:16
3
$\begingroup$

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+)

$\endgroup$
3
  • $\begingroup$ Do you know if there's a way to get these exported UVs to show up when a UV pass is exported in the compositor? $\endgroup$ Commented May 3 at 18:19
  • 1
    $\begingroup$ @AnsonSavage If I have understood your question correctly, you can solve it with this: blender.stackexchange.com/questions/299012 $\endgroup$
    – quellenform
    Commented May 3 at 18:36
  • $\begingroup$ Nice, that did it! Thank you:) $\endgroup$ Commented May 3 at 18:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .