Monday, 26 April 2010

Post Sixteen

Animation so far...

Here's all the clips I have made so far sewn together:


Post Fifteen

Animation

Ok long time no post, so here goes; animating this character is getting slow, it is taking about twenty four minutes approximately for one second of animation, plus the hour or so setting the scene, I definitely underestimated the time spent on doing this part of the project. I have about five seconds worth of clips that I am happy with, there are some areas of the character that have made this task very difficult to avoid such as the weird twisting in the elbow joints that spin the whole arm when the elbow is flexed, and his sleeves that just always seem to get in the way making collision a problem too. Finally the joins where the leg meets the shorts are a big problem and always poking through; so much so I have had to render two sided to save some headaches. It could have been avoided had I known what was going to happen when his legs bended at the modelling section; I could have just made a few more lines with the connect tool and hey presto fixed. Anyhow in the rest of this post I will try to explain the basics of what I am doing, we join the animation after Travis has fallen down its now time to pick himself up and carry on skateboarding.
To start the scene I am usually carrying on from the last scene so I need to reconfigure the timeline to show this and save under a new name, it becomes easier to undo this way. Down the bottom right of the UI I click on a button that opens the time configuration panel and in there I set the start and the end time in frames for this scene it will be 150frames to 180frames.
Before we start the process of moving the character take a look in the picture above; in the bottom left window I notice Travis’ shorts are poking through the floor, fortunately the camera I am using is already set up in the top left view port, and from this position we can not see that part of the leg, but it will need fixing. Travis is already getting up; his hands are on the floor pushing his weight up and his toes are against the floor suggesting the press up position, this makes getting up simple to do. I will try to move his knees up under his chest to a squat then let him stand; as I am going to sort this animation in premier I can split this scene into several one second parts

Usually I just jump right in, click the auto key and have a play with the movement so I will make no exception. There are a few things I always check, before moving a control object I make a keyframe this at least starts the animation from that point this helps if you haven’t moved a control part in a long time. I have only twenty ‘un-do’s so be careful of what is being done. And save regularly; there’s nothing worse then something happening with out a save to restart with.

I like to work in the front or back view and one of the sides, and the perspective and have sacrificed the top view for the camera, this shows me first hand what is being seen when it is moved, I also configure the render panel from time to time to just render a frame to see it in it’s glory.
Here I have given eight frames to let Travis get his legs straight for the bend and this has sorted out the short / collision problem too. Now then next seven frames will sort out his upper body too.
Ok half way through and a quick save! both feet will fly up to his chest and his knee joints will poke through his skin…aargh! As you can see Travis has a problem bending his knees, deformities appear, and I am quite annoyed that in order for the audience to see no abnormalities I can only bend his legs part of the way.
This image shows the one second animation with Travis half way completing the squat, before the next section I always like to render my scene to see if the animation worked.
It’s looking good! But one problem I see, it is the final push upwards just a little bit fast, so rather then go back and mess up the rest of the scene I can fix this when I edit the animation, I can cut that bit and slow it down, thus saving me a lot of hassle.

The next step is to reconfigure the time configuration panel to 180frames to 210frames and save the file under its new save name. Then jump straight back in and work his movement out. I should be that far enough off the ground to pull his legs up now, and then have him land on his feet and stand up. I will try for a fluid motion but let’s see where that gets us.

First thinking about it, I will swing the camera around the character to show the side view of him jumping to squat. Maybe this will look a little better, plus it saves the knee pokey bit problem in his legs being shown to the audience.
Ok all done its only been thirty minutes or so, I have completed the scene but am unsure on the camera so I copied the camera and made a duplicate and put that front on so now I render the scene and will see which render works best.
Ok first camera straight on to character and one problem I see is my characters feet after jumping; they are too slow and they don’t jump they drag, In the second render I should have fixed this, also I have sorted out the camera bob; camera should be good now, but we still have Travis’ shorts /knees/poke through problem. Unfixable at this stage.

Here is the render: (for final movie I will use alternative camera I think)

Tuesday, 20 April 2010

Post Fourteen

Progress so far...

This area; the animation part is taking some time to complete, the skinning and rigging took too long to complete as I am a complete beginner in that area. I did however find some great resources through a thorough search that will be kept for future projects.

But getting back to the post at hand; I have less then three weeks left to complete the module and it has been a fabulous introduction to character animation and the results that i am getting (even though at the start) are quite brilliant to say the least, they are time consuming but very rewarding.

The plan is to have Travis Mcfee try to show off, bail; pick himself up, get up off the ground, do a walk cycle on the skateboard, then a trick or two then celebrate. It is a lot do do but I am just getting on with it, and check out these early renders! they are only a second each but they are coming out great.


Tuesday, 13 April 2010

Post Thirteen

Skinning

