1

I am struggling with getting UV maps and smooth shading to work properly at the same time for a mesh generated along a curve using geometry nodes. I have seen some solutions/workarounds (https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/6), but I cannot get them to work for my case without other unwanted side effects. People have solved the UV mapping by opening the closed curve used as the profile for the curve_to_mesh node and then combined the spline parameters for the original curve and the profile curve into a vector and passed that out as an attribute to use for UV in the shader node tree. zeroskilz presents a useful node that does that in the thread mentioned above.

The first problem is that using an open curve creates a "crease" (not the subdivision-type) along the mesh because the open profile curve yields two rows of adjacent faces that have overlapping but not shared vertices/edges. Someone was able to transfer the normals from another generated mesh to solve the problem in a similar case, but I have been unable to replicate that. Even if I could, I don't think it would solve the next problem.

Mesh generated with open curve causes sharp edge because of open edges See the sharp "crease" along the tube?

The second problem arises because I will be using a grease pencil object with the line art modifier to make a cartoonish outline around my mesh, but the non-connected faces along the mesh causes a line to be drawn along it too, which is obviously not what I want (see image below). This means that I need a solution for the UV + smooth shading that doesn't create open edges along the mesh. I might be able to get away with the smooth shading not working perfectly in this case, but it is a frustrating compromise to make.

Open curves also cause problems with line art, due to the open edge What about merging the vertices you say? It solves both problems, but causes the UVs to look awful along the former open edges, I believe because information in vertices or face corners gets lost during the merging. This is a known problem that has been discussed elsewhere. This YouTube video deals with a similar problem by first making the UV, then merging by distance and transferring the UV coords to the merged mesh https://youtu.be/02XNGOVpSV4?t=530. I have tried something very similar, but unlike in the video I get a similar type of mangled UVs along the former open edges:

UV mangled after merging vertices, even when transferring the UV from the unmerged geometry What I do here is that I make the mesh using an opened profile with the help of zeroskilz's node (blenderartist thead mentioned in the beginning), then make UV coords that I transfer back onto a geometry with merged vertices.

Not sure what I can do do solve this. I am quite new with geometry nodes, and on this forum, but I've spent some time searching for a solution, but to no avail.

quellenform
  • 35,177
  • 10
  • 50
  • 133
  • This question clearly shows why I personally am not a friend of this technique with the node group Disconnect Cyclic Curves. You always create an additional point, which gives you more problems to solve. Also, I think it's the wrong approach to solving the problem. Maybe the following post will help you: https://blender.stackexchange.com/a/258247/145249 Note, I am currently working on a leaner solution for this (has been requested here a few times). – quellenform Oct 08 '22 at 18:35
  • Is UVout set to be vertex data, or face corner data? My tests with this show the UV remaining okay following a weld modifier, if and only if the UV attribute is output as face corner data(in sidebar/group/outputs/attribute domain.) In 3.3.0. – Nathan Oct 09 '22 at 06:24
  • @quellenform thank you very much! Your node did the trick. Impressive node slinging! – Erik Marklund Oct 09 '22 at 07:55
  • You are welcome! – quellenform Oct 09 '22 at 08:12

0 Answers0