Friday 21 September 2012

Final animations


After a lot more trial and error I decided to just hand-key the animations to be used for the final build. Here's a video with the animations that were used in the build for the hand in:


I admit it's not the best animation work that I have done but I am quite please with the results considering how little time I left myself to do it. The only problem was that the animations didn't look like this at all when imported into Unity...(especially the attack and shoot animations) so I am quite disappointed about that but I will carry on doing some animations for this game so it can look a little more polished for the team's portfolios. Now that the hand-in has been met I can take my time to troubleshoot why the animations didn't translate well in Unity and also I can dedicate more time to learning to use motion capture data.

Tuesday 18 September 2012

Finally Making Caruso Move

I wanted to make a walk cycle for Caruso so that he can walk around in the game engine. I took the data we recorded and plotted the animation to the BVH reference rig. To make Caruso move, all I had to do was set the "source" for Caruso's rig to the BVH rig and Caruso's rig would follow the same motions as the source rig.


After several hours of trying to make a walk cycle my limited knowledge and experience of Motionbuilder started to really show in my work. I'm sure there are some tools in the software that I'm not aware of but I'm cutting it so close with the deadline I think it would be best if I didn't waste any more time troubleshooting. Here's how far I got with it:


Testing out some of the other motions proved to be quite funny - we didn't realise how important it was to have a T-pose starting position so during one of the sessions with the mo-cap suit our actor kept forgetting to T-pose and in the end we scrapped the T-pose altogether. Now that I have done a lot of learning in Motionbuilder I finally know why we need a T-pose...this is the result of not having one:


The control Rig for Caruso has a T-pose stance and the motion data had an acute A-pose resulting in Caruso having raised arms for the duration of the motion. The faults don't stop there though, in my inexperience I have found I encountered quite a few mysterious errors that I'm not sure if it's a bug or something I have done wrong...sometimes all I have to do is re-do all the stages until I get to the re-targeting and it works again. Not really sure what happened here...but I re-did all the importing/characterising/rigging and it worked a second time.


Due to time constraints I posed the hands in a relaxed semi-clench...at least it looks more natural than straight fingers! This is where the IK controls on the rig really helped to save time as I have only ever used FK controls for fingers prior to this project.


It got to a point where I was really running out of time and I was encountering too many problems to spend time troubleshooting so as a last resort I decided to search the Internet for free mo-cap files that I suspected would already be cleaned up - at least I found a run and walk that were cycle-able and can use it temporarily for the build so Aleks (Experience Design) can do a last minute usertest.




As you can see they're not the best looking animations and I did try to edit them but my limited knowledge hindered me again (and my growing impatience) to prepare it for import into Unity I arranged the animations onto a single timeline in the Story window and plotted the animations on Caruso's skeleton:


A jump animation was needed for Caruso as it was a much used action in the game but I couldn't find any decent jump motions so I hand-keyed the animation...it's not my best animation work but I am suitably happy that this is another animation ready to use for the game build. I added this to the timeline along with the walk and run cycles.



Sadly, I have been plagued by many technical difficulties in the last few weeks that although it feels like I have done a lot of work, it looks like I have done barely any! I think if I can at least get a simple idle animation, one attack and one shooting animation then Caruso will be usable enough for the demo build.









Friday 14 September 2012

Control Rig

With the Caruso mesh given a skeleton, skinned and weighted I imported him into Motionbuilder to characterise his skeleton. Luckily, this time I didn't need to manually search through the skeleton's hierarchy to drag and drop the bone names into the characterisation box. Due to the same naming system, all I had to do was drag the character directly onto the "Caruso reference" item in the navigator and it automatically characterises - imagine the tedious task of assigning each individual finger bone?


By characterising the skeleton, I could attach a control rig to the mesh with powerful IK and FK controls and the rig can also be made to target mo-cap data onto - which is what I intended of course!


I played around with the rig a little to check the deformations to Caruso's mesh - looking satisfactory...for now.


However I spotted some verts that I missed at the weight painting stage. This is my own fault for skipping the stage where one can use Maya's component editor to manually assign cleaner influences to certain groups of verts. This happened in a few other places such as the bottom of the coat and around the shoes. Just need to go back into Maya for a few touch-ups to the weight painting.


Thursday 13 September 2012

Skinning

To make the job less taxing (i.e. to take shortcuts especially due to my limited knowledge and limited time) I will learn to use the HumanIK tools in Maya to generate a standard biped human skeleton for Caruso. HIK is a very useful and easy to use tool that is compatible with the bone naming system on Motionbuilder so it'll be much easier to characterise Caruso this time round.

