Deform Geometry Along a Curve in Blender Geometry Nodes

This guide explains how to deform any mesh along a 3D curve using Blender's Geometry Nodes. You will learn how to map an object's bounding box coordinates to the curve's factor, sample curve attributes such as position and tangent, and accurately transform vertices to follow the curve's flow without relying on the legacy Curve Modifier.

1. Prerequisites and Setup

  1. Create or select a mesh object you want to deform (ensure it has enough subdivisions along the length axis to bend smoothly).
  2. Create the target Bezier or NURBS curve.
  3. Add a Geometry Nodes modifier to the mesh and open the Geometry Node Editor.

2. Map the Mesh Axis to Curve Factor

To align the mesh along the curve, you must normalize the mesh's length axis (commonly the X or Z axis) into a 0-to-1 range:

  1. Add a Bounding Box node and connect the Geometry input to it.
  2. Add a Position node and separate its axes using a Separate XYZ node.
  3. Separate the Min and Max outputs of the Bounding Box using two Separate XYZ nodes.
  4. Add a Map Range node:
    • Connect the selected axis (e.g., X) from the Position node to the Value input.
    • Connect the Min of that axis to From Min.
    • Connect the Max of that axis to From Max.
    • Set To Min to 0.0 and To Max to 1.0.

The output of this Map Range represents the curve factor for each vertex.

3. Sample the Target Curve

  1. Add an Object Info node, select your target curve, and set it to Relative.
  2. Connect the Geometry output of the Object Info node to a Curve to Mesh or directly into a Sample Curve node (in Blender 3.4+, use the Sample Curve node; in Blender 4.0+, use Sample at Index or Sample Curve in Factor mode).
  3. Connect the output of the Map Range node to the Factor input of the Sample Curve node.

The Sample Curve node now outputs the exact Position, Tangent, and Normal on the curve corresponding to each point on your mesh.

4. Calculate Vertex Offsets

To preserve the cross-sectional shape and thickness of your mesh:

  1. Use the remaining two axes from the mesh's initial Separate XYZ position (e.g., Y and Z if X is your length axis).
  2. Add an Align Euler to Vector node:
    • Set the vector input to the Tangent from the Sample Curve node.
    • Set the primary axis to match your mesh's deformation axis (e.g., X).
  3. Combine the local Y and Z offsets using a Combine XYZ node (leaving the length axis set to 0).
  4. Add a Vector Rotate node (set to Euler) to rotate the cross-sectional offset by the Euler rotation generated in step 2.

5. Apply the New Positions

  1. Add a Vector Math (Add) node.
  2. Connect the Position output of the Sample Curve node to the first input.
  3. Connect the rotated cross-section offset vector to the second input.
  4. Add a Set Position node between the original geometry input and the group output.
  5. Connect the result of the Vector Math (Add) node to the Position input of the Set Position node.

Your mesh will now smoothly bend, twist, and deform along the curve in real time while retaining procedural editability.