A node group for Blender that creates curve-based meshes with UVs based on Geometry Nodes.
Unfortunately, Blender does not currently generate UVs with the Curve to Mesh node, which means that texture mapping is not really possible. This node group generates these missing UVs for you, based on the existing face corners.
Unlike the approach of calculating the UVs based on vertices, this variant calculates UVs based on the face corners. The node works with all types of curves and can also process cyclic curves as well as multiple curves simultaneously.
The solution presented here is an excerpt from an even more extensive project available in the Blender Market, which can also handle overlapping profile curves, as well as correct the normals of the generated faces (interesting for letters or other complex shapes):
Open source may be all well and good, but development costs time and money. With your contribution you support new features and further updates. Thank you!
Get the full version here:
See it in action on YouTube
- Add/import the node group from the blend-file
- Connect the base curve and the profile curve to the node
- Connect the output
UV Map
to a new socket ofGroup Output
- Connect the output
Caps Mask
to a new socket ofGroup Output
(optional, if you want to make the scaling/texturing of the caps independent of the side faces) - Set the
Attribute Domain
of this group outputs to Face corner (!!!) - Add a Set Material node to the geometry before
Group Output
- Assign an identifier for this attributes in
Output Attributes
- Load the attributes in the shader with the previously assigned identifier
Remember: This node works with Face Corners and not with Points, so always pay attention to the outputs.
You can find detailed documentation here: Curve to Mesh UV - Perfect UVs with Geometry Nodes
- This free version is optimized for Blender 3.4, but can be easily adapted to version 3.1 with a few minor changes (Lite and Pro are compatible to 3.1+)
- The Lite and Pro editions include more functions for processing intersecting profile curves and other very nice features
- The Lite and Pro edition can be purchased at Gumroad or Blender Market
- A more detailed description can be found on blender.stackexchange.com
- On blenderartists.org, the very talented user zeroSkilz has an interesting project in which an older version of this mechanism is also used: Z-Curve-Sweeper for Blender 3.0 (Curve-to-Mesh with superpowers)
Please consider a small donation if you like this project, or buy the full version to support further development. Thank you!
Dedicated to Dominik Mörth
Written by Stephan Kellermayr