As part of creating the story, a number of different assets needed to be created. To do this, we created an asset list for which we can track who is working on what and what stage they are on. I myself worked on creating the corridors, assets for the final evil ending room, a lab machine and one of the beakers.
I blogged about creating the corridors in a separate post which be found here.
The creation of the lab machine is my most complex model and animation utilizing a number of various techniques and tools to create a fluid animation and clean model. The model is also UVW Unwrapped to allow for custom created textures that suit the model.
To start, the arm rail and the arm itself was modelled so I had a rough idea of how big it would be as well as what I wanted to happen.
To create the rail, I first created a Spline using the Arc default then edited the spline to add straight lines at either end. To ensure the arc was smooth as well as the lines were straight, the snap settings were enabled with the snap points set to the grid points. Although editing the spline to add the straight lines worked, it created them with new vertices so to join them to the old ones, I used the Weld tool.
Once the splines were created, I then applied to Sweep modifier to it which is basically where a shape (or another spline) is extruded along the path. As I wanted to create a sort of grip railing that the arm base would run in, I used a default shape and adjusted the settings so it was in the position and orientation I wanted it (Flip along the XY axis).
To create the base of the arm that would run along the path, I can extract the general shape of the inside of the railing. For this, the Edit Poly modifier was applied to the railing then the edges on the side were selected and turned into a shape using the Create Shape tool. From there, I could edit the shape (which was basically a spline) to add the missing edge then apply the extrude modifier to give it thickness.
For the arm itself, it was created as a cylinder as a separate object which was then extruded multiple times. Around were the arm would bend, extra vertices and edges were added to prevent weird distortions when animated. This was repeated until there was one main bend and a bend at the end for where the fingers would be. The flat base on the end was created by using the Outline tool to expand it then the Slice tool was used to split the end into multiple faces. To ensure that the slice tool only affected the end, the end face was selected first.
The fingers were then created by extruding the faces out, moving their position outwards, then using the bevel tool to extrude and effectively scale the face at the same time.
The enclosure around the machine used mostly the box modelling technique to be made. However due to the unique shape of it, it did require a bit of manual work to get somethings how I wanted. For example, the entire front faces of the machine needed to be recreated as some was overlapping. To do so, I delete the face then using the edge selection mode, used the Bridge tool to then create faces across the selected edges.
I also used the Slice Plane tool to create extra edges, such as on the front for the slant, where required.
Materials and textures
The lab machine itself has two different UVW Unwrap modifiers applied to it, one on the main enclosure and the other on the arm. This was done so specific detail could be added to the model without stretching other materials. UV mapping itself is a fairly simple idea in that it matches up a specific point on the texture (the UV) with a vertex on the model. It then repeats this for every vertex until they are all mapped to a coordinate. The best example of seeing this is by looking at an OBJ file format where it pairs up UV co-ords with specific vertices.
To make the arm animated, a bone structure was created that followed the layout of the arm. The root bone was made a child of the arm base so that it would follow it when the base followed the path animation of it moving around. The bones in the fingers were set as the children of the bone in the hand.
To make the arm move in a more natural way as well as to reduce the workload of manually animating it’s position, an IK (Inverse Kinematics) solver was setup between the hand and the base of the arm. The idea of IK is that instead of the parent affecting the child, the child affects the parent instead. This is perfect for a limb style bone structure as it can make a somewhat natural looking animation. This solver in particular is a HI (History Independant) solver which means that the angles of bones are not restricted and each movement is recalculated as new. Compared to the other main one, HD (History Dependant) solver which is where the angles can be limited, it offers more freedom however some of the movement can be unrealistic.
However one issue I ran into with this method was that is was causing the hand bone to rotate to try and fit within the solver which I did not want. To solve this, I added an Orientation constraint to the base hand bone with the orientation target set as the world. This means it will always keep its rotation the exact same as the world which for my situation worked out perfectly. I could have used the LookAt constraint instead to look at the cylinder however it caused a few issues for me.
The arm base itself is animated via a path constrained animation. This means that the object will only move along a predefined path for the period of how long it is set to do. In this case, I can reuse the spline from when I made the railing for the path to save on a lot of time and reduce possible issues from minor differences.
As I wanted the path animation to not be a linear speed and instead adjust, I changed the animation curve on it from Linear to Bezier by right clicking the path constraint in the editor and applying the Bezier controller to it. This allowed me to slow the animation down at the start and end of its movement and create a more natural look.
Model File: Download
Evil Ending Room
There are numerous assets in the evil ending room, both 2D and 3D, to create the scene. I’ll be mostly focusing on the 3D assets and animations as the 2D assets were created in Unity itself with it’s UI system.
The lever itself is the main part of the room and clearly stands out compared to everything else in the room. The lever is animated so that it flips down when the player interacts with it and flipping all of them triggers then end scene.
The base of the lever is a box that then had the edges chamfered to created the slanted look. The texture on the base is also UV mapped using the box projection to reduce the stretching of the texture and make it look more natural.
To create the handle and bars, a cylinder was created then the end edges selected and the chamfer modifier applied. So that a rounded edge is created instead a flat, the chamfer type was changed to square, the tension reduced to 0.5 and the number of segments increased to 3 to give a smooth look. The bars were extruded from one of the cylinder until they reached the desired length.
The animation for the lever flipping down is a simple keyframed one. An initial keyframe is made of its starting position, then another keyframe is made a few frames later in its final position. However to create a more realistic animation, I adjusted the animation curve. This affects the “speed” of the animation so that the lever will move slower at the start as you pull it down then speed up once you would start pushing it down, creating a more realistic effect.
To adjust the curve, I opened the Curve Editor in 3DS Max then adjusted the Bezier handles connected at the first and last frame. This could have also been done in Unity using a similar process.