As you can see here in the outliner, the hierarchy of the skeleton is much tidier and named properly compared to the AdvancedSkeleton rig in a previous post. I followed video tutorials from this user on Youtube.


I decided to make things a little more intuitive so I used the move tool on the joints to place them correctly without worrying about how it affected the joint orientation. The joint orientation was corrected later. With virtually no rigging experience beforehand, I had to use a combination of reference images and gut instinct t decide if the bones were in the right place...it's not too difficult though since Caruso is a standard proportion human. The only slight trouble I got at the stage was in the fact that Caruso's arms are slightly bent, twisted and not a straight T-pose. Also the legs are slightly apart rather than falling straight down but this didn't affect anything really.


After binding the skeleton to the Mesh it was onto the weight painting. Again, I have VERY little experience in this area so I had to go with my instinct for much of the process. I have a feeling something will pop up to haunt me when I finally start animating.


I had a few problems with the joint placements so I unbinded the skeleton to modify some joints. For some reason the mesh would deform ever so slightly from the unbinding that it was near impossible to rebind perfectly. Along with forgetting to reset joint rotations when I was checking the deformations before unbinding (so the skeleton changed and I couldn't re-bind it perfectly) I lost some time having to re-do certain tasks and/or fixing broken things.


At this point I notice where I maybe should have placed an extra edge-loop for better deformations but as long as nothing really out of the ordinary occurs at joints then I'm pretty happy. 



Monday 10 September 2012

Shorter Coat

Sadly, I drifted off schedule a little too much and I don't think it's feasible any more to continue having a long coat for Caruso as I would have to rig that and animate it. He still looks very good with a cropped though...I'd say it's made hardly any difference to his overall character. 




If the project was more long term it would be nice to give Caruso a long coat again because it adds to the overall immersion of a game's world when items on the character react to the player's controlled actions. For now, it's priority to get at least some animations on Caruso so he can be used in the game Engine.

Sunday 9 September 2012

Caruso Rig Problems

Nothing could have prepared me for what happened tonight...it is my own fault for not preparing and doing the research beforehand. I have used The Setup Machine rig by Anzovin in the past so am very comfortable with using it and ideally would have used it for Caruso's animations if I was going to hand-key the animation. I have never used mo-cap data before so my knowledge is still very limited for what was needed to prepare a character mesh for motion. A brief search on Google showed up some posts about how The Setup Machine rig was a little too "heavy" to use with motion capture so I decided to use AdvancedSkeleton instead as it looked like a much simpler rig. In fact - that's a little too complex for what I needed too. In fact, it's probably impossible to use with motionbuilder but it was very difficult to find relevant search results on Google.

The first problem I realised was that Caruso's mesh needed a skeleton. However, the way the AdvancedSkeleton tool works is it creates half a skeleton then mirrors it. But in the navigator, the entire skeleton is not listed in the hierarchy under one common parent. When I check the outliner in Maya I had to search through the lists for joint icons and try to correspond it to the Motiobuilder navigator but much of it was guess work...


I'm pretty sure I didn't do it right:


Maybe I just found the wrong things to characterise...but it's far too confusing to find the bones within the mess! After many hours dedicated to troubleshooting on the Internet and watching some more videos on Youtube I realise that all I really need to do is to apply a skeleton to Caruso and sort out the skin weights. I wish the AdvancedSkeleton rig worked though...the set driven key for the hands to clench would have been a nice shortcut to use. Ironic how much time and work I wasted for this little shortcut [that I don't get to use anyway]. 

Saturday 8 September 2012

Using Motion Capture

After all the trouble getting the rig to work I can finally start using the motion capture data and have been extremely excited about this for a long time! Unfortunately I have zero experience in using motion capture data and zero experience in using Autodesk Motionbuilder. Luckily Youtube is a great place to look for tutorial videos for most things and I have found some excellent tutorials from TheCGBro.

At first, I started by importing the "sword attack1" motion which was the first motion we recorded using Kingston University's inertial Animazoo motion capture suit. It took a little while to get used to the interface of Motionbuilder but after a lot of repetition [and troubleshooting] I got the hang of finding what I needed to find. The rig used for motion capture didn't use Motionbuilder's characterisation naming system for each bone so I needed to manually characterise the mo-cap rig (BVH reference) which is a tedious but necessary process.


