Wednesday, 18 May 2011

Post 44 - Maya facial rig - Eyes

Now that I've finished the 3ds Max head rig using morph targets and reaction manager (and then applying this to the full figure rig), I felt it was time to explore another method of face rigging. Although you can also rig faces using stretchy bones and skinning them as influence to the mesh, I also wanted to return to Maya to 'mix it up a bit'.




I began by importing the Max eye geometry into the Maya file. These would then need to be given basic textures (which despite not knowing how to texture was very easy to do). The technique for rigging eyes is different from that of 3ds Max and is done by placing the eyes into position, then creating joints from the head joint, aligning them and then adding them to the joints as skinning influence. Now skinned, they will move with the head. Next up was to create look at controls. In Maya, this is  done by by applying an aim constraint on the eyes, making them aim towards a spline controller. This is the same method as Max essentially, the main difference being the way in which they are parented to the head (however, there are other strategies for parenting, which I will get into with the face joints in the next post). Influenced by what I learnt it 3ds Max, I did try to do most of this process, but I did find some tutorial clips which confirmed that what I was doing was the right way to go about it.



Joint based eye set up - LINK
Aim constraint - LINK

Post 43 - Full Figure rig: facial additions



The reason I said in my proposal that I was going to make the face rigging on a separate head model was that I wasn't convinced the full figure model has a good enough head. I had another look at it and it seems that it is more than capable of taking on morph targets and would work well for face rigging. So to cut a long story short, I have repeated all of the steps taken to make the head rig and applied it to the original full figure rig. This process took a week or so but it was well worth the time as I learnt the methods whilst making the first one, and then applied this knowledge to the second one.


The set up is identical and I copied over both the UI and the eye system and then relinked the eyes and made morph targets out of the figure's face. Considering the rig was going to have nothing done to its face, I am very pleased I made this decision. It is going over the same process, I feel it is important to repeat these processes so that they stick and I get better at doing them. The link below is the desktop capture that I handed in as part of my submission, as well as another example of the jaw rigging.






Full figure rig Reaction Manager jaw demo - LINK
Full figure rig wih facial rigging clip - LINK

Post 42 - Final head setup rig: Evaluation



The head rig is now finished. Since my last post, I went ahead and made additional morph targets for the eyelids opening and closing. These were then wired into the Face UI. I decided, after a discussion with Darren, to create some phonemes. As a follow on from the last post, I have made phonemes for A, W, O, B/M/P, U and V/F. I then redesigned the face UI to incorporate these extra features. In theory, it is possible to relocate the pupil controls into some sliders, but this would mean making the original pupil sliders not work, plus I feel that rather then by sight, using numbers is much more accurate.


New Face UI
I am very happy with the outcome of this face rig. It was a lot more understandable then I first thought and the use of morph targets made the process for a lot of the time linear. The use of reaction manager to take it a step further was a great way to make the rig a lot more animator friendly. Being introduced to the notion of corrective shapes was very helpful and allowed me to see what was important and a what time it was useful to do. 


However, there were a few issues. Firstly, the reaction manager at times is very confusing as it displays all reactions unless you toggle the show selected button a few times. Also, one major problem with the use of morph targets is that asymmetrical morph targets cannot simply be mirrored over. A very long winded work around needs to be used in order for this to work. There are scripts out there which apparently mirror geometry and vert information, but I have not been able to make any of them work.




But finding out the work around aloud me to seek out the solution and made the project all the more better for it. In addition, morph targets a great, but currently aren't particularly used in games due to the extra data needed. Games usually use a few corrective morph targets, but mostly bones / joints as they do not require 20-30 morph targets. This system is more suited for CG film and animation. 


Another issue I have with morph targets is that unless the targets are very exaggerated and a lot of them, the motions possible when wiring these into a controller are to an extent limited as they are already based on morphed models. It isn't direct manipulation , but for a first head / face rig, I am very pleased with the outcome and I am sue that this will help when I move onto a different method for rigging a face.






Final head demonstration rig - LINK

Post 41 - Parenting considerations and work around

After working with phonemes (shapes used in speech which can be difficult to animate) I came across a reaction manager / rotation problem. The jaw is already wired to the jaw controller and so cannot be given additional driven keys. However, there is a way around this. I have created several morph targets for some phonemes, but both the 'A' and 'O' need a slight jaw movement. Setting a state and slave would be the way to do this, but we need to move / influence the jaw bone without interfering with the jaw control reaction. I ended up using the rotation of the point helper, which is parented to the top of the jaw (as used earlier to zero out the transformation information). As this is connected to the jaw, it moves the jaw when it is rotated, so this was used for the 'A' phoneme. Next is the 'O' shape. the jaw bone has a 'cap', or 'nub' bone at the end of it which sticks out of the chin. As it was a small amount of influence I needed, this one was connected using it's position rather than rotation.


