Need help setting up UV mapping for hair cards using Geometry Nodes

I need some assistance with how to generate straight UVs for hair cards that are generated from hair curves (already have the geometry portion working). I tried using the UV Unwrap node and other methods, but of some reason I can’t properly get the UVs to be straight to be able to rotate them to fit any hair card textures I have.

Any ideas on how to achieve this?

Easiest is just to capture Spline Factors:


Good luck!

Thank you so much! I will try it myself once I get home. :smiley:

Are there additional nodes that will maintain the square aspect ratio of the checker texture? Scaling it once would be simple, but I’m not sure how to scale this dynamically to match the curve. Probably Length needs to be a factor somewhere?

Just use Length instead of Factor:

Either way “stretching” due to curvature will be unavoidable (UV Unwrap node gives the least amount of warping/stretching but that is seldom what is desired).

Been able to try out your solution now and it works super well!

I was able to do UV rotations and custom scaling using the different values in the vector as well as making a switch button for stretching/uniform UVs with the Spline Parameter and some extra math nodes.

Here’s my final setup! Again, thanks a lot! ^-^

One weird thing I found is that of some reason the TexTools UV texture doesn’t work well with this setup. The texture is just gray. It does work with the hair card material however.

No experience with TexTools but guessing that it works with UVs and not with Attributes. You would have to convert your curves to Meshes (maybe do an attribute conversion, donno) and it should work :man_shrugging:

Currently, Curves don’t have UVMaps like Meshes do… The hack below may get TexTools to work by hijacking an existing UVMap (Same idea but with UVs instead of Vertex Colors ):

…you can do the above without converting to mesh and keep things dynamic.

Good luck.

I converted it to a mesh and of some reason the UVs aren’t present. Think that might be the problem. Any clue as to why? :smiley:

Maybe I need an UV Unwrap node somewhere?

No…

… If you’re using 2D Face-Corners then Blender should convert the UVs automatically… are you sure you’ve set up your named attribute properly?

Face Corners solved the issue, thanks! I had forgotten to switch it off from Points, which explains the lack of UVs. Again, thanks a lot! :smiley: