Saturday 25 February 2012

3DPF - Final Project Oct 2011

Video Reference:

For the final project, me and my partner, kevin, have agreed on choosing a short scene from a Jackie Chan movie call "Gorgeous". We have decided to pick up a small scene from the movie, where the scene shows Mr Allan, which is the guy talking to Jackie Chan, who wants to initiate a fight with Mr Chan. Thus, we find this part interesting and decided to use the dialogue in our final animation project. Below is a video of the dialouge, similarly a video reference as well for our final animation.


Characters:

We have come out with two characters representing one another, Mr Chan, and Mr Allan. Mr Chan who doesn't really enjoy fighting and Mr Allan who loves to challenge himself and the one initiating the fight against Mr Chan.

Mr Chan:


Mr Allan:


Characters Traits and Stories:

Below are two of their traits and short stories that we have come out with, showing the different personality as well as the story behind the fight.

Mr Chan:


Mr Allan:


Storyboard:

After hours of thinking, we both have come out with our own movements for the short scene. I have selected Mr Allan as my character for the scene, while my partner, kevin, will be doing on Mr Chan. After that, we have put together both of our ideas and come out with the storyboard that will suit the scene. We also have to consider the syncrohnise of our movements accordingly so that our movements will be compatible with one another speech, thus the whole scene will not look in a mess. We finally be able to come out with our best idea of the storyboard, where we find it nicely done, good synchronisation, as well as the most importantly no conflicts in between our animation.



Blocking:

I have chosen Mr Allan as my character as mentioned before, thus as reference to the storyboard, I have come out with my own movements and animations for my character Mr Allan. I feel that it is very important to come out with the key poses as it is much easier to analyse and understand the different movements clearly int the initial part of the animation. Below is the key poses that I have come out with and is done in this blocking animation.


Movements (Without Facial):

After doing the blocking, I have a much clearer view on the different movements of my character, thus I have come out with my own animation movements through key poses that I have done previously. Below is the movements of my character without the facial expression, where I have already smoothen out the different parts which looks unatural and weird of my animation.


Final Animation (Individual):

After doing out and smoothen the different parts of the movements previoiusly, I have continue to work out on the facial expression of the characters, through its movements we can see the different expression that the character have shown out. After the facial animation done, I have quite finish my part for my character. Below is the final animation of my character that I have done!


Final Animation (Group):

We have finally come to the last part of our animation after spending hours of doing our own characters, where we finally be able to put both of them together and create the final group animation. Before putting them together, we already know that there will be some problems with the synchronisation, thus after we have finish our movements, we decided to put together first and see if the synchronisation have any problem, from there we will be able to go back on our own characters and do the necessary changes before putting it together for the final animation. After the changes, we set our positions to face each other and synchronise with the movements. Lastly, we also added the lightning effects in maya at the ending part of our animation, to show the eye contacts with one another as well as building up the tension before fighting for our characters, to make the animation looks more cool with effects! Below is a playblast of our final animation, but for the one we pass up, we have to use rendering so that the lightning effects will glow as well as the different lighting that we have done on the stage.


Reflection:

Yet again we have come to end of the subject. Through this subject, I have really learnt a lot about animations as well as scripting and enjoyed it in the process. What I really enjoy about is actually doing the final animation project. Although I spent hours of non-stop doing our final animation, however, when I finish and look at our own animation, I will have a sense of achievements where you see all your hard work being shown inside my final product. Although my animation is not one of the best, but it is definitely not one of the worst. I can finally understand how the professional animations spents their precious time and efforts to create some of the finest animation work. However, there's still a lot more that needs to be done to improve our animation, thus we cannot be complacent just yet. The skills and knowledge that we have acquired will bring us throughout our working career, thus I will continue to work harder and apply the things that I have learnt and achieve better result!

Saturday 4 February 2012

Week 3 - Exercise 1, 2, 3, 4, 5 (Scripting)

Exercise 1

For this exercise, we are going to work on a new thing call the Mel scripting that we have never done before in Maya. I will need to start with the basic of Mel scripting by following the tutorials in Maya to have a much more understanding of how Mel scripting works. By doing the tutorials and exercise, I will know how to work on scripting in Maya and will be able to use it in the future.

Lesson 1:

For this lesson, we will be introduced to the basic of Mel scripting. Using Mel scripting, we will be able to create different kinds of shapes as well as position them using scripting, without having to create or move them manually.


Lesson 2:

For this lesson, I have learnt the power of Mel scripting, by just typing the necessary scripts and codes, we will be able to create shapes as well as lighting which is simply amazing, but I believe there's more to come. Below are some of the screenshots that I have done by using the different objects and from the mel scripting and successfully create the lighting effect by following the tutorials.





Lesson 3:

