Transfer UV Maps with Blender Geometry Nodes
Transferring UV maps procedurally in Blender Geometry Nodes allows you to preserve texture coordinates across generated, deformed, or retopologized meshes without manual unwrapping. This article covers the step-by-step method of extracting UV attributes from a source geometry, transferring them using proximity or index sampling, and writing them back into the target mesh's Face Corner domain using the Store Named Attribute node for seamless rendering in materials.
Understanding UV Data in Geometry Nodes
In Blender, standard UV maps are stored as 2D vector attributes within the Face Corner domain. When manipulating geometry procedurally, standard UV data is often discarded. To restore or transfer this data, you must sample the source coordinates and store them back as a recognized Face Corner attribute on your output mesh.
Step-by-Step UV Transfer Workflow
1. Read the Source UV Attribute
Add an Input > Named Attribute node inside your Geometry Node setup.
- Set the data type to Vector or 2D Vector.
- Enter the exact name of your source UV map in the Name field
(typically
UVMap). - Connect the source geometry into the input pipeline where needed.
2. Sample the Data from the Source Mesh
Depending on your use case, use one of the sampling nodes to project the UV data onto the new geometry:
- For Proximity-Based Transfer (Different
Topologies):
- Add a Geometry > Sample > Sample Nearest Surface node.
- Set the data type to Vector and the domain to Face Corner (or Point if sampling vertex positions).
- Connect the source geometry to the Geometry input
of the
Sample Nearest Surfacenode. - Connect the output of the
Named Attributenode to the Value socket of theSample Nearest Surfacenode.
- For Matching Topology (Same Vertex/Face Count):
- Add a Geometry > Sample > Sample Index node.
- Set the domain to Face Corner and data type to Vector.
- Connect the
Indexnode to the index socket to transfer coordinates 1:1.
3. Store the Attribute on the Target Geometry
- Add a Geometry > Write > Store Named Attribute node into your main geometry pipeline (after generation, boolean, or remeshing operations).
- Set the Data Type to 2D Vector (or Float Vector in older Blender versions).
- Set the Domain to Face Corner. This is essential, as materials will not read standard UV mapping properly if stored on the Point or Face domains.
- Set the Name to
UVMap(or a custom name of your choice). - Connect the output Value from your sampling node
into the Value input of the
Store Named Attributenode.
Setting Up the Shader Material
Once the UV map is stored procedurally:
- Open the Shader Editor for the assigned material.
- Add an Input > UV Map node.
- Select the name specified in your
Store Named Attributenode (e.g.,UVMap). - Connect the UV output to the Vector input of your Image Texture or procedural texture node.