In this post I get to skin my character, The first thing to do is to delete the turbo-smooth that I have added to my character in the modifier panel, putting a skin modifier over the top would be just stupid as there would be too many vertices to weigh and modify with the envelopes, also I have animated the control objects to move the bones so they stretch and do a simple walk cycle, this helps a bit when I test the envelopes later, as I can just run the test animation and see how the envelopes affect the mesh.
So with the mesh and the bones all ready to go, I select the skin modifier from the list and then under the parameters roll-out I click the add bones option and select all the bones making sure that only bones are selected for the skin.
The next thing to do is to select a bone from the list and click the edit envelopes option, the envelopes control which part of the mesh will be affected by the selected bone, red ares mean that 100% of the area is affected and blue areas are almost no affect, orange and yellow are somewhere in between, as you can see in the next image the spine bone envelope I have selected is affecting other ares of the spine, the arms of my character and even his neck, now there are a couple of ways I can modify the envelope to affect only the spine I have selected; I could move the evvelope but this is not the way really to do this as by moving the envelope and making is smaller, I am only making other envelopes bigger, the way to do this is to weigh each vertices and select the specific bones to affect the specific vertices, it takes some time but at least it makes sure all the vertices are being affected by the correct bone.
To weigh a vertices I must scroll down under the edit envelopes option and check the vertices box, then scroll down to the wrench like icon to open up the weigh vertices box.
In this image I have selected the vertices where the arm joins the body and as you can see from the weigh vertices box it is being affected by several bones; spine3, spine4, clavicle, upper arm and head. Now we know for instance that the head bone shouldn’t even affect this vertices, so from the box we select the head bone and click on the 0, this makes the head have 0% affect on that vertices. Now for this instance I will make the spine bones have 0% influence too, this will leave just the clavicle and the upper arm to affect the vertices. I will go 50-50 and then come out of edit envelope selection and move the wrist control object around and see how this affects the join of the arm to the body, I will add the turbo-smooth modifier back to the list of modifiers but I must remember to turn it off and select the skin and the envelopes when I want to change the weight again. The turbo-smooth was added because this is what my character will look like at the final render, it all looks ok so I move on to the next vertex. It is a long process, but all I have to do is one side of the body and then replicate the amount for the other side’s vertices. It has taken some time but I have a test animation and it all looks quite good.

Just before I post the animation I would like to point out something I have noticed, there are a few anomalies where the leg tries to poke through his shorts, and after much deliberation I have put this down to bad modelling technique, if the leg inside the shorts was lined up properly with his knee instead of up over the knee I would not be getting this problem, all I can do is try to limit the bend so it does not poke through, I have tried to fix the problem but I am so far ahead of the modelling process not much can be done about this problem and when I have tried to roll back to edit the vertices, the rig fails to work, the envelopes and the vertex weight is correct as far as I can see, so this is a shame but with clever camera angles, and limiting the bends of the knees hopefully the final animation will not show this. Without further ado here is the test render:

Sunday, 11 April 2010

Post Twelve

Summary

In this post I needed to do some research on the rigging process for the upper body and conducted a thorough search in Google, the most in-depth tutorials I found were four quite brilliant ones and from them I have managed to complete the rig for my character. I will list these tutorials before trying to explain what happened for the rest of the rig.

Tutorials:

http://34bit.blogspot.com/2008/01/tutorial-ik-setup.html

http://software.intel.com/en-us/articles/character-animation-skeletons-and-inverse-kinematics/

http://www.3dhaze.com/tutorials/char_model/rig.html

http://www.clevislauzon.qc.ca/arts/DOCXSI50/XSIPortal/de614853.htm

And now for the rest of the rig;

I wanted to place a gyro (control object) at the wrist to rotate the hand, move the wrist and move the arm too. To start with I created an IK chain from the upper arm bone to the palm bone, and then I aligned the position of the control object with the IK chain at the wrist of my character then linked the chain to the control object. Now my arm moves by using the control object at the wrist. But to make the hand rotate with the control object I will have to link the palm bone with the control object and this will break the IK chain already made, causing the control object not to move the arm.

To sort this problem out I will use an orientation constraint this will make the palm rotation match the rotation of the control object. This is a useful alternative to linking when linking is not at all possible. I just must remember to align the orientation of the control object’s pivot point with the palm bones pivot point.

To start with I selected the upper bone and selected animation > IK solvers > HI solver to create the IK chain and renamed it, and then I aligned the position of the control object to the newly created wrist IK chain. Now I aligned the orientation of the control object’s pivot point to match the pivot point of the palm bone, and then linked the IK wrist to the Control wrist object.

I selected the palm bone and chose animation > constrain > orientation constraint then clicked on the wrist control object and tested the procedure by rotating the control object, and the hand rotated too.

