Blender Geometry Nodes - Auto UV Unwrap and Rotate Modifier
Geometry nodes modifier to unwrap a mesh with the option to rotate the uv islands to a world space direction. Great for things like rocks with drips where the UVs need to be vertical.
This modifier combined with my uv unwrap modifier makes procedural geometry exportable without applying the modifiers, creating UVs and setting texel density each time you export. Real-time on meshes under around 10k triangles. Requires Blender version 3.5 beta or higher.
How to Use
Select a mesh and add a "Geometry Nodes" modifier.
There are four ways to define uv seams. Sharp edges, edge angle and material border. If you select more than one then they will be combined.
Sharp Edges - Use sharp edges as uv seams. If you check the "clear sharp edges" checkbox then the sharp edges that you define will be removed by the modifer so that they do not create sharp edges and are only used for uv seams. There is currently no way to get seams in geometry nodes so uv seams cannot be used. Sharp edges can be used as a work-around.
Edge Angle - Use edge angle for uv seams. The edge angle is in degrees. Unfortuantly this does not work as well as Blender's smart unwrap. Smart unwrap does more than only use edge angle.
Material Border - Use the border of the defined material as a uv seam.
Attribute - Used an edge boolean attribute to define uv seams. Geometry nodes do not have access to uv seams. One way to get around this is to use a python script to copy the uv seams into an attribute. A script to do this can be found at https://blender.stackexchange.com/a/269344
Limit to Material - Use this to limit which faces will be unwrapped. Unwrapping will be limited to faces with the defined material.
UV Map Name - Set this to the name of the UV map attribute. Default is "UVMap".
Rotate UVs to face up in world space (or any other direction)
If you want all of the uvs to be oriented in the same direction for example you are modeling walls and want drips on the walls to all be vertical then check the "Rotate UVs to World Direction" and set the "UV Rotation World Direction". Set to 0,0,1 for UVs to be vertical.
Use this to pack UVs into 0 - 1 space. Settings for this can be found in the Blender Docs
If you use the asset library you can find it under the "Enno/uv" folder.
How to get it
Grab it from Gumroad. MIT license.
Also check out my texel density modifier.