360º Smartbones using cycles

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Daxel
Posts: 967
Joined: Wed Mar 27, 2019 8:34 pm

360º Smartbones using cycles

Post by Daxel »

I have a character rig with smartbones for 360º head turn, torso turn and pelvis turn. The thing is that those smartbones make those parts turn but when the bone reaches its full rotation, it doesn't go further, giving me problems to animate the character on those bone angles.
As far as I know, there are techniques that can solve this: I remember reading about using cycles but I can't find those techniques explained anywhere, so I've been trying to figure this out by myself with the little hints I found here and there but sadly I didn't succeed. So, can you help me?
User avatar
hayasidist
Posts: 3493
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: 360º Smartbones using cycles

Post by hayasidist »

one approach:

in the action have the SB go from 0 to 720 (linear) over, say, frames 1 to 121.
put the turn animation in frames 1 to 61 (linear!), looped from 61 to 2 (so that the SB will be at frame 62 when the turn animation skips back to 2)
start with the SB set at 360 so you can rotate it in ascending or descending -- the interpolation mode on the mainline for the SB rotation can be whatever you want.

(plenty of other ways as well...)
Daxel
Posts: 967
Joined: Wed Mar 27, 2019 8:34 pm

Re: 360º Smartbones using cycles

Post by Daxel »

hayasidist wrote: Sun Apr 05, 2020 10:53 am one approach:

in the action have the SB go from 0 to 720 (linear) over, say, frames 1 to 121.
put the turn animation in frames 1 to 61 (linear!), looped from 61 to 2 (so that the SB will be at frame 62 when the turn animation skips back to 2)
start with the SB set at 360 so you can rotate it in ascending or descending -- the interpolation mode on the mainline for the SB rotation can be whatever you want.

(plenty of other ways as well...)
Thank you, I will try that!
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: 360º Smartbones using cycles

Post by Greenlaw »

What I like to do is use two Smart Bone Actions, one Action for a complete single-direction turn (a 'loop' bone) and a second Action to overdrive the first Action in both directions (a 'turn' bone). This big advantage with this workflow is I only need to create animation for one complete loop in one direction.

To do this, animate your 'loop' Action from front to back to front. Make sure the movement is linear and that the cycle can continue seamlessly back to frame 1. I suggest duplicating the rotation in frame 0 to frame 1 and setting frame 1's interpolation to linear. Leave frame 0's mode to Smooth or whatever you with the default to be during animation. (Naturally, you want Copy Previous Key enabled.)

Then, in the 'turn' Action, animate the 'loop' bone to complete at least two cycles for one direction, and then for the counter 'turn' action, animate the 'loop' bone in reverse for at least two cycles. Again, make sure you're using linear keys for the loop. The reason for cycling twice in both directions is to so I can overdrive the turn when I need to. In some situations, I'll add an additional cycle.