For the Fingers and thumbs I had decided to create some custom attributes for each of the fingers, a flex would have a number representation of -20, 0 would be the default hand position, 100 would make the fingers pose as if it were going to grasp an object and lastly 200 would make the fingers clench in a fist. With my fingers and thumb set up this way my hand should be able to do anything a real hand would.

To start this complex process I had to change the reference coordinate system to local, as all the fingers rotated on the y axis when set to local. I selected the wrist control object and added an attribute modifier then chose animation > Parameter Editor from the list, this opens a panel where I can edit my new custom attributes that I will use to move the fingers. I have made four custom attributes one for each finger, these will be called; CurlThumbL, CurlIndexFingerL, CurlMiddleFingerL and CurlPinkyL. Each has a range of -20 to 200, and after renaming each custom attribute I clicked the add button and closed the parameter editor when I was finished. These custom attributes show up now on the modifier panel when the wrist control object is selected.
The next step was to use the Reaction manager to set up the master and slaves and create states for the rotations of the fingers, to get to the reaction manager I chose animation > Reaction Manager. In the panel I clicked on the big black plus sign to add a master then I clicked on the wrist control object and chose modify object > attribute holder > custom attributes > CurlIndexFingerL from the pop-up box. The next step was to add the slaves; I selected the two bones that make up the index finger selected the’ add selected option’ from the reaction manager, then chose from the pop-up box transform > rotation > y rotation. This would add the y rotation track for both bones as slaves and creates the initial state with default values.
Now for the fun part; I select the wrist control object and pin the stack on the modifier panel so we can see the custom attributes that have been made all the time, I set the CurlIndexFingerL custom attribute to -20 and turned the create mode on, then I rotated the base finger back 10 degrees on the y axis and then clicked the create state button on the reaction manager. This creates a state for the y rotation for that finger.
The next state will be at 100 so I change the custom attribute integer to 100, rotate the base index finger back 30 degrees and then rotate the index finger tip to 70 degrees, this makes the finger move to a grasp pose. Now I click the ‘create state’ button on the reaction manager.
The last stage is when the finger will be in a clenched fist pose, so I set the custom attribute integer to 200, and rotate the base index finger to about 90 degrees so that the tip of the index finger is touching the palm of my characters hand and create the last state, and now turn off create mode and test. Just by changing the custom attributes integers moves the fingers pose from flex to default, and then grasp to fist. When all the custom attributes have been created (masters and slaves and creating states) animating the fingers should be really easy.

There was just a slight change in the way I did the thumb curl, as my own thumb is able to rotate in all directions, when setting up the slaves for the two bones that make up the thumb I added rotations on the x,y and z axis, thus making the thumb able to move in all directions.
The last part to rig were the shoulders, knees and elbows; I had copied the wrist gyro before hand as I had wanted one for the shoulders, once properly aligned positional to the upper arm bone in the hierarchy panel I click affect pivot only and align the pivot of the left clavicle both positional and its orientation. Then turning off the ‘affect pivot only’ option I link the clavicle to the control object.
To test I simply rotate the control object to move the shoulder, with this simple process the control object is the parent of the clavicle so it may be selected easier.

The elbows and knees are added to make these parts of the rig point in any direction should any twisting of the bones occur, I need to be able to make these move independent of the rest of the body. To accomplish this a small box was created in front of the elbow/knee and was renamed an appropriate control object name, the control object knee was linked to the control object foot to keep it near the character what ever he does. I then select the IK chain at the ankle, go to the motion panel, find the Pick target button in the IK Solver Properties rollout and select the knee control. This basically causes the joint between the calf and the thigh to point at the knee control all the time. The process was then repeated for the shoulder control objects.
The last thing to do is to create a box for him to stand on and name it body control object so moving the whole rig is made easy, this is done by linking the leg, and feet control objects to the body control object then testing the object by moving it; the whole hierarchy should move too.
This concludes the rigging process, which has been in-depth to say the least now I can get on with the skinning part.

Sunday, 14 March 2010

Post Eleven

Bones or Biped?

I tried a biped and tried to position it into some varying poses as a skateboarder and soon realised the limitations and problem areas that would have arose had I chose to animate my model with this kind of rig. I chose to build the rig and try to understand the fundamentals behind the process.

Well this week has confused the hell out of me, I have rigged my model using bones that I have created myself, Ik chains created from scratch, using the reaction manager and adding custom attributes using the parameter editor, setting up masters and slaves and creating states, linking and aligning control objects, wiring custom attributes and then trying to find information as to why the wiring failed; all because of the controllers and the way they were set up on the default settings and then freezing rotations to split the controller into another controller to carry on wiring. It’s been technical to say the least. I have had to try to get to grips with these new techniques and try them out and try to understand the reasoning behind this and this has taken me some frustrating hours of ‘Why isn’t this working!’.

