Jump to content

Rolling Ball


Recommended Posts

Hey Guys.

Ive made a decent rolling ball rig. To play with Houdini's Animation tools. I have everything i need, except one thing.

Procedural or automatic ball roll.

I downloaded a mel script from highend 3d and tried to decipher it but my mel knowledge isnt what it used to be. So if anyone out there has any suggestions i would be happy to try it out.

All i would like to know how to do is Translate the ball in the X, or Z direction and have the ball rotate in the appropriate way. I would love it if i could also have a Y rotation but X, Z are the most important.

Thanks again. hjbtrf

Link to comment
Share on other sites

I have everything i need, except one thing.

Looks like this is the crucial thing ;)

Take a look here: silly challenge, rolling boxes

Or maybe here: Quaternions - Where To Enter Them?, just another sandbank

The script [1] in the second post originally animates rolling spheres and works perfect in 3dsmax [2].

After reading and asking a lot about Quaternions I now get the impression that the 3dsmax implementation might be somewhat different/simplifying from the puristic Houdini approach - if this is even possible. Anyway - I was never able to recreate it.

But I had fairly good results recently using a combination of fileSOPs set to read and write modes to apply the discreet steps of rotation to the geometry.

Quite a disk scraper. I can publish it maybe beginning of next year.

If you're a master/apprentice user you might want to take a look into DOPs and the SOP solver.

[1] Cuneyt Ozdas "Rolling Ball" http://www.cuneytozdas.com/tutorials/maxscript/

[2] http://www.preset.de/2007/0525/rollingcube/

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

what's the status of this rig?

in regard to the "automatic rolling" based on movement, is there a way to record or save the previous position of the ball even if the movement is not animated?

IOW, is it possible to have such a feature in a rig and have it rotate the ball while the slider for tx or tz are moved without having keyframes or channels on tx or tz?

Link to comment
Share on other sites


Best to do this in CHOPs. See the attached hip file and dive in to the CHOP network. There is a neat Distance CHOP that does all the work. You then have to convert linear to rotation. That's also done in there.


The file is fully commented for you. MMB (MiddleMouseButton) on the commented nodes (the ones with the colored names, blue by default but can change based on whatever color scheme you are using).

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...