Tuesday 7 January 2014

Project Details

Introduction

     The following animation is split into two parts - a solar system animation and a space battle featuring Star Wars X-Wings and Tie-Fighters. It was made using Blender animation software. The animation is played to the song "Protectors of the Earth" by the group Two Steps From Hell. During the animation, the camera takes the view on a simulation of the solar system, showing planets rotating on their own axis as well as around the sun from a variety of different angles. Then, the animation transitions to a squadron of X-Wing fighters. A nearby Star Destroyer sends a fleet of Tie Fighters to intercept the rebels, leading to a skirmish. The X-Wing fighters branch off in different directions to engage the Tie fighters individually, allowing them to destroy the Tie fighters with their superior agility and speed. The X-Wing fighters then escape to safety.

Models

     All models in the solar system were made from scratch. The X-Wing, Tie Fighter, and Star Destroyer models all used assets from blendswap.com (specifically, X-Wing: http://www.blendswap.com/blends/view/50244 by PixelOz, Tie Fighter: http://www.blendswap.com/blends/view/4727 by benjob, and Star Destroyer: http://www.blendswap.com/blends/view/63155 by Vitushka).

     The solar system began with the sun located at the origin. The sun was scaled to take up a large amount of the scene with a radius of 30 units, and rotates around the Z axis once every fifty frames. The sun was not made to scale with the rest of the solar system, as the scene would need to be much larger than it was. For example, with the Sun's radius at 30 units in blender, Pluto would need to be placed at over 186 million units away. Since this was not feasible, the distance of planets to the Sun was greatly reduced, and the size of the sun compared to all planets was also reduced.  The next model that was added was the Earth, as a sphere object. The Earth was located 120 units away from the origin, and was used as a basis for calculating the size of all other planets, with a radius of 1 unit in Blender. Using the Earth as the basis for sizing all other planets enabled more accurate representations of the size of planets in real life. By setting the orbit of the Earth to once every 365 frames, calculating the orbits of all other planets was able to be easily calculated as well. The next models to be added to the scene were added in order of distance from the sun. Mercury (distance = 100 units from origin, radius = 0.38 units), Venus (d = 110, r = 0.95), Mars (d = 130, r = 0.53), Jupiter (d = 183, r = 11.22), Saturn (d = 260, r = 9.14), Uranus (d = 310, r = 3.684), Neptune (d = 335, r = 3.567), and finally Pluto (d = 350, r = 0.20).

     In the space battle, the lasers shot from the X-Wings were simply cylinder objects that were scaled to be very thin, and long. The cylinders were coloured a solid red. As the four lasers from each barrel converge, they marge to form one larger laser that descends on their target.

Lighting

     The lighting for the solar system contains two different aspects. Located at the origin, there is a source of light in the form of a "point" in Blender. The point light was chosen because it offers a 360 degree source of constant light, as opposed to other light types where they face a certain direction and only light single beams of light. The second light source was the environmental lighting, which is a constant source of light that brightens the whole scene. The environmental lighting was made to be very faint, so that the half of a planet that is not facing towards the sun does not become completely invisible in the background. Instead, the outline and minute details of the textures are barely visible. Stars were added to the background, but have no influence on the lighting of the scene.

     The lighting for the star battle consisted of a single sun lamp. This enabled the whole scene to be lit from a constant angle. The use of a sun lamp was effective at illuminating all the objects from the user's perspective. The sun lamp was positioned at the camera, facing the direction of the camera. Throughout the animation, the source of the light remained at the same position. 

Animation

     The solar system animation consists of planets rotating on their own axis while orbiting a central point, with a variety of different and interesting camera angles which change along with the music. In order to rotate the planets on their own axis, a rotation key frame was inserted at the very first frame, with a second rotation key frame inserted after a certain amount of frames had passed (For example, the Earth rotates once every 35 frames) with a rotation on the Z axis of 360 degrees. Unfortunately, Blender's default rotation animation includes acceleration towards the middle of the rotation, then deceleration before the end. When repeated, this causes a planet's rotation to speed up, then slow to a stop, then speed up again. To get a constant speed of rotation, a linear interpolation method needed to be added, and then a cyclic effect in order to repeat the animation indefinitely. In order to get the planets to rotate around the sun, and rotate around the sun at different speeds, I implemented a trick using empty objects. For every planet, a empty circle was added at the origin. The empty circle object was then animated to rotate on it's z-axis at certain speeds in relation to the orbit of the Earth. Next, the empty circle object for each planet was promoted to the planet's parents, meaning that the attributes of the rotation became reflected on the planet. The trick was taken from the following tutorial, where a moon object rotates around an Earth object: http://www.youtube.com/watch?v=_BfeY7ZqlO4

     Four different camera objects were used. The first camera simply mimicked a dolly shot, where the camera travels forwards in a straight line. At the beginning of the animation, the planets are all aligned. The camera's speed as it moves forwards is fast enough to keep pace with the music, but slow enough to ensure that the planets with slower orbits have enough time to get out of the way before the camera moves by. The second camera is located five units away from the Earth at all times, and it's parents is the empty circle object associated to the Earth, which makes the camera appear to follow the planet. A panning effect was also used, which makes the camera turn from the initial position (facing the Sun) to a final position, where the Earth is on the left portion of the screen and Jupiter and Mars can be seen on the other side. The third camera is a stationary camera located a certain distance from the sun, which pans from left to right, capturing all eight planets and Pluto all orbiting the Sun. The final camera is similar to the first one, in which a dolly shot was utilized. This time, the camera faces the Sun, and travels upwards along the z-axis, capturing the planets and their orbit from above. The camera comes to rest when all planets are visible, and holds the same position until a transition to the space battle occurs.

     In the space battle part of the animation, Blender's key frames were used to animate the space ship models movement. Specifically, Location, Rotation, and Scaling key frames were all used within the animation.
               
     In the scene where the x wing and tie fighters split off in different directions, Blender's graph editor was used to create a smooth transition throughout the frames of animation. This makes the space ships flying off at different angles look natural and not jittery.
               
     For the laser beam fire from the x wings hitting the tie fighters, the lasers had their scales set to zero to be invisible. These objects stayed in a set location until the correct frame had been reached in the animation. This point was just an x wing approached the lasers at which point the laser beams had their scales set to non-zero values to appear to be fired from the x wing. They then moved towards the tie fighters as well as having each beam fired move towards a central point simulating how the x wing fighters fire their lasers in the movies.

     Once the lasers hit the tie fighter, the scaling of them was set back to zero to render them invisible. When the tie fighter was hit by the lasers, Blender's quick explode effect was used to explode the tie fighter into multiple pieces. Under the particle effects for the explosion, the gravity was set to zero so that all of the pieces fly off in different directions in order to simulate having no gravity in space.


     Key frames were also used on the camera to pan the camera across the field of view in a scene or to move the camera itself. Effects shown were having the camera panning from right to left to show the whole model of the star destroyer with the tie fighters flying from it, having the camera move along with the x-wings as they first encounter the tie fighters, and in the final scene having the camera pan from right to left as the x wings flew away in the ending.

Video


Sources

Textures:

Models: 

Tutorials:

"Protectors of the Earth" - Two Steps From Hell: http://www.youtube.com/watch?v=ASj81daun5Q

No comments:

Post a Comment