For the 'turn' bone, I normally like to constrain the bone rotation 180 degrees in each direction so there is a complete turn for 90 degrees of rotation. This means I don't have to move the bones nearly as far to complete a turn and I don't over turn it unnecessarily. You can disregard that if you prefer to use a full 360 degrees in both directions the bone; this will give you a smoother turn. (IMO, the extra smoothness isn't needed most of the time but that depends on what the character needs to do.)

Finally, since I want to avoid animating the 'loop' bone, I'll set it to Shy. (With my MQC panel, I can easily Shy and Un-Shy these bones with a button click.)

This is what I've been doing for characters in our TV shows for a few years now. IMO, it's less work to set up turns this way and works remarkably well.

(Note: I wrote the above quickly from memory. Will compare with one of my rigs later today to make sure I got the details correct and didn't miss something important.)
Daxel
Posts: 967
Joined: Wed Mar 27, 2019 8:34 pm

Re: 360º Smartbones using cycles

Post by Daxel »

Thank you so much!

I'm learning a lot of things.

I managed to make the hayasidist's method and fit it to my liking. I wanted the bone to look at the same direction as the head (for clarity I guess, or maybe TOC).

This is a simple demo of it: https://1drv.ms/u/s!AiyKCw6Xey5TgY9CBM-UtZP1xcF4OA
For begginers: to use this kind of bone, you have to animate it using Transform Bone Tool, because Manipulate Bone Tool won't do more than a full rotation, it will find the shortest path instead, turning to the other side (this was a headache for me).


Greenlaw wrote: Mon Apr 06, 2020 8:55 pm This big advantage with this workflow is I only need to create animation for one complete loop in one direction.
I don't know if I understood this. I tried to follow the steps and did this: https://1drv.ms/u/s!AiyKCw6Xey5TgY9BZE10RZjmgKtRIA
But I don't understand the advantage over using only one bone and one action like on the other file.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: 360º Smartbones using cycles

Post by Greenlaw »

Daxel wrote: Thu Apr 09, 2020 4:05 pm I don't know if I understood this. I tried to follow the steps and did this: https://1drv.ms/u/s!AiyKCw6Xey5TgY9BZE10RZjmgKtRIA
But I don't understand the advantage over using only one bone and one action like on the other file.

For me, it's simpler to setup, modify, and animate a turn this way. The first bone and action is strictly to animate a single loop in one direction, so it may contain many keyframes. This bone is then hidden so it doesn't get unintentionally animated. The second bone and action is bi-directional (so two actions actually) and is used for animating the first bone. This one is very simple because it essentially just animates the first bone forward and in reverse.

This is mainly a UI thing I guess...the rotation positions of the second dial and its keyframing is very clear to understand visually and is easy to edit. Where I work, I've had to create Moho rigs for many other animators to use so I like the controls to be as obvious as possible.
Daxel
Posts: 967
Joined: Wed Mar 27, 2019 8:34 pm

Re: 360º Smartbones using cycles

Post by Daxel »

Greenlaw wrote: Thu Apr 09, 2020 4:55 pm
Daxel wrote: Thu Apr 09, 2020 4:05 pm I don't know if I understood this. I tried to follow the steps and did this: https://1drv.ms/u/s!AiyKCw6Xey5TgY9BZE10RZjmgKtRIA
But I don't understand the advantage over using only one bone and one action like on the other file.

For me, it's simpler to setup, modify, and animate a turn this way. The first bone and action is strictly to animate a single loop in one direction, so it may contain many keyframes. This bone is then hidden so it doesn't get unintentionally animated. The second bone and action is bi-directional (so two actions actually) and is used for animating the first bone. This one is very simple because it essentially just animates the first bone forward and in reverse.

This is mainly a UI thing I guess...the rotation positions of the second dial and its keyframing is very clear to understand visually and is easy to edit. Where I work, I've had to create Moho rigs for many other animators to use so I like the controls to be as obvious as possible.
I see. Also, with this method you can use the Manipulate Bone Tool and it will work correctly.

The disadvantage I see is that, as far as I know, moho let me animate the loop smartbone in the timeline of the turning smartbone, but if my loop smartbone has other bones being animated in its smart action, those won't move when I rotate the turn smartbone (I talked about this limitation here: https://www.lostmarble.com/forum/viewto ... 13&t=33376)
Is that correct?
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: 360º Smartbones using cycles

Post by Greenlaw »

When nesting Smart Bones, I think you can only go one additional layer deep. I wish that wasn't a limitation but, TBH, it really hasn't been a showstopper for me, and I've built a lot of very complex character rigs for the TV shows at my workplace.

In general, I try not to put too much animation into a into a single Smart Bone control, keeping the function of each dial narrow and specific. For example, for turn dials, I put only the animation for a given body part into dial (i.e., torsoTurn, headTurn, armTurnR, etc.,) For placement and stacking order of the limbs during a turn, IMO, it's better to keyframe this manually rather than build it into the turn action. This increases the custom posing possibilities for the animator, which can make the animation more lively, and it hardly takes more effort to animate.

Putting too much animation into a single Smart Bone Dial tends to limit the character to performing only what that Smart Bone action allows. This can become very frustrating during animation.

Tip: Take a look at the Puss-In-Boots rig here: https://vimeo.com/269815494. This isn't a tutorial video but the opening does show the rig in action mostly using the setup I describe. This was one of my earliest 360-degree rigs and I hadn't yet figured using nested Smart Bones yet, but it does have the arms and legs position animations separated from the body turn. This allowed me to do a lot more fun poses with the character for this interactive episode which you can see later in the video.

Re: Manipulate Bone, this is the tool I use most of the time for bone animation. I find it faster to animate with since I can easily switch between IK and FK modes by holding down the Alt key. Normally, I only switch to Translate Bone when I need to move a child bone from its parent or stretch a bone. Learning the hotkeys can really speed up animation (Z and T in this case, and B for Select Bone.) Or keep the Tools window un-docked and closer to where your character is. (This is what I do when working with a tablet.)

Hope this helps.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: 360º Smartbones using cycles

Post by Greenlaw »

I think have a few tricks for working with nested Smart Bones but I can't recall them at the moment. I'll dig into my notes later and see what turns up. It seems like I once used target bones to keep nested Smart bones 'active' in the timeline, or something like that. Let me see if I can track down what that was about.
Daxel
Posts: 967
Joined: Wed Mar 27, 2019 8:34 pm

Re: 360º Smartbones using cycles

Post by Daxel »

Greenlaw wrote: Thu Apr 09, 2020 7:31 pm I think have a few tricks for working with nested Smart Bones but I can't recall them at the moment. I'll dig into my notes later and see what turns up. It seems like I once used target bones to keep nested Smart bones 'active' in the timeline, or something like that. Let me see if I can track down what that was about.
That would be coo! Actually I use different smartbones for each turning body part, because you suggested that somewhere, months ago. But I animate the spine bones, for example, on the torso turn smartbone. And I have some bony eyebrows that follow the head turn... things like that.

Now that I'm editing my smart actions I'm wondering if you know some way to click on an action and see wich layers are animated by it. I see I can do the opposite, click on a layer and see in wich actions is animated, but now that I'm about to reposition a lot of keyframes from multiple layers on the smart action, I would love to see wich layers are affected by this action to turn their "show on the timeline" on.
farabi213
Posts: 7
Joined: Tue Sep 21, 2021 4:23 pm

Re: 360º Smartbones using cycles

Post by farabi213 »

Daxel wrote: Thu Apr 09, 2020 4:05 pm Thank you so much!

I'm learning a lot of things.

I managed to make the hayasidist's method and fit it to my liking. I wanted the bone to look at the same direction as the head (for clarity I guess, or maybe TOC).

This is a simple demo of it: https://1drv.ms/u/s!AiyKCw6Xey5TgY9CBM-UtZP1xcF4OA
For begginers: to use this kind of bone, you have to animate it using Transform Bone Tool, because Manipulate Bone Tool won't do more than a full rotation, it will find the shortest path instead, turning to the other side (this was a headache for me).

I do the same as you but my bone manipulate not working as you
here is my project : https://drive.google.com/file/d/1QQ4LAV ... sp=sharing
Daxel
Posts: 967
Joined: Wed Mar 27, 2019 8:34 pm

Re: 360º Smartbones using cycles

Post by Daxel »

farabi213 wrote: Wed Sep 22, 2021 2:15 pm I do the same as you but my bone manipulate not working as you
here is my project : https://drive.google.com/file/d/1QQ4LAV ... sp=sharing
I see. The only diference is that your smartbone at frame 0 is at 270º angle.

Your Head Turn smart action makes the bone rotate from 270º at frame 1 to 1170º at frame 901. So if the starting position of your smarbone is 270º, that means that if you rotate it to the left, incrementing the angle value (>270), the smart action will be activated, but if you rotate it to the right, you don't have any kayframes in your smart action for less than 270º angle. To solve this, just change the bone starting angle (on frame 0) to a position that is more at the middle of your Head Turn smart action (I have it at 630º), so it works both ways.
farabi213
Posts: 7
Joined: Tue Sep 21, 2021 4:23 pm

Re: 360º Smartbones using cycles

Post by farabi213 »

Daxel wrote: Wed Sep 22, 2021 2:55 pm
I see. The only diference is that your smartbone at frame 0 is at 270º angle.

Your Head Turn smart action makes the bone rotate from 270º at frame 1 to 1170º at frame 901. So if the starting position of your smarbone is 270º, that means that if you rotate it to the left, incrementing the angle value (>270), the smart action will be activated, but if you rotate it to the right, you don't have any kayframes in your smart action for less than 270º angle. To solve this, just change the bone starting angle (on frame 0) to a position that is more at the middle of your Head Turn smart action (I have it at 630º), so it works both ways.


Thank you so much...
I am new in moho thats why i dont have enough knowledge about moho bone angle
kindly if you Clarify some more example like,
My smartbone at frame 1 is at 90º angle.
so, How much will I put in frame 0?

I know it is stupid ques but i am noob thats why :cry:
User avatar
hayasidist
Posts: 3493
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: 360º Smartbones using cycles

Post by hayasidist »

in the action you need to have the rotational range of the Smartbone match what you want it to do in mainline.

so, as you've set the smartbone to move from 270 to 1170 (that's 5 "half turns") in the action you need to set the starting pose to allow rotation left and right in mainline, so you'll need to set the bone to 270+360 = 630 degrees (or that plus another 360 = 990); then rotating it clockwise or anticlockwise (counterclockwise) within the range 270 to 1170 will achieve what you want.

another approach could be to set the action to have a range of -360 to +360 (or any multiple thereof - e.g. -1080 to +1080); then in mainline start the bone at 0 and constrain its rotation to the range in the action.

hope that's clear! Shout if not.
Daxel
Posts: 967
Joined: Wed Mar 27, 2019 8:34 pm

Re: 360º Smartbones using cycles

Post by Daxel »

farabi213 wrote: Wed Sep 22, 2021 4:29 pm
Thank you so much...
I am new in moho thats why i dont have enough knowledge about moho bone angle
kindly if you Clarify some more example like,
My smartbone at frame 1 is at 90º angle.
so, How much will I put in frame 0?

I know it is stupid ques but i am noob thats why :cry:
Not stupid at all, smartbones are complicated at the beggining and this forum is for this so don't hesitate to keep asking what you need.

To understand the 360º Smartbone you may have to understand a few concepts before:

First: the frame 0. It is very important in Moho and it confused me at the beggining. It is the design mode, where you draw and design the rig, but at the same time it's the default initial position of your rig: the default initial angle of each bone, the default initial position of each vector point, etc. But it is not like a real frame because it is not rendered, it's not part of any animation. And the most important thing in this case: it is shared between every timeline on your project, so you can access it (change it) from any timeline, just for convenience. This will be useful later.

In Moho, an action is an animation (a sequence of keyframes) that is stored in its own timeline (called action timeline) so you can reuse it in the future as many times as you need.

A smart action is different than the rest of actions on the way you reuse it. For the other actions you go to the action panel and press "insert copy" to insert a copy of the action's animation into your main timeline. But smart actions are animations that are reused by moving a specific bone. That works this way:

When you create an action and name it exactly as one of your bones, sharing the same name is the only thing that tells moho that you want that action to be a smart action, to be activated by that bone (now smartbone).

Inside the smart action timeline you create an animation for the smartbone: in this case the smarbone spinning a number of full turns (360º). And inside the other layers you create keyframes for the animations you want the smartbone to trigger on each of its angles. So if you want a character to be smiling when your bone is at 90º, you create the smiling keyframe exactly at the same frame that your smarbone is at 90º. This may be easier to grasp with a youtube tutorial. This one is good: https://www.youtube.com/watch?v=HVIBoRhrqvQ

So you could make the smartbone spin 100 full turns in the smart action if you wanted your character to be able to spin his head like a basket ball. The numbers I use are optional. The smartbone I made in the file you downloaded, TEST360CICLEOneBone, can make one full turn to the right and one turn and a half to the left.

Now lets get into it, this is how you design it:

1. You start deciding how many turns you want the head to be able to make. Lets say that you want one full turn to each side. Knowing that a full turn is 360º, you calculate how many degrees you need your smartbone to be able to rotate in total. In this case it's very easy, that would be 360º to the left and other 360º to the right.

2. You decide how do you want your smartbone to look by default (on frame 0), manipulating it with the transform bone tool on frame 0. It's totally up to you, but in this case I made mine looking down because my character is looking to the front at frame 0, so that way it is easy to understand where is he looking at just looking at the bone and that's cool. Once you have the smartbone how you want it to look like, we can start creating the smartaction's animation. On the smartaction's timeline go to the frame 0 (remember that it is the same frame 0 you have on your main timeline, it's shared). I see that the smarbone looking down, if it is not parented to any other smartbone, will have an angle of 270º. So that would be the default initial position of a smartbone looking down.

3. Knowing all that you can already start animating your smartbone in your smartaction. You know that the Smarbone is at 270º by default, and you want it to be able to rotate 360º to each side so the first keyframe of your smartaction (frame 1) must have the smartbone at 360º less than 270º (that's -90º) and the last frame of your smart action must have the smarbone at 360º more than 270º (that's 630º). How many frames long do you want your smartaction to be? Well that's up to you, but a common practice is to use one frame for each degree, because that many frames makes the animation look smooth enought even if you make a slow turn. So if you want to follow that practice, knowing that your bone has to spin two full 360º that's 720º and you have to add it one more frame (for the frame 0 default angle between those two 360º) so your smartaction will end at frame 721 where you have to put your smartbone at 630º.

Why is my smartbone at TEST360CICLEOneBone starting at 630º on frame 0? because like I said it's up to you, I just didn't like to work with negative numbers on the smartaction, I guess. But as you saw, it doesn't matter. All it matters is that you have your smartaction starting from (whatever frame 0 angle) -360º and it ends with (frame 0 angle) + 360º so your frame 0 angle ends being in the middle and therefore able to rotate both ways.


I hope it's clearer now. Take your time, it's not as complicated as it sounds the first time you read it.
Post Reply