Follow Bend Deformer
Xpresso – by: base80
April 4th, 2006
Here is a little tutorial that places an object on top of a deformed (bend) object.
![deformer spring](https://web.archive.org/web/20061026121444im_/http://www.base80.com/xpresso-files/follow-deformer/deformer.gif)
[More:]
Ok lets get started with a simple little model of a spring with a sphere on top of it.
SweepNurb a circle on a helix spline put it in a null with a bend deformer.
Make another null with a sphere in it and call it Top-Null.
Now here comes the trick, make a cube with the same hight as the helix (10.200.10) with 2 segments in X and Z and convert it to poly (C).
Place the cube in the same null as the deformer and the spring and make it invisible.
Make a third null called Top-Target.
![hierarchy](http://base80.com/wp-content/uploads/2022/11/hierarchy.jpg)
Place a Target Tag on the Top-Null and target it to the Top-Target.
Now add a xpresso tag to the setup and open it.
Drag the invisible cube, the Top-Null and the Top-Target in the editor
Add two Point-Nodes, set them to “deformed points” mode.
Connect the invisible cube to both Point-Nodes.
Connect the position out-port of each Point-Node to the global position of the Nulls and set the point index to the number (structure manager) of the two points as seen in the image below.
![big-setup](http://base80.com/wp-content/uploads/2022/11/big-setup.jpg)
If all goes according to plan the nulls should jump into position in the viewport and the sphere should sit on top of the spring.
Now there is a little problem when animating this setup, there is a lag of one frame in the sphere. To avoid this set the priority of the xpresso tag to “generators” 1 and the priority of the Target Tag has to be set to “generators” 2.
![deformer spring](https://web.archive.org/web/20061026121444im_/http://www.base80.com/xpresso-files/follow-deformer/deformer.gif)
Why did I use two points and all this target stuff? It is to control the rotation of the Top-Null in a correct way, and without getting the gimbal effect.
If you don’t need the rotation one null is enough, positioned at the top centre point of the invisible cube.