Sunday, 18 May 2014

Adding Attributes for Set Driven Keys

Another thing I learnt from taking time out of my dissertation in favor of getting in practice through the Game Project Module is setting up Set Driven Keys.

Set Driven Keys are ways of animating part of a character without having to go through each of the joints - these can be done for this like having a character make a fist in his hand without having the need to select his fists, parts of the foot (ball roll, toe roll), and etc. In the case for the Group Game Character, it would've been to have some movement in the hand to cast spells for when he attacks.

To do this first, I had to create an attribute, which I can do through the channel editor of a control, for this example, we'll set up one for the magic action on one of the character's hands.

Fig 1: Screenshot of the Left Wrist Control and going to the Add Attribute
To create the Magic attribute in the channels, select the Wrist Control for the wrist, then in the Channel Box, click Edit>Add Attribute.

Fig 2: A Screenshot of the window that comes up when you go to Add Attribute, filled in.

Once clicked, a window should appear (Fig 3). I can name the attribute, making it keyable or not, select the data type it is, set it's values from the minimum, to the maximum and then to the default value to where it's created. Call this new attribute Magic, make it keyable, data type: float, have the minimum value as 0, maximum value as 1 and then have 0 as it's default.

Fig 3: New added Attribute in your Channel Box for the Wrist Control.

Fig 4: Screenshot of how to start creating your set driven key

Once I clicked OK, the Channel Box in the Wrist Control. Now that is created, you can now set up Set Driven Keys. To do that, I clicked on Animate>Set Driven Keys>Set (Fig 4). And a new window appeared (Fig 4).

Fig 5: Set Driven Key window.
The window that appears (Fig 5) (blank), and it will have two columns - one that says Driver and Driven. The idea here is that when it comes to setting up the hands to do the magic attacks - instead of selecting every joint in the hand - I'll only have to set move the value between 0 and 1 on the wrist controls.

By clicking the Left Wrist Control curve and then clicking Load Driver - this will then load up all the Wrist Control with the channels that are in the channel box. Then I selected the joints in the hand (bar the thumb joints) and then click Load Driven - as this will be the joints that are driven by this attribute that I had created. Now that I have loaded the Driver and Driven - I needed to now select the channels that were going to be affected. In this instance, in the Wrist Control - it would be the Magic attribute, and for the joints in the hand it was Rotate Z.

Then I hit Key and this will then key the position of what being driven. To get the bend in the fingers, all I had to do is click on the magic attribute, change the value from 0 to 1 and then rotate the fingers to the position I wanted them to be in when it hits the max value. Once I did that, I clicked Key and there it was.

Fig 6: Finished Set Driven Key 

And that's about it. It has become useful and I can't wait to show you all now the progress of my dissertation. While there were a lot of things I did learn about, I didn't want to blog about every single before I talk about the final product, most of that will be things I have mentioned as well as newer things I picked up and learned. 


No comments:

Post a Comment