Wednesday, January 25, 2012

Week 4 - Exercise 5(Questions and Answers)

Answer the following questions:

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.

Answer:
In my opinion, MEL scripting is only able to create a normal random swerving, just like the human in the Zombie exercise but it is not the best choice as we are not able to create any effects like breaking at some point. It is better to do it on the stage itself so that you can manually adjust the animation.


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

Answer:
Advantages:
  • The first advantage of using scripting for the scene is that I am able to get the basic swerving of the car at random and I do not have to waste time to animate it slowly. It saves time.
  • The second advantage is that, with MEL scripting, I am able to do a control panel to adjust the speed of the car. I do not have to confuse myself and use keyframes.

Disadvantages:
  • The first disadvantage is that I may not get the effects that I want with MEL scripting. For example a sudden jerk and when it jerks, the car boot will open a little to show the impact of the jerk. I will still need to do it manually.
  • The second disadvantage is that the animation will go on forever until I press the stop button. It will not be easy if I want to add in other scenes.


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.

Answer:
Differences:
  • Alice is a freely available teaching tool designed to be a student's first exposure to object-oriented programming while MEL is an advance scripting.
  • Scripting languages like MEL scripting are languages that allow you to send commands directly to a system that executes these commands. These commands are read line by line and executed. An error is issued when a line cannot be executed for any reason. Programming languages that are used in ALICE are languages that allow you to create a program by writing structured code that is read all at once by the system, checked for errors, and translated into an unreadable format that the machine can then execute. In Alice's interactive interface, students drag and drop graphic tiles to create a program, where the instructions correspond to standard statements in a production oriented programming language, such as Java, C++, and C#.

Week 4 - Exercise 4 (Control Curves)



P.S. Click on the images to zoom in because the images below are small and not clear
Arrow

Locator

Bulb

Cube

Cross

I have to put the cometScripts.zip folder in Maya script folder and open Maya script editor. In the script editor, I have to load the cometMenu.mel source script and in key "cometMenu;" in the box below. The tool will appear on the bar on top of the screen and now the controls can be created! :)

These are some scripts that are taken online and after attempted this exercise, I was amazed of what MEL scripting really can do. There are different methods of how to use MEL scripting and it is fun to try some the different methods. In this exercise, I was taught how to use MEL to create control curves. It was actually an easy activity, I must say. Only that the MEL files have to be in the correct Maya script file. If not, the files cannot cannot be found in Maya.

Week 4 - Exercise 3(Zombies in random)


I added a new button named 'Random' and change the title of the control panel to 'Zombie Maker'. I also created a new procedure called the 'zacp_random()'. In the 'zacp_random()', I copied the previous codes and edited the codes only for the zombies. I created a variable and set it to random between 1 to 50. I also created a 'text' and the 'random_number_generated' that will generate when the 'Random' button is pressed in the control panel. The random button will not only be generated at the control panel, it will change the number of zombies on the stage.

In this exercise, I learnt how to do the codes in Maya. It was like a test as I have to understand the codes and try it on my own. From what I understand, MEL scripting uses ActionScript which is quite familiar for us now so it was not much of a problem. This exercise is very helpful if I need to create many objects on stage.

Reference: http://download.autodesk.com/global/docs/maya2012/en_us/index.html

Week 4 - Exercise 2(Zombie Apocalypse Scene using MEL)

Part 1






On the first video, I was taught how to let the human walked continuously and of random X and Z axis. I also learned how create boundaries. From the first video, I can say that I've learnt quite a lot. The part that makes the human walk continuously is very useful. I will definitely use this in future.

Part 2




In part 2, I learnt how I can use the human and duplicate special and turn it into a zombie. It is not as tedious as it seem. I need to only duplicate special, remove the human and replace it with a zombie so that it is clearer to see which is the zombie and human. Since zombie walks slower, I change the zombie's speed.

Part 2 - Zoom in on Zombie

This is the zoom in of the zombie and as you can see that it walks slower than the normal human. And it also looks uglier.

Part 3




In part 3, the tutorial taught me how to create more than one zombie and human and all of them doing the same actions.

Part 4




In the previous part, whenever the humans walks beside nothing happen. That was not supposed to happen. The humans should turn into zombies whenever they are near to them. In this part, I learnt how to set the distance so that the human will change to zombie at a certain distance.

Part 5




The 5th path, there were 2 types of human, the one that walks naturally and another was the one that will look scared when he gets near to the zombie. I had to set the distance between the zombies and the human and when it gets near, the action will change. This is interesting as I am able to use 2 different humans and replace each other. I do not have to animate and each one of the humans.


Part 6- Control Panel
The last part of the tutorial does not need a playblast because it only taught me how to create a control panel to control the amount of zombies and humans that I want to add on stage. I do not need to create thousands of group to add them to stage.


Monday, January 23, 2012

Week 4 - Exercise 1 (Scripting in Maya)



Lesson 1 - Commands in MEL


Lesson 2 - Saving scripts to the Shelf



Lesson 3 - Using variables in MEL




Lesson 4 - user interface creation and procedures