For the 3rd lesson, we will need to use the maya lesson file which can be downloaded at the maya autodesk main website. Using the already model barrel, I need to position it while duplicating it and stacks up accordingly using the codes and scripts given in the tutorial. Lastly using the given codes and scripts, I eventually be able make the stack of barrels fall by setting the gravity and makes the barrels falls off naturally. I have also replace the last row with 5 barrels as stated in the exercise in my second video below.




 

 

Lesson 4:

For lesson 4, we need to create some user-interface using Mel scripting. We will be able to create the user-interface by following the tutorials, and creat some of the ismple button user-interface. Below is a screenshot and playblast examples of user-interface, where you will be able to make the cube rolling using the interface.



Exercise 2:

For the next exercise, we need to create some zombies scenes by following the necessary videos tutorials under scripting in youtube where the link is given in the microsoft words in the exercise. After following the tutorials, I am able to create the zombie apocalypse successfully. However, some parts of the video is not clear and has some errors which I am going to talk about later. Overall, it is still quite straight-forward and easy to understand as the tutorials explain every pasrts clearly with explaination, thus I am still able to finish the scenes with much trouble.

Zombie Apocalypse Part 1:

For the 1st part, we will be given a human walking maya file with the walking animation in it. By following through the tutorial, we will be able to make the human move and rotate in random directions using the expression editor. However, we need to set a boundary so that the human will not keep walking out too far. Thus, the tutorial teaches us to make a boundary so when the human is trying to go beyond the boundary where the human touches it, the human will automatically turn around and walk in a different direction again. Below is a playblast of the outcome of what will happen when finishing the part 1 of the tutorial.


Zombie Apocalypse Part 2:

For the next part, we need to introduce the zombie into the scene. While the zombie has already the walking animation we just need to use the same thing that we have done to the human, we will be able to make the zombie move similarly to the human. However, we cannot make the zombies move as fast as the human as the zombies will looks like it is gliding and look very unrealistic. Thus we need to create 2 attribute which is the speed and agility for the zombies, and make the zombie move much slower thatn the human to par out with its walking animation to make it looks nice and realistic. Below is a playblast of the outcome where you will be able to see both the human and zombie moving around.


Zombie Apocalypse Part 3:

For part 3 of the tutorial, we will need to start to duplicate the amount of zombies and humans in the scene. We cannot simply just duplicate them by using the duplication tool as the attribute of the original human and zombie would not be inside the duplication of the other humans and zombies. Thus, by following the video tutorial we need to type in the following script given in the script editor. By doing so, we will be able to create as much zombies and humans as possible with the attribute of the original human and zombie by updating the following script everytime we want the change the amount of zombies and humans in the scene. Below is a playblast of the selected number of zombies and humans that I just type in, where you can see them all the same walking around.


Zombie Apocalypse Part 4:

Part 4 of the tutorial we need to make the human turn into zombie when they are a certain distance very near a zombie. For this part it is a little but trickier and difficult. Like I mantion before, this is the part where the tutorial has some errors in it. The user type in only "$dist..." while the video tutorial tell us to type in a "float $dist..." infront which confuses me. I also have a few errors where I could not see some of the semi colon clearly and type wrongly. However, I still manage to complete the tutorial after I view it a second time. By following the given scripts and type in the expression editor, we will be able to make the humans turn into zombies when the human goes near to a zombie. Below is a playblast of the outcome where you can see the human get infected and turn into a zombie when the human goes near to a zombie.


Zombie Apocalypse Part 5:

For the last part, we need to import the human running scene into the selected maya scene. We will have to make the human panicked when goes near to a distance towards a zombies. Thus we have to combine the panick animation into the original human by creating a boolean attribute call the panicked, where the human will run much faster than before as if the human is panicking when he sees a zombie. We need to follow the scripts in the tutorial and type it in the expression editor. By doing so, when we turn the panicked attribute on, you can see the human running around when he goes near a zombie. Below is a playblast of the complete scene that we have done with the necessary items by following all the previous tutorials.


Exercise 3 and Zombie Apocalypse Part 6:

For exercise 3, it is actually similar to that of the part 6 of the zombie apocalypse tutorial. For the part 6 tutorial we need to create a user-interface slider so that we can create the amount of humans and zombies we want by just using the slider to indicate the amount of zombies and humans you want in the scene. By doing so, you will not have to go to the script editor and update the necessary scripts everytime you want to change the amount of humans and zombies you want in the scene. While exercise 3 is that we need to create one more random button in the interface to generate a random amount of zombies when clicked on the random button in the interface. Below is the source code with comments of how the random button is being done, as well as the screenshots of the scene after clikcing the random button, and after clicking the create button with the specific number of humans and zombies you have set in the textbox.

Source Code:

if (`window -ex Zombiemaker`) deleteUI Zombiemaker;

window -wh 400 75 -t "Zombiemaker" Zombiemaker;
//Size of the UI width 400 and height 75

columnLayout -adj true;

intSliderGrp -l "Amount of Humans" -f true -v 10 -min 1 -max 25 slider_humans;
intSliderGrp -l "Amount of Zombies" -f true -v 3 -min 1 -max 10 slider_zombies;
//Create slider of both zombies and humans, restricting its min and max amount

