Incompetent Secret Agent. Experiment in bone rigging

Want to share your Moho work? Post it here.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

rplate wrote: Vern,
I have a serious question; I noticed that all your demos don't have backgrounds or other objects or characters in the scene. Won't the bone setup effect those as well as the main bone character?

I wouldn't put backgrounds and other elements in the same bone folder as your character. Or at least they shouldn't be influenced by those bones.

If you have a situation where you need to do something like that you can bind points to specific bones or use bone offset to put them in a different spot with different bones to influence them. I like to keep the head totally separate from the body.

On the face rig itself, you need to look at the original vector head that came with it in relation to the bones. Look on frame 0 carefully to see where the mouth and the eyes go.

Another trick I use with complex meshes is to put the shapes on different layers as I draw it or adjust it for the rig. Put the basic head on one layer, the mouth on another, hi-lites and shadows each on a layer etc etc. That way I can work on one problem area at a time and then paste them back into one layer when finished.

This rig works best with as few points as possible... or just the ones you need to define the shape. If you have like 50 points to define a simple curve you got way too many points. You also need to see where the bones are and the points you may need there for smooth motion, like around the cheeks and jaw. Use the original drawing from my sample as a guide.

This rig will NOT work with un-edited imported Illustrator or EPS files. WAY too many points.

I am going to document this set up process as thoroughly as I can for the final product. It isn't as hard as it seems, but you do need to have a basic grasp of using bones... at least moving them around.

I have had some ideas about aiding the setup. These are things I've been using to make it easier. Like selecting a small group of bones and changing the parent to a "mover" bone temporarily for easy placement.

For instance the lip bones are all parented in a chain. So only the first bone in the chain needs to be re-parented. They eyes and lips are the most "bone dense" areas. Each lip has... uh... has 6 sets of chains. 3 for each side. You may need to move those bones. This is the hardest part in my opinion. There are 5 bones in each chain plus an additional 3 bones for the center of each lip, need those center bones so the lips don't split in half ;) ).

And the teeth are sort of below the mouth in the set up. The "bottom" points of the teeth are right on the lip bones. These are the teeth areas that stay inside the mouth.

The points of the teeth that show are controlled by a set of bones below the mouth on frame 0. This allows a separate control. I may add in some extra teeth controls. Sometimes you want to change them in relation to the lips.

Once I document the process it isn't that hard... it IS DEFINITELY considered work. But it isn't hours and hours. There is a lot of repetitious moving of bones though. I've found they don't have to be "exactly" in the same spot (I may offset them slightly for ease of selection.)

I could go on and on but I won't ;).

Bare with me as I finish this up. It is complicated and I want to document it and also I plan to <gasp> redo the whole thing from scratch so the bones are ordered in the drop down list properly.

p.s. Rasheed wrote a new script that controls LAYER Z-DEPTH! This is GREAT! It will allow the translation of a bone change the ordering of layers for ears for better head turns... and of course arms and legs. By dragging a bone you can make a layer pop up in front of other layers. You have to use depth ordering in the layer properties.

-vern
rplate
Posts: 257
Joined: Fri Oct 13, 2006 3:58 pm
Location: Minnesota USA

Post by rplate »

heyvern wrote:I wouldn't put backgrounds and other elements in the same bone folder as your character. Or at least they shouldn't be influenced by those bones.
-vern
Vern,

You are such a gracious and patient guy. I was doing exactly that. I printed out the BONES tutorials and went through it again, as meticulously as I possibly could and the first thing I found was I had put my movie in the bone folder and you hit the nail on the head. Everything in the background warped. Duh!

I want to put a 30 sec animation in the contest (just for fun) and I'm the guy who likes point animation. But am finding it so time consuming and I would like to lip sync with your bone set up. And, so far for me, that has been just about as time consuming. :cry:

Perhaps one of the problems you mentioned was too many points. Although I draw my vector images, I need points to redraw areas that change in sometimes drastic ways, sharp curves and the like. And once you get away from the zero frame you don't want to add points. So I need to plan my drawings to fit less points? That's what I think distorted the vector drawing I showed you above.

Again, thank you for not writing me off as "dumb". And for giving me such a detail explanation.

It's back to the drawing board for me.
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Use the vector art in the sample file as a guide.

