Sunday, May 30, 2010

Completed Animatic

I have now completed my animatic. It has been a very time consuming process over the course of the semester to get my animatic completed which was further compounded by my lack of previous animating experience. That said however I have learnt an incredible amount of skills over the course of the semester which has made it rewarding and worthwhile including:
  • Character Modelling
  • UV Mapping
  • Texturing
  • Rigging
  • Painting Weights
  • Keyframe animation
  • Importing animations into Unity
  • Unity Scripting
Overall although the visual quality of my animatic is not very good and there are some obvious rough spots I'm quite happy with it.

I think it is successful in telling the story of the dodo in a light hearted manner as I set out to. I believe the final scene also leaves viewers with a meaningful message regarding the role humans have played in the extinction of species throughout the course of history. A message which is especially important in this the international year of Biodiversity.

Technical

From a technical perspective I am really happy with how well I have managed to set the scenes of the animatic up in Unity. The animatic video was captured all in one take with no post editing. All sounds, subtitles etc. have been scripted in Unity. Also with the exception of scene three all scenes are scripted so that they play out without any user interaction. I found over the semester that it is very easy to setup a character and add a player character controller but it was time consuming to have to control the character while capturing video, as this would result in having to take multiple captures to get the characters movements just right. As the entire animatic is scripted to play out from start to finish I have also attached a web player version of the animatic which can be watched.

By setting up the animatic in Unity this way I believe next semester it will be much easier for me to make changes to assets to make them more visually appealing before just importing these assets into Unity to replace the old and then recapture the entire animatic again with just one take. I found by taking this approach I have also learnt a great deal about Unity and how to use it. I have created a number of scripts myself which control particular scenes which was very time consuming to work out but, a very good learning experiences once I overcame whatever difficulties I had encountered.

To see how each scene has been setup in Unity see these previous posts:
Visuals
The visual quality of the animatic is not as high as I would have liked it to been. This has been primarily due to the steep learning curve which has meant I haven't spent much time concentrating on getting aesthetics as good as I would like to have.

That said I am quite confident that I have now learnt all the skills required to complete my animation to a high visual quality, it's just of matter of putting the time in next semester to get my model, animations, and textures perfect.

As you can see from looking at the island which is textured in two different styles I have been experimenting with different texture styles to work out the over look and feel I wish to achieve. I also experimented with the Unity Toon shader but wasn't completely satisfied with the result so I will be relying on my own textures to produce a cartoon appearance. I will also need to build a few more toon styled assets such as palms trees to populate the island with.

Sound
Once aspect of the animatic that is missing is sound. I am happy with the music I have chosen but, plan to add sound effects to the final animatic. A list of intend sound effects for my final animation next semester are as follows:
  • Catapult firing sound.
  • General island ambient sounds.
  • Dodo 'squawking' sounds.
  • Crash sounds for when the dodo crash lands.
  • Tall ship ambient sound effects.
Viewing the Animatic
Download/watch my animatic video here:

And watch in the Unity Web player here (in scene three you need to walk to the dodo to the top of the hill and then down the slope to trigger scene change):



Saturday, May 29, 2010

Scene Five Completed

I have now finished scene five of my animatic. After all the experienced gained setting up my previous scenes this scene was relatively straight forward to setup.

The one problem I encountered is that when importing my ship's model into into the planes which I had used to create the sail had disappeared. I attempted to fix this by tweaking my FBX's exporting options in Maya before decided to script the planes and instead use a cube to create the sails. Once I did this the FBX exported first time.

In unity the ship is set up to follow waypoints and again I have used trigger to crossfade between camera's and signal the next level to load.

Next semester I hope to add more detail to my ship and give it a wake as is moves through the water.

Scene Six Complete

For scene six I have made a bit of a change to my original story board. Instead of showing a grave stone for the dodo I have chosen to show the dodo as a museum exhibit, as this is all we have left of this creature today.

I modeled a rough museum set in Maya for me to build upon next semester, imported it into Unity and setup a camera moving along waypoints to give the effect of zooming out. As background music in this scene I'm using Louis Armstrongs 'Wonderful World' with subtitles explaining that 75 years after the discovery of the dodo humans had completely wiped out this incredible species. Once the camera is fully zoomed out I intend to roll a credits overlay in the completed animation next semester.

I'm quite happy with the over all effect this scene has, hopefully it leaves viewers thinking about biodiversity and how humans have repeatedly made the same mistakes throughout history causing the extinction of hundreds of species which played a part it the ecosystems of earth.




