What's needed for a full character using smart bones

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

petes80
Posts: 24
Joined: Mon Jan 06, 2014 9:49 pm

What's needed for a full character using smart bones

Post by petes80 »

Hi All

So I am planning a series of animations that will use the same characters in each one. Because of this, I am going to need each character to have a full range of movements from all angles. I originally started on the switch layer route for front, 3/4 views, sides and back views. Having now discovered the beauty of smart bones, I have recreated my first character that starts with the front view and can go to full left and full right view just using the smart bones. I haven't yet done anything for the back views. Out of this I have a few questions:

1) When creating a fully rigged character with smart bones, what do you do? Do you have one layer for all the front views and one for the back, or do you cover the whole 360 turn with one layer? (or split them down further!)
2) Do you need any added extras for certain movements? for example different angles of arms/legs?
3) Say I create a character, save it to my library and then use it in an animation. I then later make improvements to that, will my animation automatically reflect the improvements or do I have to re-animate using the updated character?

Basically I want to get to a point where I have a set of assets ready to go and I can just drop them in and start moving them about without having to continually keep drawing new stuff (I appreciate there will always be an element of new drawings).

Thanks for all your help!

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

Re: What's needed for a full character using smart bones

Post by heyvern »

I just did EXACTLY what you described and I sort of did a lot of trial and error, made mistakes along the way, to get the result I wanted.

As far as the layers, and how the character is set up, that's up to you. What I did to save effort with my smart bone actions, was to create the entire character on one layer even though I would need to "split it up" later for layer ordering.

By creating all the point motion smart bone actions with "one master layer" first, I could easily duplicate those layers, remove points and shapes and the smart bone actions were still intact. It's better to "duplicate" layers and not use "copy/paste" as copy and paste of points can sometimes lose things like point binding.

The other thing I "did wrong" at first was the full 360 turn actions. I did a front to full back turn. One for each direction, front to left, front to right. This was a mistake. The problem was there was NO WAY to have a smooth turn left and right from a BACK VIEW. When the head was rotated all the way to the back (left or right) it was stuck there. I couldn't continue the turn in the back view. i would have to key the turn all the way around to the other side to have a smooth back view turn left to right.

So instead I put a FULL TURN on both "sides" in the smart bone actions. "Over rotating" the turn bone in either direction continues the turn PAST the full 180 all the way to 360 or back to the front.

So basically each head or body turn, left and right, sort of has duplicate keys because it goes all the way around a full 360 in each direction. However, it gives you more options for the character... just don't do a "Linda Blair" Exorcist head spin ;).

The other thing to consider is layer ordering. Layer ordering is very tricky with smart bones because if you put layer order keys in a smart bone it "locks" the ordering. You can't change layer order in the main timeline if it is keyed with a smart bone. With a full turn you absolutely will need layer order keys for both body parts and head features.

For the head this is "simple". The layer ordering can be put in the head turn Smart Bone because the head is "always the same". Ordering doesn't change.

For the body, this wouldn't work. Even if the character turns a certain way, you may still need to have one arm go in front or behind the body or other arm in different combinations.

For the body I handled layer ordering with a different smart bone. The layer order for the body is not keyed in the body turn bone. Layer ordering for the body is keyed in a different bone. I split the bone rotation into increments and keyed a specific layer order that I might need; left arm in front, behind, right arm in front, behind etc etc etc. Any time I needed a specific layer order I could simply add it to that layer order smart bone.

When keying the layer order smart bone you should use "step" interpolation. Unfortunately you can't set that interpolation in the action. Step interpolation in a smart bone action is ignored when the bone is rotated in the main timeline. Step interpolation for a smart bone has to be set in the main timeline. The reason for step keys with layer order is so your smart bone doesn't cycle through all of your layer ordering at different rotations in the action. By using step interpolation of the layer order SB in the main timeline you set "exact" layer order. It "snaps" to that layer order without passing through other keys in the SB action. So let's say I have a rotation in the smart bone that puts the left forearm in front of the body but between that SB key and another key are several other layer order keys, if I don't use step interpolation, the layers will change order as the bone cycles through the rotations. Using step means the bone "jumps" exactly to that key.

Another thing to keep in mind is "symmetry". Keeping the set up as symmetrical as possible makes positioning everything easier, especially if you are doing identical things on opposite sides. Keep the vectors centered at zero. Keep the layer centered. Set up bones so they are centered and symmetrical. Make sure both sides of your skeleton have the same positions and rotations. It's much easier.

