Sometimes things go horribly wrong. You want to align an object on a growing Sweep NURBS.
When you use the Align to Spline Tag you can have the following result.
The object is not synchronous with the growth, Grr!

The solution is to make an simple xpresso that replaces the Align to Spline Tag
My model is very simple to illustrate the case.
I have a Sweep NURBS with a free form spline in it. The Sweep NURBS "grows" from 0% to 100% in 90 frames.
I have a Sphere (called Target) following the spline with an Align to Spline Tag set from 0% to 100% in 90 frames.
And I have trouble...
The trouble is caused by the type of spline and the interpolation, but my design does not permit to modify those settings.
Ok lets get started. Delete the Align to Spline Tag.
Add an Xpresso tag.
Drag the Spline and the Sphere in the xpresso editor.
Now add a "Spline-Node" from the general xpresso nodes to the editor.
The node has 3 visible ports, on the left you have the object and Offset port, on the right you have the position port.
Connect the left Object port back to the right Object port of your Spline.
Connect the right Position port to the left Position port of the Sphere.
Click on the Spline node and go to the Attribute Manager
Now you can set the Offset from 0% to 100% in 90 frames.
AND, here it comes... check the "Use Natural Distribution"

Tadaa It should work fine now

Lets take this one step further. we want to make the object tangential to the spline.
Start by opening the Tangent port on the Spline node.
Don't ask me why I do the following steps... it just works.
Add a Vector2Matrix node and a Matrix2HPB and connect them as in the following image

This will point your object in the direction of the spline.
Xpresso is like magic!

Enjoy!
Oh By the way, this xpresso makes it possible to go round and round and round... The Align to Spline Tag is limited to one full circle (100%)
This entry was posted on Jan 29, 2007 at 15:30:40 and is filed under Xpresso. You can follow any responses to this entry through the RSS 2.0 feed, or leave a response (below) .
Another good tip for Cinema4D.
Thanks you
Great!
Thanks!
You can also solve this by changing the spline interpolation from adaptive to uniform.
-m
You're Magic, but I have a impossible problem: a object on a spline( with the tag align to spline) and a deformer (wind or formula or what you want), child of the spline. The object don't move on the deformed spline but follow a flat trajectory. Whyyyyyy?????? There is a solution? Or not? excuse my poor english
Hello Base80
merci pour tous tes tuto
j'ai une petite question par rapport a celui la
si tu changes ta boule par un cylindre, et dans mon cas par un jack audio
comment fais tu pour que le jack suive la trajectoire en tournant comme elle, je veux dire pour que le jack soit aligné du debut jusqua la fin dans le bon sens avec ta spline ?
merci
Pour un objet plus long je te propose de faire 2 align to spline espacé et de cibler le dernier sur le premier
I am so stupid, didnt read the tuto until the end, my answer is just below, thankx a lot for everything !!
nolt
Hello, thanks for the tutorial, i try to take it to the next level so i try it out with a star shape as my target , so the target is following the direction of the path but it also rotated in H my star shape which i was gonna texture, any solution with that?Gracias
I get it to work if I use automatic keyframing...but it doesn't if I just hit the record button. Any ideas?
Thanks
Two questions:
In 10.5, Vectors2Matrix has four inputs (offset, v1, v2, v3) rather than the one input in your example. What should I do?
I know 10.5 HUD makes this question somewhat irrelevant, but how do I get one of those nice Xpresso user data sliders? I hate having to open up the Xpresso Editor when I want to make offset changes.
it is not vectors2 matrix but vector2matrix node, there is a little "s" in the one you used
for userdata sliders there is a turorial on this site
Does this trick not work with Splines that are set to Linear and have 90º angles? I tried this method using a spine as described and it refuses to point in the right direction! ;-)
I just tried and it does work. you need the tangent port connected to the Vector2Matrix and the Matrix2HPB to get the rotation.
Thanks for your file Eden.
The problem is like the Gimbal lock.
The trick to get rid of this the dirty way is to add some points that you move very slightly outwards, this way the rectangle has more direction
URLs, email, AIM and ICQs will be converted automatically.