Friday, May 28, 2010

Subtitles and Sound

As part of my goal of completing my animatic without using any post editing I have managed to put together a script for subtitle text and to play my chosen background music.

The script for subtitles uses a GUI Text object and changes the text at required times. Behind the text I have created a GUI Texture which provides a black background to the white text. When hiding and showing the subtitles I have used the iTween script available here: http://itween.pixelplacement.com/ to faded the GUI Text and GUI Texture out with this line:

iTween.fadeTo(subtitleholder,{"alpha":0, "onComplete":"destroy"});
This solution works well and I have applied it to multiple scenes in my animatic.

The second new script I have put in place controls the animatics background music. I thought adding music would be quite simple until I realised that when moving between scenes all audio sources would be removed and all sounds from the previous scene would stop which is not ideal for background music.

To correct this I managed to work out the following script which goes in the first scene. It sets up a singleton which is accessible through all scenes, and prevents my audio source from being removed between scenes loads.

//Create instance of class.
private static var instance:GameMusic;
//Create singleton instance.
public static function GetInstance() : GameMusic {
return instance;
}

function Awake() {
if (instance != null && instance != this) {
Destroy(this.gameObject);
return;
} else {
instance = this;
}
//prevent audio source from being removed between scene loads.
DontDestroyOnLoad(this.gameObject);
}
In subsequent scenes I then load new background music by removing the object the above script is attached to and add it again with a different audio source.

Being able to do subtitles and sound within Unity should make it possible for me to capture the entire scene in real-time with not post editing.

Thursday, May 27, 2010

Scene Five Progress

Scene five shows the arrival of humans on the island of Mauritius. To do this I am showing a tall ship arriving at the island. I spent tonight modelling and texturing the ship.

Modelling and especially UV mapping the ship were much easier now that I have had much more experience with these process's.

The screen capture below shows the ships in it's completed state for the animatic.


Monday, May 24, 2010

Scene Four Complete

I have now finished scene four. This is a skit of a dodo trying to fly by launching itself in a catapult. It fly's over a group of other dodo's lying in deck chairs on the beach.

To complete this scene I modeled and animated a catapult and then wrote a quick script which waits 5 seconds from when the scene loads to fire the catapult and propel the dodo along a line of waypoints. There is also a trigger which the dodo passes through which switches camera.

Next semester I hope to add some splash effects for when the dodo lands in the water. Also I hope to add greater details to the dodo's lazy on the beach to show them with cocktails, beach umbrellas, and towels etc.

Saturday, May 22, 2010

Scene Three Progress

Scene three is progressing to well as I have run into a problem. As part of achieving my goal of having the entire animatic play out in unit with no post editing I have been using a waypoint script to control character movement.

This worked well for scene one and two but, in scene three I require my fat dodo to walk up a hill to attempt to fly by jumping off a cliff. The waypoint script is not appropriate for this as it only allows the character to go in straight paths from waypoint to waypoint. On uneven terrain the characters catches on dips and bumps and then starts bouncing around as its collider and rigid body hit the terrains collider.

If I remove the terrains collider then my character simply passes right through the bumps and dips in terrain.

I'm going to leave this scene for now while I think of a solution.

Update 30/05/2010
As I am beginning to run out of time to complete the animatic I have decided to just add a character controller to the dodo and have the user manually control it's movement. For the rest of the scene setup there are two triggers. The first of which switches the camera when the dodo gets to the top of the hill. The second loads the next scene.

The animation for the dodo trying to flying and roll down the hill is obvious quite rough. It will take a considerable amount of time next semester to get this just right.

Friday, May 21, 2010

Scene Two Complete

I have finished a very straight rough version of scene two which is a skit of a fat dodo trying to flying. I have just quick and roughly done the animation sequences in Maya and imported into Unity.

The sequences for in the Maya file for my fat dodo are:
Frames 1 - 50 - Lying on Ground/Idle
51 - 200 - Trying to Stand Up
201 - 260 run cycle
260 - 340 jumps into air and then crashes.

At this stages the animations are very rough. It will take quite a lot of time next semester to sit down and get these animations 100% perfect.

In putting together my second scene I also put together a script that fades out scene one and loads scene two. Fortunately this was much easier that I had thought. The code used to do this is:

LevelLoadFade.FadeAndLoadLevel("Scene2", Color.black, 3);


It turns out fading between cameras is more difficult than fading between levels!

This weekend I hope to get scene three and four completed.

Wednesday, May 19, 2010

Scene One: How it all works & changes.