You can draw a new face in that general position and it should work pretty well with the set up. The eyes on mine are kind of big but you can adjust those if needed.

I have a couple of very different characters working off almost identical rigs. An older slightly fat technician, and a tough in shape agent with a beard.

I drew the technician from scratch. The agent was modified from my other character. After they were DONE, I moved the points to match the bones.

Since the bones move the points as they are on frame 0, even if they don't line up exactly they still work. It is the fine tuning that makes it perfect.

You get the face looking just the way you want, then strategically move blocks of points to the bones, maintaining your original "design". Yes you move the lower lip down from the upper lip, but the "shape" stays the same and the bone offset moves them back.

There is a bone for the WHOLE MOUTH that you can offset on frame 0. This is helpful. I can adjust the mouth positioning and other things using this top level bone. The eyes also have a top level bone that can be offset for specific characters.

Like I said, once I document the procedure it won't be so confusing.... uh... or just a little less confusing.

-vern
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Wooohoooo!

Okay, the big problem for my face rig was the eyes and ears mostly. The eyes need to get "closer" together slightly as the head turns. The ears need a way to travel opposite of the main turning action so as to go out of view.

I have been struggling with a bunch of options. None of which worked to my satisfaction. Genete had the best solution coming up with that "spring" bone rig that simulates a "3d" turn using... uh... all that "math" stuff.

http://www.lostmarble.com/forum/viewtopic.php?t=7726

Then Rasheed wrote that TransRotate script so I could use the rotated/translated bone to translate other bones.

http://www.lostmarble.com/forum/viewtopic.php?t=7780

However Genete's rig required a bunch of extra bones and my rig is busting at the seams already with bones.

I tried to revise Rasheed's script to "reverse" constraints. It worked but was not... working to my satisfaction and I am a terrible LUA programmer.

So, I visualized in my head what needed to happen in the simplest terms and I came up with a simpler variation of the spring rig from Genete. Along with Rasheeds script I think I have solved it!!!

(you need Rasheed's transRotate script to use the moho file. The link is listed above in this email. It should be a layer script on the bone layer.)

http://www.lowrestv.com/moho_stuff/trans_bones_rig.moho
http://www.lowrestv.com/moho_stuff/trans_bones_rig.mov
Image

Instead of 3 bones for the "spring" part of the rig just two are needed. A second bone handles side to side motion using the same rotation/translation concept. They both rotate from a constraint to the same bone.

I have no idea why this works, but it does. Ask Genete ;) . The eyes "squish" together based on the center bone just like I did originally. But now each eye "parent" translates based on the "spring" bone on the far side of each turn thus solving my problem. I still need to tweak it.

This may even reduce the number of bones, since there is a more "logical" method for the motion and specific "left/right" motion control. Good thing since I need some more bones for the ears.

The only drawback is that to turn the head vertically and horizontally requires rotating two bones instead of dragging just one. I decided this is a small sacrifice for a better result.

I am not after absolute perfection with this rig. I don't need perfect mathematically defined 3D rotation. I was so close without it I just needed a tiny nudge to get a tad closer. I will continue to revise this.

Now that this problem is solved I can go back and finish up my face rig. I will need to adapt the new bones to the old rig. This was my road block that was driving me crazy.

I plan to design a bunch of different fully rigged characters (with bodies of course) and sell them. I could do that all day long. Might as well sell them. As I mentioned previously I will include instructions for the rig and how to adapt if for your own characters.

-vern
human
Posts: 688
Joined: Tue Jan 02, 2007 7:53 pm

Post by human »

Vern wrote, "I plan to design a bunch of different fully rigged characters (with bodies of course) and sell them. I could do that all day long. Might as well sell them. As I mentioned previously I will include instructions for the rig and how to adapt if for your own characters."

To which I say, "Yessssssssss!!!"
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