After characterising I imported the rest of the motion bvh files and merged so I can access all the animations in the same fbx file. I assigned the Motionbuilder control rig the the BVH reference and baked the animations onto the rig ready for cleaning up the keyframes.


I started by attempting to clean up the sword attack 1 motion. Here's how it looks before cleanup:



I then ran the "key reducer" filter on the FCurves as there were full-body keyframes for pretty much every frame of the motion. The data was recorded at 60fps but luckily when baked to the control rig it reduces to 25fps (or whatever setting you choose, in my case it was 25fps) so already I have fewer frames to work with but it would be more practical to reduce the keys further to remove any jitters. It already looks quite good though even without running the key reducer.


Even with reduced frames the motion hasn't lost any integrity - this filter is a very useful tool!



Now that I can [quite] confidently run a quick clean-up of the motion data and bake it to a control rig I just need to attempt to get Caruso's mesh moving!







Thursday 6 September 2012

Rigging solved

I finally realised what went wrong with my first few attempts at rigging! First, the most stupid mistake I should have spotted was the fact that Caruso's centre was at the origin but Advanced Skeleton's rig sits above the origin; which explains why the foot controls were nestling awkwardly at Caruso's hips.


Disastrously, I spent a long while working out why the chest joint was slanted. I noticed that the  chest joint changed orientation the moment I tried to move the neck joint - but the tutorial video showed the neck joint being moved quite easily so I couldn't work out how to place the neck joint in the correct location without affecting the chest joint's orientation. My solution: unparent the neck joint, move it, then re-parent it back to the chest. Did it work? yes...so I went ahead with adding the "skincage" (advanced skeleton's auto-weighting tool)


...and then I realised nothing has actually been fixed! I now noticed the orientation of the hip and the shoulders were completely off. I don't understand how the person who made the tutorial video was able to freely move the joints without any problem but I was following the tutorial very closely and ended up with a twisted skincage. It took me another 5 new attempts at adjusting the fitskeleton, each time trying to avoid doing something that might affect the joint orientation and then I finally managed to generate a flawless skincage.



The answer? I didn't use the move manipulator tool AT ALL despite the tutorial video showing it was used. I merely adjusted the x/y/z values through the channel box and that seemed to be the only way I was able to avoid any disorientated joints. So I continued to follow the tutorial videos and ended up with a rather adequate rig of Caruso. 





Some weight painting will still be needed (particularly around the shoulder/underarm area) and something needed to be done about the coat but all-in-all it was a working rig and I was happy it finally worked.



Now I can finally attempt to use the motion capture data we had spent hours recording in previous weeks. It has taken a very long time to get to this stage and there is still a lot of work to be done but first, I have a lot of learning to do...

Monday 3 September 2012

Textured Caruso [nearly finished]

The entire process if creating the model for Caruso has taken me far longer than I wanted to but I think this has been down to my perfectionist ways manifesting in the creation of the only character I get to work on. I wanted to develop my Mudbox/sculpting skills so spent quite some time on adding the little details to Caruso's model - I also felt that the base mesh looked very plain so attention to detail was needed.
Each mesh had to be exported as separate .obj files with high resolution and low resolution versions so I could use Xnormals to generate the Normal and Occlusion maps. This was the first time I used Xnormals to generate maps and I was overall quite impressed with the software. Unfortunately something went wrong when exporting the high resolution mesh of Caruso's head that Xnormals detected an N-gon. I was absolutely sure that the model of the head was completely quads and there were no error prompts when Caruso's base mesh was imported into Mudbox so the mystery has yet to be solved. Luckily, I was able to use Mudbox's own map extraction tools to get the normals for the head.



The final normal map after some corrections made in Photoshop.

The occlusion map after corrections made in Photoshop.


The diffuse map (alterations may still be made if there is time) - I re-painted the base colours and worked on top of them with textures generated with Photoshop's filters.

Here are some detail shots of the Caruso character model so far:



I'm very pleased with how the stubble turned out, I'm not usually very good at painting facial hair of any kind but it looks good (if I do say so myself) and definitely transformed Caruso's appearance dramatically.


The clothing folds are looking quite good in the viewport and adds interest to the mesh. 






Wednesday 29 August 2012

Texturing the mask

There were no final designs made for Caruso's mask in the end so I have taken inspiration from the concept work made by both Nell and Cullan and merged the two to create the texture for the mask. Some feedback from team-mates is quite positive but there will be some alterations made by my team mate Nell if she finds the time.

Some progress shots:






And the final outcome:

I am pleased with the outcome but am a bit on the fence regarding the orange stripes.