A Mouse Cord. Dynamic Spline TUT-1
! There is a known bug on mac-c4d 188.8.131.52 – you can not always save the file or it will crash – should be fixed soon!
Lets assume we want to make a wired computer mouse. Or whatever appliance with a wire or cord.
Here are some tricks to make the task a breeze.
Start by making a linear spline from the mouse to the end of the cord, that is 2 clicks in total. Right click in the view and subdivide the spline 20 times or even more. Drag the spline in a SweepNurb and add a circle with a radius of 0.5. Put the SweepNurb in a HyperNurb to smooth it.
Add the Dynamic Spline Tag to the spline.
We want to fix both ends of the cable.
Start by adding two simple cubes of 1x1x1 and make the editable (hit C)
Place them at both ends of the cable. The first cube has to be a child of the mouse object.
Add two Constraint Tags to the Spline. Click on one of them and drag one of the cubes in the text-field.
Select the very first point of the spline and make it a Soft-interpolation. Click on the Constraint tag and hit the Set button. This will fix that point to the cube.
Do the same with the other constraint tag and the other cube and the opposite point of the spline.
Add a plane to make the floor, make it editable (hit C) and add a Hair Collider tag. To get the wire to behave like a smooth snake set Friction to a minimum. Other settings for Stiffness and Rubber can be found in the Dynamic Spline tag.
Hit F8 and move the mouse object. And Enjoy real time wire animation.
Side Note: In my animations I used a Vibrate Tag to move the mouse. However, you must set the priority of the vibrate tag to “expressions -1” (minus one) to get the expected result. Otherwise some lagging will occur. This can also happen with Xpresso or other tags.