heyvern wrote: I have no idea why this works, but it does. Ask Genete ;) . The eyes "squish" together based on the center bone just like I did originally. But now each eye "parent" translates based on the "spring" bone on the far side of each turn thus solving my problem. I still need to tweak it.
Now I cannot open moho file because not at home. Let's study later.
For the moment I have only one comment to your solution.
(you must forgive me because I'm so perfectionist)
In the front position the horizontal length of the eye is smaller than the same dimension when it turns. It is not realistic. It should be smaller. A little but smaller.

I have other comment. It is supoused to be the shape of the eyeball with the eyelids over it, isn't it?. So what about of the iris and the pupil. Will they still being a circle?
In the real head turn the eyeball curvature covers so quick the external union of the lower and upper eyelids, and the iris and pupil go so far away
and touch the eyebal edge when the character is looking forward and turning to 3/4. A hard issue.
Let me study it when finish my contest animation...
HassleHead
Posts: 59
Joined: Sat Jan 06, 2007 12:37 am
Location: NYC
Contact:

Wow

Post by HassleHead »

It took me awile to work through this entire thread but it was well worth it. My brain is squinting at the complexity and attention to detail in Vern's rig. It looks great. Amazing. And your short, "The Incompetent Secret Agent" is also really sweet. I disagree with one thing: I liked the music you set it to. This is a wonderful thread and highlights such great work. Thanks so much for sharing. I second (or third or fourth) the opinions of all the posters to this thread that you should sell your rig Vern. There's a market for it.

-David
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I have actually moved on way past this example.

I am using your (Genete) idea of pin pointing spots in 3D space with offset bone rotations to get a MUCH better 3D effect.

I will post another example soon that has really nice rotation for the eyes that maintain the proper shape and distortion. I actually use two different bones now to translate the eyes using the rotation instead of just the translation I was using in the past. One bone is set further out so the outside of the eyes are more realistic on the far side of the turn.

Using this new spring rig I can easily add in additional offset bones that can be used for many different points in the "fake" 3D space... for the nose... the ears... chin... etc. I add new bones as children then I place them in different locations to adjust the rotation/translation distance. It is easier for me to just eyeball this using onion skinning.

This is turning out great.

The tricky part is doing the up and down. I got the side to side so the up and down should hopefully be just as simple... I hope. I have to figure out exactly how to handle that. The up down was always very subtle anyway. This isn't 3D software. It doesn't have to be "perfect". ;)

I wish we had could use different bones for X and Y translation constraints. That would be amazing and be a piece of cake.

I have a crazy idea to use Rasheed's script in combination somehow with constraints... to split the translation constraints. One bone constrained to two. See how that goes.

-vern
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Re: Wow

Post by heyvern »

HassleHead wrote:I disagree with one thing: I liked the music you set it to.
Woohoo!

I created that on the computer and I want to use it... but... I wrote it... and I'm sick of hearing it. ;) Besides I'm not a musician by any means. I can barely read music... no not barely.. I can't.

I may try to do a more techno version of the same song (it is midi. Just need to experiment with better instruments) or try something new.

I bought a copy of Reason a while back but I had a hard drive crash and lost a ton of stuff I'd done with it. I've been importing some old midi stuff I've done over the years and trying out some better virtual instruments.

It will be the temp track with the possibility of being the final.

-vern
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Genete wrote:
heyvern wrote: I have no idea why this works, but it does. Ask Genete ;) . The eyes "squish" together based on the center bone just like I did originally. But now each eye "parent" translates based on the "spring" bone on the far side of each turn thus solving my problem. I still need to tweak it.
Now I cannot open moho file because not at home. Let's study later.
Honestly I don't know how it works!! It is a strange combintation of sliding bones and rotation bones.
Regarding to your last post, I will try to show you a new idea about combine Rasheed's transrotate in a dfferent way. Meanwhile you can go with your new ideas. Perhaps we are thinking about the same... :wink:
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I think I figured it out.

On frame 0 the two bones controlling the left and right side of the "3D" rotation are rotated at 45 degrees to start. (I added a new left control to my rig to go along with the right. More options, better control).

When the parent of these bones is rotated the translation of the bones on the ends gets that... eliptical thing going. One side "slows" down while the other "speeds" up... I can't explain it right. Like those double spring bones in one of your sample files.

The center bone however, is straight, so I can get a full even translation from left to right for elements that don't need a left and right side, like the center of the nose and the chin. Similar to the collapsed bone chains in your sample file.

The great part is I only need that ONE set of bones and I can have as many different options as needed.

p.s. Rube Goldberg would be proud. ;)