Just thought I'd put a quick post in on how scene one is setup in Unity and discuss the scripts I have used.

Below is an image of the scenes setup:


The four big rectangles are my four triggers, and the red line shows the waypoints the dodo follows. There is also three cameras, camera one is a third person camera targeting the dodo, camera two has a script attached which caused it to look at the dodo as it flies, and finally a fixed camera which shows the dodo crashing.

My first trigger switches the view from camera one to camera two. The script it uses to do this is the cross-fade script mentioned in my last post which I have modified to work when OnTriggerEnter is fired as below.


var camera1 : Camera;
var camera2 : Camera;
var fadeTime = 2.0;
private var inProgress = false;
private var swap = false;
function OnTriggerEnter (collision : Collider)
{
DoFade();
}

function DoFade () {
if (inProgress) return;
inProgress = true;

swap = !swap;
yield ScreenWipe.use.CrossFade (swap? camera1 : camera2, swap? camera2 : camera1, fadeTime);

inProgress = false;
}


The second trigger switches the view from camera two back to camera one with the same script as above.

The third trigger switches the camera from camera one to camera three and changes the dodo's animation to the crash animation. This is done by modifying my crossfade camera's trigger script as above to have an extra variable which is a gameobject.

var animateobject: GameObject;


Once I attach this script to the trigger I can then set animateobject to the instance of my dodo. I can then use the following line to switch the animation my dodo is playing with this line in OnTriggerEnter:
animateobject.animation.CrossFade("crash");


My final trigger took me a considerable amount of time to figure out. Unfortunately once I attached a rigid body to my dodo so it would cause a trigger event when passing through triggers it would no longer stop when it ran out of waypoints. As a result my dodo would keep going beyond the last waypoint until it hit the volcano and then it would bounce all over the place. After alot of googling and trial and error I came up with the solution of removing the rigid body once my dodo hit the final trigger with the following very simple line:
Destroy (other.rigidbody);


This stops my dodo moving but plays out the last of the crash animation. This trigger also cause's a cube to fall out of a tree. This cube represents a fruit which I will model down the track which will fall on the dodo when it crashes in the tree. To trigger the fruit to fall the cube has a rigidbody attached with gravity turned off. My final triggers script has the variable:
var fruit: GameObject;


When the trigger even is fired I simple enable gravity on this rigid body which causes it to fall with this line:
fruit.rigidbody.useGravity = true;


Overall I'm happy with how the scene is setup although it is obviously rough. The only changes I am going to make are to tweak the camera angles and to remove the 3rd person camera and replace it with scripted camera's which move as desired around the dodo so I don't need to manually move the camera's when recording the scene. My ultimate goal is to have the scene scripted to play from start to finish without my input. This will make it nice and easy next semester for me to update models an recapture the entire movie.

Sunday, May 16, 2010

Scene Two Progress

I have made a good start on scene two of my animatic. I have boxed out all the animations required in my fat dodo's maya file and imported it as an FBX into Unity. I have learnt from my previous mistakes and getting much more used to the process of successfully getting models and animations successfully imported into Unity the first time everytime which is beginning to save me a lot of time.

So far in scene two I have three fat dodo's carrying out various animation sequences at the same time in this scene. All of these dodo's are instances of the same model, this will make it nice and easy for me to make changes to these models next semester without having to change multiple files. To make these dodo's more individualized next semester I will assign each one an individual texture.

I think in the scene two is the most difficult of the five scenes of my animation. Hopefully I will have it completed by next weekend which will leave me with a week and a half to complete my remaining three scenes. At the moment I'm very busy with other subjects so it's touch and go but, now I have learnt all the skills required to complete my animatic I'm confident I can get it completed in time.

Friday, May 14, 2010

Scene One Complete

I have now finished boxing out the first scene of my animatic in Unity. I'll add a video of it in action when I get home tonight.

I have found creating this scene a great confidence booster as I have been quite intimidated by this subject throughout the semester but, in completing this scene I think I have learnt all the skills required for me to completely box out my animatic for me to build on next semester.

To get this scene to work I have used quite a lot of scripting to get my character to move through the scene, and control camera's. I have done this so that the scene plays itself out without me having to control the character while capturing the scene. This means everything I record the scene everything will be exactly the same which hopefully means I'll be able to do everything in one take.

The first script I used is a third person camera controller I scripted for the first tutorial of semester. I slightly adjusted it though so that the camera is controlled by the mouse instead of keys as in the tutorial I submitted. This allows me to control the camera around my character as it flys around the island and zoom in and out.