Good luck and I hope I helped.
petes80
Posts: 24
Joined: Mon Jan 06, 2014 9:49 pm

Re: What's needed for a full character using smart bones

Post by petes80 »

Thanks Heyvern!

That is a fantastic explanation. I am giving that a go right now. One question I have on that, as there is obvious duplication of frames in both left 360 turn and right 360 turn, can you copy them over from one to the other to save time? It would be good to copy some of the inbetweens during the turn from the turn I've already done.

I also like your layer order solution, I have already encountered that issue and hadn't figured out what to do about that yet. Your solution sounds great :-)

Cheers
Pete
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Re: What's needed for a full character using smart bones

Post by heyvern »

You can't "copy" the frames in all situations. In some ways you can just copy them and change the order, but for other parts of turning, you have to flip the points of symmetrical vectors. I created scripts to help with this process. I haven't completely finished the scripts and haven't worked out all the bugs. I need to do a tutorial to show how to use them.

I am working right now on getting those scripts online "as is" and showing how to use them to help with flipping smart bone turn actions.

Copy and Reverse Keys after the Last Key
This one uses the last key frame of a layer as a "center" point and copies and flips the keys before that frame, to after it to create a mirrored action. However, it only flips the keys location in time, not the values. The points/bones still have the original transformations and have to be flipped.

Flip Symmetrical Points Horizontally
This script will "flip" perfectly symmetrical vector layers. It matches points by location on frame 0. You MUST have PERFECTLY symmetrical vectors. I mean PERFECTLY symmetrical. It uses the exact location of the opposite point to create the matching sides for flipping. It flips both translation and point curvature. For example I used curvature to change the shape of the head and face as it turned. Those keys also had to be "flipped" to the opposite point.

To get PERFECTLY SYMMETRICAL layers on frame 0. The points have to be exactly precise because Anime Studio doesn't put points in a logical order based on ID number. Sometimes an opposite matching point is like... in the wrong numbered order based on point ID so I have to use the actual location. If two points are "very close" it will move the wrong point. I have to use EXACT positioning. So the opposite point has to be EXACTLY the same position but a "negative" value based on the center of the layer. So the vectors as a group have to be EXACTLY centered and the opposite points have to be exactly the same but mirrored.

So, I wrote another script that does this. ;).
Mirror Points Horizontally
This script will find the points that are opposite each other and "adjust" them so they are exactly opposite. It has an option for copying left to right or right to left. It's still not perfect because it's based on relative location. If several points are very close together it could pick the wrong one to move. (I've found this is a problem with ANY application that has a "mirror" function).

If the frame 0 position of the points isn't "crazy different" symmetrically, this will have very little impact on any SB actions or point motion already created.

These scripts aren't "fool proof" by any means, and may have issues... I haven't worked out all the bugs yet, which is why I haven't posted them for download yet, but I can make them available for "experimenting" with as long as you do THOROUGH BACKUPS ON THE FILE! Save incrementally so you don't destroy anything. :)

I know it sounds all a bit "crazy" but it really does save a ton of laborious hand key framing.

------------------

Why I created the scripts:

My file had so many SB action layers for turning the head and body. I mean I had a BUNCH of vector layers with turn actions that I had to "flip". My head and body turn layer for example had already been split into separate layers and modified. I no longer had my "all on one layer master" layer. I couldn't use copy and paste to make a new master vector layer because all of my careful point binding would be lost. I had to edit each layer by hand. When I saw how much work this would be I decided to write scripts to help me.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Re: What's needed for a full character using smart bones

Post by heyvern »

I updated the download for my flip points tools and added another video specifically for a head turn:

mirror-points-and-flip-mirrored-points-menu-scripts

petes80
Posts: 24
Joined: Mon Jan 06, 2014 9:49 pm

Re: What's needed for a full character using smart bones

Post by petes80 »

Hi Heyvern

This looks brilliant! I have just completed my first full head and body turn with the first character. However, it was with a character that didn't have symmetrical points when I first created it so it took me quite a while. For the next character I'm going to give your script a go to see how much time it will save me (huge amounts by the looks of things!). As it's a new character, I shall draw it perfectly symmetrical this time.

Oh, and I tried out your suggestion for layer ordering on the body with a separate smart bone and it works a treat :)
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Re: What's needed for a full character using smart bones

Post by heyvern »

Glad to help out! Hope it works for you. Feel free to ask questions.

After doing that video I really need to make it do the whole thing in one go.
One of the toughest things about this head turning process... it can get confusing with multiple layers going in different directions. I can't tell you how many times I go completely totally lost trying to figure which way something should go. :)