This is the first time doing Mel scripting and it is amazingly awesome! I can add anything on the stage just by scripting. I do not need to add it on my own. It is very handy for animators as it makes their job easier. I am also able to add gravity to the barrels which makes the barrels look more realistic. This exercise is very useful and I would want to do more scripting in the future.

Friday, January 13, 2012

Week 2 - Blocking

Exercise 1a

The movie scene that our group chose was 'Dawn of the Dead'.

Brief description of what we were supposed to do:
The zombie clutches at the woman. It bites at her neck and arm. She screams with terror. She tries to pull away, but the creature holds her. It bites again. A trooper comes up from behind and tries to wrestle the creature away.





The first key pose was the girl walking alone and looking out for zombies.
She was looking all around her to ensure that there are no zombies approaching her.


Second key pose was when she realized that there was a zombie
approaching towards her so she turned her head slightly to the right
and look with the corner of her eyes.


When she saw someone in blue approaching her, she turned her head fully
and shout as she was
shocked to see the zombie behind her.
The movement of the hair to shows that she tried running away
but was not able to as the zombie was too fast
.

The zombie caught her and and grabbed her by the neck.
She could not move as she was to shock and weak.
The zombie then attacked her and bite her neck.
She struggled to avoid being bitten.


A trooper came running from behind and pulled the zombie away from the woman.


Exercise 1b


The sound file that I chose for this exercise is 'Harry Potter- No' and this the reference video that I made.

Exercise 2



Reflection:
This is the final outcome of Exercise 2. With the help of Mr. Douglas, I realised the mistakes that I did. For example, the hands look better moving up and down rather than turning one whole round. These are the main keyposes for the soundfile. I used step tangents throughout the short animation so that the keyposes are clearer.I paid attention at the reference and whenever I was unsure of the poses, I will try to move my body so that it is easier to visualise.

Tuesday, January 10, 2012

Week 1- Facial Animation with Blend Shapes


Exercise 1a:
Boris -"The Dark Side"


Reflection:
After attempting this exercise, I think it is easier to do facial expressions than body movements. Before doing this exercise, I always thought that mouth plays the most important part of the whole facial expression because it is where the voice is coming out from but actually, the brows and head is as important too. If you just say out the without any expressions, it does not look interesting.

Exercise 1b:
Short Animation of Myself- Don't mess with Boris







Reflection:
A short video of myself. Boris is a guy so I asked my guy friend to say out the sentence while I mimic and do the facial expressions because if I were to put my voice, it does not look appropriate. I animate it with the help of the video reference and my friend's voice. Convert the video to .wav and import it to Maya. After getting used to Boris, it was easier to do this exercise.


Exercise 2a:
Cluster and Blend Shape Deformers



My progress of the activity done.

Firstly, I have to duplicate the baseFace. This is because I have to create a 'Smiling Face' so that I can see the difference with the actual face.


After duplicating, I clicked on vertex and highlight all around the mouth area, except for the mouth. As you can see, there are some dots under the chin, I have to remove all the dots and make sure that only the mouth area was being highlighted.


To create a smile, I have to create a cluster for the highlighted area and move it up a little. It does not look as smooth as I wanted so to make it smooth, I have to use the Paint Cluster Weights Tool.
Before
After (The mouth is being lift up a little.)
I have to create Blend Shape to control the smile.


Finally I had to create duplicate another face and create a raised brows which is on the left side. The methods are the same.



Exercise 2b:
Different Expression- Shock


My Progress of the task done.

I followed the steps that was given and create my own that is the 'shocked face'. Instead of highlighting the whole mouth, I only highlighted the lower jaw so that it can open. As for the rest of it, I followed the tutorial.


Exercise 3:
Questions
and Answers


Answer these questions on your weblog.

1. Does a blend shape require the base mesh and the target mesh to have the same number of vertices? Explain your answer,with reference to how blend shapes actually work.

Answer:
Yes,blend shape requires them to have the same vertex order. Its essential to create a model that represents the end of the sequence first and then derive all the in-between targets form the final model. This way, when you create the blend shape sequence, the deformation behaves as you would expected, and the geometry is not mangled or distorted during animation.

Reference:
http://books.google.com.sg/books?id=tk-OKdoqKVcC&pg=PA329&lpg=PA329&dq=Does+a+blend+shape+require+the+base+mesh+and+the+target+mesh+to+have+the+same+number+of+vertices&source=bl&ots=fihUyNdL4z&sig=NTuARUecW42S4SjeTSuXyH03rC8&hl=en&sa=X&ei=EMgPT4mKNorNrQebtPmDAg&ved=0CCEQ6AEwAA#v=onepage&q&f=false

2. Can blendshapes only be used for facial animation? If not, prove it! Animate something and post it on your blog.

Answer:
No, it is able to create certain types of animation. Blend shapes can also be used on muscles or any other part of the body. I can also be used on any other shapes or objects.







3. If you want a character to look angry, you might decide to create a target mesh of the character's head and then modify it to have an angry expression. This is NOT how it should be done. Why not? And what would be a better approach? (Hint: You want to give the animator as much freedom as possible.)

Answer:
It should not be done in that way because animator does not have the freedom to animate different expressions and will be stuck on one that is the angry expression.