Although I am learning and do not quite understand it all, there are some complex areas that are just too heavy and time consuming so I have been simplifying the process as much as possible. I am using a wide range of tools in 3ds max; I am starting to see how my character will move, what its limitations are, Best of all are the control objects; these have been set up pretty sensibly to help with the animation at later stages, rotations and positioning should now be really easy.

In my next post I will try to explain how and why I have set up my characters arms, wrists and fingers and by using custom attributes I am able to move the fingers; so when I am animating my skater holding his skateboard I will not have to touch the fingers to rotate or position them as I will have already created the attribute to rotate the finger into pre-specified poses. This area has taken me some time because I hit many problems and just couldn’t understand what was going wrong because it was and is still so new to me.

Thursday, 11 March 2010

Post Ten

The Spine

For the legs I used shapes with custom attributes and reactions, this was appropriate as I wanted them to move through specific poses as they roll up for the walk, the spine however is less predictable, I need to be able to rotate the spine in any direction, and move the hands around as needed. It just wouldn’t make any sense to set up reactions for every possible arm or spine motion Instead I plan to use a control object and wire one value to another so the two parameters influence each other through the transform animation.

I’m going to use a gyro handle made from three circle splines and a line spline. You could use any object but this control object looks like it should be rotated. First thing to do is align the control object (gyro) to the lowest spine bone.
Now I need to link the bone spine to the control object. Now if I was to move the control object the spine should move or rotate too.
When I rotate my own spine I notice that the top sections of my spine move faster then the bottom sections of my spine. I would like to capture this same ‘double rotation’ for my rig, to set this up I will wire the rotation of the second lowest spine section to the control shape, so then when I rotate the control object the bone will receive the rotation twice, once from the wiring and once as the child of the bottom spine.

I select my control object, Right click the control object to get the quad menu and select wire parameters. This opens a popup menu and I can continue to select Transform > rotation > x rotation. Now I click on the second from bottom spine section and select Transform> rotation > x rotation from the pop up menu that appears.
Now a new parameter dialogue box appears and I select the rotation listing on each side and click the right arrow and the connect button to activate.
Everything should have worked but when I test the spine bone turns in the wrong direction taking the whole spine with it, and if I was to rotate the control object the spine rotates in all kinds of wrong directions something is definitely wrong here.

What is the Cause? Maybe the control object and or the spine have already been rotated? The wiring is adding up all the shapes rotations on whatever axis. This affects the bones local axis with the rotation. The problem did not occur with linking because I tested the link and that worked. The problem lies with the wiring.

To solve this problem of mismatched wiring I need the control objects local axis to match the bones and then any rotation will work. Although aligning pivot points will help it does not solve the problem. I need the spine bone to be affected in relation to its current orientation not its original orientation, same goes for the control object.

I need to freeze the rotation in its current state, and start animation from there. Alt + Right click to display the animation quad menu then choose freeze rotation. This splits the rotation track into two separate tracks named ‘initial pose’ and ‘keyframe XYZ’. The initial pose track holds any rotations I have performed up to now to pose the objects, and the keyframe XYZ will hold any transforms I do from now on.

If I align the pivot points, freeze the rotations then wire together the keyframe tracks the double rotation will work. Before I show how I did this I would like to talk about controllers, A controller is a method for specifying an objects transforms. (position, rotation and scale) The default controllers allow me to move, rotate and scale objects with the buttons on the main toolbar. Other controllers might control an objects position by putting it on a path and some controllers control an objects rotation by making it look at another object. To change controllers you must go to the motion panel and expand the ‘assign contoller’ panel then you can highlight a controller and select the ‘?’ button to choose another controller. The freeze rotation option splits the original rotation controller into two controllers. To save time in changing the default rotation controller to a list controller I will use the freeze rotation option to set up the double rotation through wiring.

So:

Select the control object, go to the hierarchy panel and click affect pivot only, click the align tool and then click on the spine bone. In the align dialoge box, turn off any positional align options and turn on the XYZ Align orientation options also make sure that pivot point is selected for both the current object and the target object and click ok then turn off Affect pivot only.
The next step is to make sure the control object is still selected Alt + Rightclick to get the animation quad menu and select ‘freeze rotation’ Then select the bone spines and freeze rotations on them too. Now right click the control object and choose wire parameters, the carry on selecting transform > rotation > keyframe XYZ > x rotation. Now click the spine bone and select transform > rotation > keyframe XYZ > x rotation. Now the dialogue box will appear and we select both the keyframe XYZ on either sides, click the right arrow and then ok.
Now we test and check that the spine works all ok. Now to repeat the process for the othe control objects that will control the other parts of the spine neck etc.
This conclude the rather confusing spine section, now on to the fun section the arms, wrist and fingers.