Gravity Star, Make a bone point in one direction

Have you come up with a good Moho trick? Need help solving an animation problem? Come on in.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
super8mm
Posts: 340
Joined: Sun Oct 12, 2008 11:22 pm

Gravity Star, Make a bone point in one direction

Post by super8mm »

In this example we have a character who has a pony tail (blue bone) and we don't want to spend time animating it to make it fall to gravity when the head tilts (red bone). This is where the Gravity Star comes in. (purple bones)

The pony tail parents are the Head -> Neck -> Torso -> Ab2 -> Abdomen -> Hip. So the star will require 6 points to have the pony tail match the hip bone angle.

The Gravity Star is a cluster of bones that are all at zero offset from the pony tail bone to avoid wondering from its attached location when rotated. Each spike of the star is a controlled bone that is the opposite angle (-1) of all its parents. Thus any angle accumulations done by its parent bones are subtracted. The resulting angle of the pony tail will always be the same angle as the main parent bone.

Example anme file:
http://www.mediafire.com/?mznmcjdjjmy
Image
User avatar
Víctor Paredes
Site Admin
Posts: 5646
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

It's very clever, thanks for sharing!
It could have a lot of uses (which I haven't thought yet)!

PD: For this kind of thing I used to use the LM's hanging bone script. That script makes a bone always look down no matter the position or rotation of any other parent bone. I was looking for a solution for a necklace and Genete talked me about that little script.
Image Image Image Image
Moho Product Manager

www.mohoanimation.com
Rigged animation supervisor in My father's dragon - Lead Moho artist in Wolfwalkers - Cartoon Saloon - My personal Youtube Channel
User avatar
Víctor Paredes
Site Admin
Posts: 5646
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

!

Post by Víctor Paredes »

It's a fantastic use of controlled bones. I love it!
I'm playing with it and works perfect. Even the construction is easy and fast (I first select all the star bones and assign -1 to a single bone, then I change each star bone controller, without having to write "-1" all the time)

A great feature is you can have a bone maintaining its rotation on any angle, not just looking down. So it can be useful for many things, for example, for a bag on a character's hand or a head maintaining its point of view no matters how the body is moving. Another fantastic thing is you can animate the bone angle, so it can change on time, or even give it dynamics.

Thanks again for sharing. Genete showed some tricky fantastic things you could do using controlled bones, but I never thought in this particular use.
Image Image Image Image
Moho Product Manager

www.mohoanimation.com
Rigged animation supervisor in My father's dragon - Lead Moho artist in Wolfwalkers - Cartoon Saloon - My personal Youtube Channel
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Really very clever and interesting!
-G
User avatar
super8mm
Posts: 340
Joined: Sun Oct 12, 2008 11:22 pm

Post by super8mm »

Glad to inspire. :)
User avatar
neeters_guy
Posts: 1614
Joined: Mon Sep 14, 2009 7:33 pm
Contact:

Post by neeters_guy »

I had to look your file and read your description like 6 times before it I got it. So this star setup could be added to the end of any chain of bones--eg., arm or legs--to keep a shape pointing in a constant direction? Brilliant! :)
User avatar
Onionskin
Posts: 253
Joined: Wed Mar 04, 2009 2:01 pm

Post by Onionskin »

selgin wrote: PD: For this kind of thing I used to use the LM's hanging bone script. That script makes a bone always look down no matter the position or rotation of any other parent bone. I was looking for a solution for a necklace and Genete talked me about that little script.
Selgin,

where can I find that script please?
User avatar
Víctor Paredes
Site Admin
Posts: 5646
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

Onionskin wrote:
selgin wrote: PD: For this kind of thing I used to use the LM's hanging bone script. That script makes a bone always look down no matter the position or rotation of any other parent bone. I was looking for a solution for a necklace and Genete talked me about that little script.
Selgin,

where can I find that script please?
Here you have, but I'm not sure if it works with 6.1
viewtopic.php?t=1928
Image Image Image Image
Moho Product Manager

www.mohoanimation.com
Rigged animation supervisor in My father's dragon - Lead Moho artist in Wolfwalkers - Cartoon Saloon - My personal Youtube Channel
User avatar
Onionskin
Posts: 253
Joined: Wed Mar 04, 2009 2:01 pm

Post by Onionskin »

thank you selgin!
User avatar
Onionskin
Posts: 253
Joined: Wed Mar 04, 2009 2:01 pm

Post by Onionskin »

Yes, you are right selgin, that script is not working with 6.1 :cry:
User avatar
Rai López
Posts: 2228
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

It should work...

That I've observed just now, thanks to the lua console window, is AS seems to have problems to navigate between paths that use some kind of spécìal chärâctér!?!? At least that cause it jumped to me with a "cannot open C:\Documents and Settings\Ramón López..." message. This is very weird and I'm pretty sure it didn't happen to me before although, OTOH, I'm not pretty sure if that really happened to me before... but, I suppose I'd remember it...

...Whatever! Have you tried to put the two files (.moho & .lua files) inside a folder named "New folder" (in example) under C: (in example) to test it? Cause that little script worths...
...
User avatar
slowtiger
Posts: 6067
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

The same problem came up with some rendering issues lately. Yes, AS chokes on special characters in a path, so it's best to avoid them.
User avatar
Onionskin
Posts: 253
Joined: Wed Mar 04, 2009 2:01 pm

Post by Onionskin »

it works! thanks guys :D
User avatar
Rai López
Posts: 2228
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

slowtiger wrote:Yes, AS chokes on special characters in a path, so it's best to avoid them.
Course! although I learned that lesson a bit too late... Anyway, that seams weird (to me at least) is that, as moho uses relative paths to locate things like embedded scripts, why it should get in trouble with a special character in a parent of a parent of a parent folder? If really moho doesn't take that into account and it finally saves this kind of paths: layer_script "hanging_bone.lua" into the mono file, where there is no special characters at all...

Well, sure it'll be technically logical, but I'd never have thought that had something to do with that, if it hadn't been for the Lua console clue...
...
Post Reply