rigging bones to work with scripted motion

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
synthsin75
Posts: 9972
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: rigging bones to work with scripted motion

Post by synthsin75 »

EricTheFish wrote: Wed Aug 18, 2021 6:32 pm I renamed the pedal axle bone to remove it from script influence and made a new "helper" bone that follows the rotating wheel script instead.
Then I used an angle controller to link the axle bone to the new helper bone and voila! The rig works too! Target bones work as normal.
I must be missing something, because my bones aren't following the target on the bone rotation constrained to the Wheel bone.
User avatar
Lukas
Posts: 1297
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: rigging bones to work with scripted motion

Post by Lukas »

Lukas wrote: Wed Aug 18, 2021 7:31 am
synthsin75 wrote: Wed Aug 18, 2021 2:16 amTo do that using Stan's script, it would have to be modded to write keyframes for the rotating bone.
I’ve made a wheels layerscript that keys the animation (it only keys the necessary frames). I’ll post it here later.
Here's my take on the a script for automatic rotation for wheels, I use it a lot, there's a sample file included. You do need to install the utility file in your scripts folder for it to work:
User avatar
EricTheFish
Posts: 85
Joined: Thu Jun 15, 2017 4:37 pm
Location: Lymm, UK

Re: rigging bones to work with scripted motion

Post by EricTheFish »

synthsin75 wrote: Wed Aug 18, 2021 6:48 pm I must be missing something, because my bones aren't following the target on the bone rotation constrained to the Wheel bone.
Wes, here's my working test rig file along with Sam's modded version of Stan's wheel script. Just unzip in the same folder and Moho should find the layer script.
There are two bone layers each with Stan's modded layer script:
"Direct" uses the script directly on the pedal hub.
"Bone Helper" uses the script on the helper bone with an angle control link to the pedal hub bone.

Both methods work the same here, the only keyframes are for the root bones X position.
cyclist_rig_test.zip
EricTheFish
Artist, musician, animator, coder and dabbler in stuff
www.tech-nique.co.uk
User avatar
EricTheFish
Posts: 85
Joined: Thu Jun 15, 2017 4:37 pm
Location: Lymm, UK

Re: rigging bones to work with scripted motion

Post by EricTheFish »

Lukas wrote: Thu Aug 19, 2021 9:01 am Here's my take on the a script for automatic rotation for wheels, I use it a lot, there's a sample file included. You do need to install the utility file in your scripts folder for it to work:
Great script Lukas, thanks for sharing! :D
EricTheFish
Artist, musician, animator, coder and dabbler in stuff
www.tech-nique.co.uk
User avatar
synthsin75
Posts: 9972
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: rigging bones to work with scripted motion

Post by synthsin75 »

EricTheFish wrote: Thu Aug 19, 2021 11:18 am There are two bone layers each with Stan's modded layer script:
Oh, they're both using the modded layerscript. I thought your workaround was using the original script.
Now I understand.
User avatar
EricTheFish
Posts: 85
Joined: Thu Jun 15, 2017 4:37 pm
Location: Lymm, UK

Re: rigging bones to work with scripted motion

Post by EricTheFish »

Wes, you're right. The helper bone rig doesn't work with the original script as I thought.
My "workaround" is actually irrelevant, I must have not have swapped the scripts properly during my tests or there was come cacheing going on that was interfering. I opened my test file today with the original script and nothing works.

The helper bone idea is therefore irrelevant, you definitely need to use the modded script for this technique. Sorry for the confusion :(
EricTheFish
Artist, musician, animator, coder and dabbler in stuff
www.tech-nique.co.uk
Post Reply