The second script I have used is a slightly modified waypoint script from:
http://www.unifycommunity.com/wiki/index.php?title=SeekSteer

I had to modify this script to turn my character more realistically. When implementing the waypoint script as is I found that my characters would do a complete 360 everytime it hit a waypoint. I still would like to modify it further to make my flying dodo bank left and right when turning as at the moment he stays completely level. I will come back to this next semester after the animatic is complete.

The third a final script I have used is a camera switcher which cross fades between the two camera. I used this to switch between camera's as this will again allow me to capture the animatic all in one take and eliminate the amount of work I will need to do to put multiple captured videos together. It also means that when I make changes to the animatic I can view it from start to finish including camera fades etc without having to open a video editor and stitch different captures together and add fades etc manually. The camera in my first scene fades to a second camera when the character passes through a box collider which is placed at a particular waypoint.

The crossfade script can be found here:
http://www.unifycommunity.com/wiki/index.php?title=CrossFade

Now I have completed this scene I am confident that I have now developed all the skills required to complete my animatic and now its just a matter of putting in the hours to get through all five of my planned scenes. At this stage I have stopped modeling and texturing and am focusing purely on boxing out my scenes in Unity.


Download here (better quality):
http://chrisgordon.com.au/dodo/scene1.avi

Sunday, May 9, 2010

Walking and Jumping Dodo

This week I animated a walk cycle and jump animation for my fat dodo and imported it into Unity. Importing the new animation cycles was completely straightforward. To start with every time I imported my Dodo as an FBX file unity would only import the Dodo's eyes, the bodies geometry was nowhere to be seen. I then tried importing the geometry as a Maya file directly which also had the same result.

After some messing around in Maya, and some heavy Googling I deleted all Maya history and re-imported my model into Unity successfully.

I have setup the animation sequences in Unity and attached a character controller to the model with a script to control the Dodo's movement and allow it to jump. This was incredibly easy to do which I found quite surprising. To learn how to do this I used Unity's documentation and a visit or two to the forums. I found Unity's documentation extremely detailed but, hard to find answers to specific questions as most documentation takes the form of complete tutorials.

You can walk around my Island set with my fat Dodo here, standard FPS controls apply (space to jump):

Friday, May 7, 2010

Normal Maps Part 2 and Creating Realistic Feathers

After speaking to Paul in the tutorial he suggested using Blender's normal mapping tools, or Crazy Bump as they are much better than Maya's. I will give Blender ago later in the week.

Over the last few days while attempting to normal map my models I have also been considering other way's to give my characters the appearance of feathers/fluff. After some research I found this video which shows the results of using the MZFeather plugin which looks perfect for the overall effect I would like to acheive:



I was unable to locate the actual plugins itself though after some pretty heavy googling. Fortunately Paul managed to find it at:

Unfortunately the author of this plugin is selling it for 160 Euros which is to expensive for my budget/if could afford it is a little steep for what it is. I have emailed the author to ask whether I can use this plugin for a lesser price as a one off for this assignment.


Monday, May 3, 2010

Normal Mapping Difficulties

Although I have tried following the transfer maps tutorial mentioned in the previous post I have been unable to have much success.

As a test I simply extruded a couple of polygons on my fat dodo's chest so the create smooth bumps on his chest. As per the tutorial I duplicated my geometry, made my changes to the high quality mesh and then used transfer maps to create a normal map of the high quality mesh and apply it to the low quality mesh. This did work and a normal map has been created but as you can see in the images below the results are not desirable.

It looks like Maya has triangulated the high quality mesh and then created the normal map to apply to the low poly model which has result in lots of triangular impression on the model. Aside from the this the bumps I created as a test haven't appear properly either. I will talk to Paul about this in the tutorial tomorrow and see if he can point me in the right direction.

Sunday, May 2, 2010

Animated Rigged Dodo's Everywhere

This weekend I finally got around to rigging my winged Dodo. This took quite alot more time than I was anticipating as it wouldn't import into Unity properly. After alot of fiddling about googling, and frustration I found a forum post that recommended clearing out Maya's history before importing anything into unity. Turns out that worked a treat. Follow link below to see a quick flight animation I put together.

http://www.chrisgordon.com.au/dodo/DodoRigTutorial/dodoriganimated.html


There's also another rigged and animated fat flightless dodo in the scene (look up) which I put together this week.

I'm going to now have a go at create a normal map for my fat dodo which I have been putting off because I don't really know where to begin. Fortunately I have found the following tutorial which I will have go at following: