Animation 101 The Basics of Animation Lesson Nine Animation Rig for an Aircraft What to Expect: You will learn how: 1. to put skelegons into a model 2. to convert skelegons to bones 3. to assign weight maps to bones 4. to add a modifier to the Movement Options 5. to use nulls to move different parts. What You Will Need 1) Lightwave 2) An aircraft model Introduction I will be using a P51 Mustang model which was included with Lightwave; it was originally a v5.6 model. This model comes as 40 separate models. Lightwave 5.6 Layout could not load models created in layers, so to have moving parts in a scene, you saved each moving part as a separate object, loaded them in, parented them and away you went. So the first thing I need to do is load the parts and assemble them into a single object file. Note: this is a simple animation rig as this is a simple model. More complicated models require more sophisticated rigs beyond the scope of this tutorial. This is meant to act as a starting point for the beginner animator. Preparing the Model Initially, I will put parts into separate layers to make it easy to select them. Layer 1 will be the main fuselage. 1. 2. 3. 4. Put the rudder into layer 2. Select all of the polygons. Click the Map tab and click New Weight Map. Call the map Rudder. 5. Click OK. 6. If you set your view window to Weight Shade, you will see the rudder coloured red, provided you have the rudder map selected in the bottom right corner. 7. Note: you can create a new weight map by clicking the W at the bottom right corner then using the menu to select (new). 8. Click the Setup tab. 9. Click Create Skelegon button. 10. Drag out a skelegon in the side view window so that it runs along the leading edge of the rudder. 11. By selecting and moving the point at either end of the skelegon, adjust it until its centre line matches the angle of the edge of the rudder. 12. In Polygon mode click on the skelegon to select it. 13. Click Rename Skelegon and type in Rudder. If you give your skelegon the same name as the weight map, later in Layout when you convert the skelegon to a bone, it will automatically assign itself to the weight map of the same name. This will save you a couple of mouse clicks later. 14. Once more, select your rudder. 15. Click the View tab. Look for the Selection Sets menu and click Create Part. 16. Type in rudder and click OK. It's a good idea to start naming sections of your models as Parts. If you decide to show the plane getting hit and exploding, you will be able to apply a Dynamic which can cause the model to "blow apart" according to the Part names within the model. So, the rudder part would fly off separate to the fuselage part, etc. 17. Now you can cut and paste the rudder and its bone into the same layer as the fuselage. I do this for one simple reason: I prefer to have only one layer in the objects list in Layout per model if at all possible. Using bones and weight maps for your individual pieces allows you to put everything into one layer and still animate it properly. After all, if your mustang model has 20 layers and you have 10 mustangs in the scene, you end up with 200 object layers you need to manage, instead of 10. But if you choose to keep it all in separate layers, go for it. 18. Save the model. Repeat that procedure for the rudder trim tab. Name the Weight Map, Skelegon and Part "rudder trim". Part Name Weight Map Skelegon Name Completed Rudder Trim Tab Now you need to repeat this process with each and every moving part on the aircraft. I won't walk you through each piece as that would make the entire tutorial far too long. An aircraft is a complicated machine, compared to a car (which only spins its wheels and steers the front ones). You need to assign bones and weight maps to the ailerons, flaps, elevator, rudder, trim tabs, canopy, landing gear components, wheels and propeller. My bone list includes: 1. Rudder 2. Rudder Trim 3. Aileron Port 4. Aileron Trim Port 5. Aileron Stbd 6. Aileron Trim Stbd 7. Elevator 8. Elevator Trim Port 9. Elevator Trim Stbd 10. Flap Port 11. Flap Stbd 12. Canopy 13. Gear Door Port 14. Gear Door Stbd 15. Gear Port 16. Shock Port 17. Strut01 Port 18. Strut02 Port 19. Wheel Port 20. Gear Stbd 21. Shock Stbd 22. Strut01 Stbd 23. Strut02 Stbd 24. Wheel Stbd 25. Tail Door Port 26. Tail Door Stbd 27. Gear Tail Strut 28. Wheel Tail 29. Prop 30. Blade01 31. Blade02 32. Blade03 33. Blade04 Save the model. Hint: While it does not matter if the skelegons for the ailerons point inwards or outwards, have them point opposite to each other! When we go to create the IK rig in Layout, having these two bones pointing in opposite directions allows us to use a null to bank both at once, and the ailerons will move in opposition just as they should. This applies to any parts which are mirrored and rotate opposite to each other (such as gear doors etc.). Rigging the Model 1) Load the model into Layout. 2) Click the Setup tab. Under the Add menu click Cvt Skelegons. This will turn the skelegons into bones. You will see a message telling you how many bones were created. 3) Now save this as a scene. 4) Let's start with the easy part, the propeller. 1. switch to Bone mode: click Bones at the bottom or press SHIFT B. 2. use the menu at the bottom to select the propeller bone. 3. Click the X, Y, Z buttons (movement channels) at the bottom left corner so you do not accidentally move the bone later. 4. Press Y to switch to rotate mode and click the H and P buttons (rotation channels). 5. Press P for properties. Note that the bone already has the weight map with the same name assigned to it. Set the Weight Map options as seen in the above picture; Use Weight Map Only, uncheck the other two. 6. Go to frame 30 and create a key frame for the prop bone. Based on what I could find out from the Internet, the P51 prop had an RPM of 2250 at cruise. So, 2250 divided by 60 gives us 37.5 r/second. Multiply that by 360 degrees and we find that we need to spin this prop 13500 degrees per second. 7. At frame 30, change the prop bone bank to -13500 (your prop may need a positive number depending on which way your bone faces and which way the prop spins). 8. Click Graph Editor in the menu or press CTRL F2. Select the Bank channel. 9. Select the two key frames (right click and drag a selection box around them). 10. Set Post Behaviour to Linear -- this will cause the propeller to continue to spin at that RPM for the length of the animation. 11. Create a null called Null Prop Pitch. 12. Parent it to the P51. 13. I then moved mine into the prop, just to make a mental connection between it and the prop. 14. Turn off the X, Y, Z, H and P. 15. p) Next, select the first bone for the first blade. Parent it to the Prop bone. 16. Press P for Properties, then click the Rest Rotation button and note the degrees listed for B (Bank). 17. In the Motion Options panel (press M) use the Add Modifier menu and select Follower. Edit the properties of that modifier. 18. Item to Follow is Null Prop Pitch. Set all channels to None, except B which stays set to Bank. 19. Remember that Rest Rotation Bank we checked? Enter those degrees into the + box beside the B channel; in my case, 90. If you don't do this, the blade turns away from its rest position. 20. Repeat 4(p) to 4(t) for the other three blade bones. Now you can "feather" the blades by banking the Null Prop Pitch and spin it using the Prop bone. 5) Switch to Objects (SHIFT O). The plane should be selected as it's the only model in the scene. 1. Press M for Motion Options. 2. Check Unaffected by IK of Descendants. 6) Rigging the ailerons 1. Create a Null and name it Null Ailerons. Parent the null to the airplane. 2. Select the airplane object and switch to Bones. 3. Select one of the aileron bones. 4. Click the X, Y, Z, H and P buttons to turn those off. 5. Press P for Properties. It should have the weight map of the same name selected. Set the Weight Map options as shown below. 6. Press M for Motion Options. Use the Add Modifier drop down and choose Follower. Then click on Edit Properties. 7. Select Null Ailerons for Item to Follow, then set every option except Bank to None. 8. Repeat 4) to 7) for the other aileron bone. 9. Try changing the Bank on the Null Aileron and you should see your ailerons moving up and down; one up, one down. Now, those of you with sharp eyes will notice that the trim tabs are not moving with the ailerons. Easy enough to fix. 10. Select a trim tab bone and press M. 11. Parent this bone to the bone for the aileron on the same side. 12. Do the same for the trim tab on the other side. Now the trim tabs move with the ailerons. Note: you will animate the trim tabs (if at all) by manually key framing them. 7) Rigging the Elevator 1. Select the bones for the elevator trim tabs and parent them to the bone for the elevator. 2. Press P for Properties and set the weight map options for both trim tab bones. 3. Click on the X, Y, Z. H and P buttons for both of these bones. 4. Select the elevator bone. Click the X, Y, Z, H and P buttons for it. Set the weight map options. 5. Press M and click Unaffected by IK of Descendants. 6. Use Add Modifier and choose Follower. 7. Select Null Ailerons for Item to Follow. 8. Set every option to None. Set Bank to follow the Pitch. 9. If we now pitch the Null Ailerons we see the elevator pitch as well. But in the exact same direction. In a plane, you push the stick forward to dive and that lowers the elevator. To accomplish this, go back to the Motion Options and Edit Properties on the elevator bone Follower. In the Multiply By column, beside the Bank option, change that to -1. Now when you pitch the Null Ailerons forward, the elevator goes down and when you pitch it backwards, the elevator goes up; just like a flight stick. 10. Rename Null Ailerons to Null Stick (this will rename everything linked to it as well). We now have a virtual flight stick for our ailerons and elevator. 8) Rigging the Rudder 1. Select the rudder trim tab bone. Click the X, Y, Z, H and P buttons, set the weight map options and parent it to the rudder bone. 2. Select the rudder bone. Click the X, Y, Z, H and P buttons, set the weight map options and under Motion Options, click Unaffected by IK of Descendants. Note: if you are going to manually key frame the rudder you are done. If you wish, you can give it a Follower tied to the Null Stick, so when you change the heading on the stick, it changes the heading on the rudder. 9) Rigging the Flaps 1. Select each flap bone in turn. 2. Click the X, Y, Z, H and P buttons. 3. Set the weight map options. 4. Manually key frame the flaps. 10) Rigging the Canopy 1. I put a bone in my canopy to slide it back with. Select that bone. 2. Click the X, H, P and B buttons (you need to use the Y and Z to slide it back). 3. Set the weight map options. canopy closed canopy open 11) Rigging the Main Gear Doors 1. Create a null and name it Null Main Doors; parent it to the airplane and click the X, Y, Z, H and P buttons. 2. Select the first bone for the main gear doors, in my case gear door port. 3. Click the X, Y, Z, H and P buttons, set the weight map options. 4. Press M and Add Modifier Follower. 5. Edit Properties and choose Null Main Doors for Item to Follow. Set everything but Bank to None. 6. (You're saving frequently, right?) 7. Select the other gear door null and repeat 3) to 5) for it. Note: as mentioned earlier, these two bones should be pointing in opposite directions. 8. Now try changing the bank on your door null and you should see your main gear doors swing down. 12) Rigging the Main Gear In the case of this P51 model, the landing gear is very straight forward; it swings straight down and swings straight up. Modern fighter jets or other WW2 fighters have more complex gear which rotates and swings up. Same principle though, put in bones, assign weight maps, parent one bone to the other and animate. 1. Create a null and name it Null Main Gear, parent it to the plane, click the X, Y, Z, H and P buttons. 2. Select the port gear bone. (This bone points towards the fuselage so it is going to pitch instead of bank. You can try rotating your bone just to figure out which rotation channel you need to change.) 3. Click the X, Y, Z, H and B buttons, set the weight map options. 4. Under Motion Options, check Unaffected by Descendants, Add Modifier Follower and edit the properties as follows: 5. Switch to objects and try pitching your Null Main Gear; your port side gear should swing down. 6. Select the shock port bone, click the X, Y, Z, H, P and B buttons, set the weight map options. 7. Under motion options parent this bone to the port gear bone. This will move the shock into place. 8. Select the wheel port bone. Click the X, Y, Z, H and P buttons, set the weight map options and parent it to the shock port bone. You will animate the wheel rolling by key framing the Bank on the bone. 9. Repeat steps 2) to 8) for the starboard landing gear. The main gear deployed. 13) Rigging the Tail Gear Again, the model of the tail gear on this model is very simple; it consists of a strut and a wheel so it just swings up and down. 1. Create a null, call it Null Tail Doors and parent it to the airplane. (Yes, turn off all movement and rotation channels except for the Bank.) Note: you could control the tail doors with the main doors null, but on this aircraft the main gear doors don't open 90 degrees, but the tail wheel doors do, so I will use two separate nulls. 2. Select each tail door in turn, click off the movement channels, click off the H and P channels, set the weight map options; then Add Modifier Follower and set that so it only follows the B of the Null Tail Doors. You should get this when you bank your Null Tail Doors: 3. Select the bone for the tail wheel, turn off all channels but Bank, set weight map options and parent it to the bone for the tail strut. 4. Select the gear tail strut bone, click off all channels but Pitch, set the weight map options, add the Follower modifier and set it so the Pitch copies the Pitch of the Null Main Gear. There it is! All rigged up and ready to fly. As you can see from this, no matter what the part is designed to do, or how it moves, it can be handled by putting a bone into it, giving it a weight map and, if needed, telling it to follow the movement of a null object. Flap, aileron, rudder, gear, wheel, it does not matter; they all follow the same procedure. Assignment: Rig an aircraft model and create an animation showing the various parts moving.