View Full Version : Rolling soft ball set up

01 January 2008, 03:24 PM

I have to set up a rolling ball that isnīt totally spherical, and itīs soft. I need to make it roll through a non straight line and make it appear soft. I think i could create a squash deformer, point constrain it to my geom, group my geom to itself, and animate the group trough a motion path so my geom is free to rotate in any way. But i would like to know if it would be possible to create an expression that relates my rotation to the distance covered. I know how to do it in X Y Z axes, but how could i relate it to the distance covered in the u of the motion path?

Any idea on how to make it soft would also be appreciated



Matt Leishman
01 January 2008, 09:42 PM
this isn't a full answer to your question, but I know that maya has a "makeRoll" mel command which generates an expression i believe to allow for appropriate rolling of a ball on a surface. You might be able to build that into your squishy ball rig to get the roll you need and the squish you need.
My 2 cents at least.


01 January 2008, 09:31 AM
Where can i find this make roll script?

01 January 2008, 01:23 PM

makeRoll objectName groundHeight boxSimulation diameter

Creates an expression that simulates rolling an object on the ground. The rotation of the specified object is set based on the change in position from the last time the expression was evaluated. The start rotation values(for frame 1) are initially cached in dynamic attributes added to the object: startRotX,Y and Z. Look under the extra attributes block in the attribute editor to change these values. Note that one should keyframe the X and Z position of the object to animate, but not key the rotate values because the expression sets these using rotate commands. When the animation is satisfactory one should then bake the result, as scrubbing the time slider or rendering will otherwise have inconsistent results. Note that when the current frame is greater than 1 you can interactively move the object in x and z while seeing the effect of the rolling rotation. If you are using radians for your rotate values, you will need to remove "rad_to_deg" from the created expression.

MEL examples

// Create a 1 unit sphere rolling on the groundplane
makeRoll nurbsSphere1 0.0 false 1.0;

// Create a rectangular prism rolling on the groundplane
scale -r 1 2 3;
makeRoll nurbsSphere1 0.0 true 1.0;

// Create a card rolling on the groundplane
scale -r 1 0.7 1;
makeRoll plane1 0.0 true 1.0;

// Create a torus rolling on the groundplane
torus -ax 0 1 0 -hr 0.5;
makeRoll nurbsTorus1 0.0 true 0.5;

Quoted directly from the Maya documentation (F1). Which has almost everything you need.

Matt Leishman
01 January 2008, 05:14 PM
what he said :)

I guess i just figured that when i said "maya has a "makeRoll" mel command" that one would know to look up the mel command in the mel reference. I'll be clearer next time, my bad. :shrug:

01 January 2008, 10:08 PM
Thanks for the info, the script works pretty well with rounded objects!!

CGTalk Moderation
01 January 2008, 10:08 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.