One thing to point out... I had to redo the last half of that video because I had "Relative keyframing" turned on by mistake. Every time I flipped some points, some selected keys on another frame were flipped the opposite way. I kept going back and forth back and forth. I had to stop recording and watch the video to find out what I did wrong... oops! ;)

I was yelling at the past version of myself "Uncheck relative keyframing you fool! It's going to mess everything up!".

Watch out for relative keyframing! :)
petes80
Posts: 24
Joined: Mon Jan 06, 2014 9:49 pm

Re: What's needed for a full character using smart bones

Post by petes80 »

Cool, I will look out for that :)

One question, I want to add the buttons to run the script as you have it on the video, but in the download zip file the button png's weren't included. Are they a separate download?
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Re: What's needed for a full character using smart bones

Post by heyvern »

Oops!

I goofed up. The script download was the wrong one. I updated it the other day but put the link in the wrong spot.

You will need to download again. So sorry!


mirror-points-and-flip-mirrored-points-menu-scripts
petes80
Posts: 24
Joined: Mon Jan 06, 2014 9:49 pm

Re: What's needed for a full character using smart bones

Post by petes80 »

Hi Heyvern

I am trying out your scripts (finally!) and I have a little problem. The Copy and reverse keys after last key script works very well. However the Flip symmetrical points horizontally doesn't do anything. I have tried the script as a button install and a menu install and neither seem to want to work for me. I have double checked every point to make sure they are exactly symmetrical (-x,y and x,y) on point 0 on both the mainline and the smart bone action timeline. What am I doing wrong?
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Re: What's needed for a full character using smart bones

Post by heyvern »

Not at my computer right now but willl check this as soon as I get bck (typing on ipad).

A couple of questions:

What version of Anime Studio do you use? 9.0? 9.5? There may have been some changes to lua along the way that I updated for.

Can you post a screen capture of the vector layer that isn't working?

Also try selecting all of the points before running the script to see if that makes a difference.

Sorry you are having trouble. This can help me improve it though.
petes80
Posts: 24
Joined: Mon Jan 06, 2014 9:49 pm

Re: What's needed for a full character using smart bones

Post by petes80 »

It's OK, I'm just glad you have taken the time to create the script in the first place :-) I'm sure it's probably something simple.

I'm using version 9.5.

I tried selecting all the points but it made no difference I'm afraid.

Not sure exactly what you need in the image but the one I've been trying to make work is the eyes. Here is a picture of them with all the points on the vector layer highlighted:

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

Re: What's needed for a full character using smart bones

Post by heyvern »

Okay, It looks like it should work. The version is the same as I have.

let me play around with the script and make sure that the uploaded version is working.

Normally what I do is to test and tweak the installed script directly, and then zip it up right in the script folder.

Just to be clear of the steps, you should run that script on a frame in the action that has point translations. I can't guarrantee how it will behave with layers that were "offset" in the sequencer.

Also, when you run the script (or push the button) the immediate display is very inaccurate. You have to scrub the timeline to "update" or refresh the new position of the points. Sometimes it may look very strange until you refresh the view. I often started out hitting undo when it didn't look right, until I realized it was working but didn't look correct at first.

I will play around with it, and test the version that's online to make sure it's the most current.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Re: What's needed for a full character using smart bones

Post by heyvern »

Yes, something weird is going on. I may have "broken" something. It appears to not be working. Strange. It could be I uploaded the incorrect version, or removed/changed some code by accident at the last minute after I tested.

I will track this down and let you know. Very very odd.

UPDATE:

It appears to be flipping points on all frames with keys It's actually flipping, just not the way it should.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Re: What's needed for a full character using smart bones

Post by heyvern »

CRAP!!!!

I figured it out. I am so freaking sorry.

There was a pop up box I had put in for some extra features i was going to add. You see this in the video. I thought, mistakenly, that this box wasn't "doing anything" when in reality I had already linked it up to how it flips the points.

The pop up had a check box with "run on single frame". If that is unchecked it runs the flip on ALL OF THE FRAMES. I was going to add additional choices in there for a range of frames to run on etc etc but hadn't completed it yet. I put the checkbox in there so I could continue using the script until I finished it.

At the last minute before I uploaded the latest version of the code, I commented out the pop up code, and BROKE THE FREAKING THING COMPLETELY!!!! :oops:

I will do this properly and post an update. Don't download again yet.

Once again, so sorry to send you on a wild goose chase. The script really does work I promise! :)
Post Reply