button -l "Create" -c "create()";
button -l "Random" -c "create_random()";
//Create both buttons "create" and "random" for generating of zombies and humans 

showWindow Zombiemaker;

proc create(){

string $all_characters[] = `ls -tr "human*" "zombie*"`;
if (size($all_characters)) delete $all_characters;

int $num_humans =`intSliderGrp -q -v slider_humans`;
int $num_zombies =`intSliderGrp -q -v slider_zombies`;

for ($i = 0; $i < $num_humans; $i++)
{
string $new_human[] = `duplicate -rr -un -n "human#" original_human_GRP`;
setAttr ($new_human[0] + ".v") true;

float $randx = rand(0,1120);
float $randz = rand(0,1120);

move $randx 0 $randz $new_human[0];
}

for ($i = 0; $i < $num_zombies; $i++)
{
string $new_zombie[] = `duplicate -rr -un -n "zombie#" original_zombie_GRP`;
setAttr ($new_zombie[0] + ".v") true;

float $randx = rand(-1120,0);
float $randz = rand(-1120,0);

move $randx 0 $randz $new_zombie[0];
}
}
//Codes to generate random number of zombies

proc create_random()
{
int $random_number = rand(1, 50);
int $num_zombies = $random_number;
string $random_number_container = "Random amount of zombie created: " + $random_number; text -label $random_number_container;

for ($i = 0; $i < $num_zombies; $i++)
{
string $new_zombie[] = `duplicate -rr -un -n "zombie#" original_zombie_GRP`;
setAttr ($new_zombie[0] + ".v") true;

float $randx = rand(-1120,0);
float $randz = rand(-1120,0);

move $randx 0 $randz $new_zombie[0];
}
}
//Shows the number of zombies in the scene after the random button has been clicked





Exercise 4:

In this exercise, we need to download the "cometScripts.zip" file and install the scripts in our own Maya file. After extracting it, there a "ReadMe" file where you can view it, there it teaches you how to install the cometScripts. First you need the extract the files into your own maya script file folder. I am not quite understand how to install in the "ReadMe" file, however I used my own method, where I open out my maya file and type in the following scripts into Mel scripting that is given in the "ReadMe" file which is "source "cometMenu.mel" ;" and execute the code. The comet function is now available at the top on the menu bar.

After installing the cometScripts, I have created some control curves using the cometScripts menu and below are the screenshots of some of the control curves.






Exercise 5:

1. Imagine you are creating a scene where a car drives along a straight road, but swerves around at random as if the driver is drunk. Do you think it would be useful to know how to program using MEL when creating this scene? Explain.

In my opinion, I feel that it is useful to use Mel to create this type of scene. Similarly to the zombie scene, we can add an boolean attribute called to the car, so as when we can activate the attribute to on, so as similar to the human rotate in the zombie scene as the car can rotate left and right randomly as well, thus I feel that it is useful as Mel is a powerful scripting capable of doing so.

2. For the drunken car scene, give TWO advantages and disadvantages (pros and cons) of using scripting to create the swerving car animation.

First advantage is that using scripting to generate the random movement saves a lot of time compared to manually staging the car by keyframes and etc.

Second advantage is that using scripting can allow you to make the drunken car scene looks better, as the car will sway left and right randomly which is quite realistic as you will want to get the randomly effect that sometimes it will sway left or right while sometimes not.

First disadvantage is that when you need to sway vigorously left or right at certain moment it is hard to set again as the scripting randomly generate the movement of left and right.

Second disadvantage is that when at some point you need to stop the animation and continue on other things with the scene will be difficult and tedious as you will have to reset again and set the keyframes to make the scripting stop at one point.

3. You might think that programming using MEL is similar to using ALICE (in Year 1). It is actually very different. Explain TWO of the main differences, as far as you can tell.

Although I quite forgotten how Alice somehow works, but I remember that Alice is actually only be able to do programming using its initial program which is the things that it have already been made in the program, while in Maya you will be able to download some other scripts like the cometScripts we do in Exercise 4 and thus able to do much more than just its initial program.

Second difference is that I feel Alice is a program for basic programmers when they just starting to learnt scripting, thus I feel that the potential of Alice program is limited, where we cannot do advance things compared to Mel scripting which is a more advance programming where the program has the potential to do more advance scripting using Mel in Maya.

Reflection:

After doing the exercise for week 3, I actually learnt quite a lot about mel scripting that was not touch on previously. I found out that Mel scripting is actually very powerful and be able to create advance scenes. Although the exercises are long and tedious, but I quite enjoy doing it. Especially the barrels part as well as the zombie apocolypse. Through Zombie apocolypse, I learnt how to create humans interacting with the zombies through Mel Scripting when they come in contact with one another. Overall is a fun and interesting excercise and I've really learnt a lot of things through these lessons. I will continue to work hard and understand more about animation and scripting!