Forgive me if this question is already asked.
I'm trying to find a good way to UV unwrap procedural created meshes. Windows for instance, but I just can find the right way. Hopefully someone can help me?

I've already read a lot of discussions about manually UV unwrapping meshes created by extruding curve profiles along a path by capturing the vectors of the curves before creating a mesh with "Capture Attribute" and store them in a attribute "UVMap".
I'm able to create index or factor/length based face corners in the Vector domain, but these face corners are rectangular shaped, because as far as I can understand it just combines a single curve length (the length between 2 control points) of the profile curve (U) and the path curve (V) with eachother and it doesn't take into account that the created faces on the inside of the path are smaller then on the outside of the path and the quad faces are not particular rectangular. The result is stretched UV's.

Why so difficult when there is also a worked out solution: UV Unwrap node? Well the UV Unwrap node works initially fine, but when I change the dimensions of the curve profile, the UV islands don't stay in place. The islands gets even rotated and I can't control it. This probably happens because of the implemented "Pack Islands".

So therefore I prefer to manual unwrap so I have full control of the UV unwrapping. Is it possible to project the faces of the gernerated mesh to a UV and sort them in a certain order, comparable with the capture attribute solution? This way the shape of the face stays when converted to UV's, like with the UV unwrap node.

I was thinking of something like:

Set Positon node to set all vertices based on (the center of) the faces to $(0,0,0)$ and arrange them by offset each face by the length of the curve profile and project them om the Z axis by using the Align Euler to Vector node with a normal set to $(0,0,1)$. But I haven't managed this yet to get this working.

I will try later to upload some images to clarify my case.

Big thanks in advance for any help.

Cheers, M3D

Edit: images added

The provided example is just a simple star (16 curves) extruded along a square (4 curves) which results in 4 x 16 = 64 faces. The last node "UV printer" is just to visualize the UV's.

UV length based vectors

In the first image the UV's are created based on the length factor in the point domain of the spline of the profile curve. All UV faces are the same size, which result in stretched textures. The UV unwrap underneath convert the faces to the right UV face shape.

UV unwrap node small size mesh

2nd image are the UV's created by the UV unwrap node with some seams added to unwrap it correctly. Already you can see in the "UV print" that not all UV islands are in the same direction.

UV unwrap node large size mesh

When I change the size of the path (or profile) the results of the UV packing by the UV Unwrap node will be different.

So how can I realize the UV faces as with the UV Unwrap node but still be able to control the sorting of the UV's?

  • $\begingroup$ It might be helpful to people trying to help you if you uploaded an example blend file to the site blend-exchange.com and add that link in the question. $\endgroup$
    – Rick T
    Commented Jan 7 at 18:50


You must log in to answer this question.

Browse other questions tagged .