This work around has paid off and is an industry standard way of working. This is one of the main rules of rigging, which is to try and avoid parenting or having direct connections with the geometry and use parented point helpers instead. This technique is true for the full figure model also in the arms, legs, back, eyes and muscle bones.

You will notice in the video that the jaw has been animated to open twice. What can be seen is that the first 'jaw open' is driving the jaw as the point helper doe not move, but the second 'jaw open' is the 'O' phoneme and so is being driven by the point helper (seen by it rotating, casusing the jaw to rotate also).










Jaw parenting clip - LINK

Post 40 - Eye brow set up

The eye brows have been a little bit trickier to rig. With the help of the Paul Neale rigging DVD set, I was able to do this and to understand the process. Each motion of the eye brow has been created out of morph targets (and again , using the mirror morph target work around, these have been mirrored for the other side also). So the morph targets for each brow are:


Up
Outer corner, Middle, Inner corner
Down
Outer corner, Middle, Inner corner


This is also done using the Reaction Manager. The main difference with the eye brows is that ideally, the controller should be able to move the eye brows using both the slider's X and Y directions to get full motion of the corners of the eye brows. However, the problem is that whilst each morph target needs the local Y (up/down) axis, the local X (left/right) control would do nothing as the brow's channel has already been used. The way to do this is to add a second euler layer (bezier float). So when using reaction Manager, the Y axis should influence an up and down position, but the X axis should influence the outer and inner morph targets.




So, this requires a 'counter reaction'. When the controller is in the bottom left corner, the Y axis has full influence over all of the 'down' morph targets. But the second layer controlled by the X would have a series of counters, so the outer would have 0% influence, the middle would have -50% and the inner would -100%. Its a bit confusing until you actually do it, but essentially the result is what appears to be a smooth controller which seamlessly blends all the morph targets together as they are constantly influencing and counter influencing to get the correct kind of look.


I've recorded a video showing the results of this where I try to highlight what is happening in the scene.




Eye brow demo clip - LINK

Post 39 - Reaction Manager

Just a quick post this time to explain the key similarities and differences between Max's Reaction Manager and Maya's Driven Keys. Both systems are essentially used to do the same thing, which is to drive a transformation of certain objects; namely, to control one object using another. In both systems, you are required to load a master and a slave (driver and driven in Maya). In Max, you set a series of states, which house the translational information of the objects. In Maya, instead of states, it is keys, but apart from the name difference, they are the same. I found the Max system slightly confusing to start with as when you load you master and slave objects, it automatically creates an initial state. 


The problem with this is that if you want several things to be controlled at once, it creates 3 or more states. However, it is simply a matter of deleting these and creating a new state which will include all of the slaves. Also, in Max, all of the reactions which have been set up are displayed so if you are trying to locate a specific rotational value of a bone for example, it can be a tad confusing. But there is a work around by toggling the show selected button a few times, this will show only the master object which is being added to. 


In Maya, there is the almost opposite problem. Setting up a driven key is extremely simple and easy to do. However, once a driven key has been made, it can be difficult to find it ever again. This can lead to having to delete the object which has the driven key and starting over again. It can be found by selecting the controlled object and finding the link in the hierarchy view but a bunch of options need to be toggled before you can find it. Additionally, Max's advantage over Maya is that in Max, key framed objects can be used when recording states. This makes it very clear and quick to set states up. Maya on the other hand isn't as key frame friendly and can often lead to the key frame itself being a driven key. A major issue I had with this was when I deleted the key frames used to set up driven keys, the driven objects were still being driven, but by noting so not a good thing to happen. I resulted in not putting down key frames and did it by hand when setting driven information. 


Both systems can be used to great effect, but they do have their software specific problems. They are however extremely useful and tends to be the main method for wiring bones/joints to controls (essentially its saying; when object A moves up, object B reacts to it and the reaction is what ever to tell it to be such as rotate, scale, move, all a combination).





Tuesday, 17 May 2011

Post 38 - Spline face user interface



For the face controls, I used a series of spline based shapes. There was a really good tutorial on how to create a slider from Paul Neales' DVD set which involved scripting. The script essentially is saying that as the child 'joystick' is moved inside the space of its parent 'rectangle', it can only travel a certain distance before stopping. To create the illusion that it is stuck in the box, the script called for a lot of if scripting and needed the same unit measurements of the rectangle. The script cleverly was made by using length data rather than name dependant. This allows for the controllers to be scaled or altered into sliders, or squares and yet the joystick will still remain inside the box. This is good because when controlling a rig, it is crucial that there are limits as to what can be animated.


So far I have rigged up the jaw with the corrective shapes, as well as some motions for the corners of the mouth to go up, down, in and out. I have still yet to do the eye lids and eye brows.