-vern
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Well,
this is the combined rig I show to you for the whole eyes. The pupil and eyeball curvature aren't solved yet.

The sample files:
http://amanoalzada.iespana.es/Mohostuff ... s_rig.anme
http://amanoalzada.iespana.es/Mohostuff ... es_rig.swf

The howto:
Please put attention to the following images. There are two cinematic chains (on the top of the image), a big (red) rotation master bone, three small bones and three bones for each eye. Also there is a circle and a cross centered with it. The bones have relationship ones with others. For example the central bones of every eye moves with its corresponding cinematic chain. And every lateral bone of the eye moves with its central one. But the lateral bones of the eyes moves also relative to its central bone as far as the small bone linked by Transrotate script moves... For example Bone A moves like -1 times its Y coordinate as P.tmp moves its X coordinate (remember that the movement of bone A is relative to its parent, the central one, so it must be the Y coordinate not the X,,,)

To build the mechanism it must be a valid pair of values L and alpha. It is shown in the second image that the upper "springy" mechanisms have 1/2 the length of L due to there are two bones in the chain. Also the initial rotation for the static position must be alpha and no other. Because if not they will not be together when the rotate master bone turns from 90º to 0º or to 180º.

Also the length of the parent of bone P is not obvious. It is M. the same lenght as the lateral bones have to its parents. With this you are assuming that the lateral bones are rotating around its central bone. The idea is "rotate first the central bone and then the other bones around it".

There is a drawback with transrotate use. If you go directly from 0º to 180º or viceversa in the rotation of the master rotation bone, then the eyes will not change its shape when they are in the middle. You must put a keyframe when they are at a half way (90º of the master rotation bone). It is due the traslation is a constrain and not a cinematic chain. So the starting and finish relative position are the same so in the middle they don't move. It don't happen with the use of the springy mechanism due to it is a rotation converted to a traslation directly. starting and end points have different values. I will substitute P and P.tmp for other movable springy mechanisms linked to the upper ones so the eyes can rotate from any position to any position.

So, what is behind of this mess? The new idea is that you can rotate (exactly rotate mathematicaly speaking) portions of the head/face (the eyes, the mouth, the nose... with the springy mechanism as a solid rigged. Then with a special use of transrotate or other springy mechanisms make the individual rotation of each portion of face / head. You can call It a "combined rotation" or a "rotation in two steps".

Remember, you must apply L and alpha values for each portion of face to rotate, if not the 0º to 180º rotation could not be done realisticly.

I whish it makes sense for all of you.
Regards
Genete.

PS: in the anme file the eyes have been colore to distingish the rotation from 0 to 180 passing thru 90 of the rotation of 0 to 180 pasing thru -90.

Image
Image
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

p.s. Rube Goldberg would be proud. :wink:

LOL


http://en.wikipedia.org/wiki/Rube_Goldberg_machine
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Dagnabbit!

Genete, you were right.

I should have used your advice in the beginning. In that original rotating face file you posted in your elliptical rotation thread you described using a "cross" and a representation of the "face" to determine the angle and length of the bones to pin-point spots in 3D space.

I hate math so I have been trying to "eye ball" it... bad idea.

Well... you are right. I rendered an image of the "face" and load it back into AS. I placed it so I could position my bones for the rotation and BANG! Dead on! I had to tweak where the center of the rotation is so that it rotates around the neck instead of the center of the head.

Good grief. This is going to make it REALLY easy for adding the rig to new characters too! Just load a render of the face and move the bones around that determine the rotation.

For instance I have 2 bones for each eye, inside and outside. Just load an image of the face and drag those bones to the right spots.

For the nose location just lower or raise it to change the "length" or how far it sticks out.

This also makes constraints a piece of cake. Most will be set to "1" since they are "exact" and I don't have to adjust. Some spots that are near by I can adjust that value to compensate. I don't want to put a bone in for every conceivable location... just the trouble spots.

This is fun... I still hate math though.

-vern
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Thanks Genete.

I wrote my last post and hadn't seen the new one you put up!

I forgot to reload the page first before posting.

AAHHGG!

Those spring bones at the top are freaking me out! They look like little frog legs moving back and forth!

;)

-vern
Post Reply