Author Topic: [TUTORIAL] Blender Vehicle Suspension Tutorial  (Read 2249 times)

With the exception of the tutorial zombiekillz made a while ago, I haven't really seen any suspension tutorials for making vehicles. As I just figured out how to make it work, I'm going to create one myself. I would like to credit zombiekillz for his tutorial, though - it was very useful in helping me solve my suspension issues.

I have divided this tutorial into six parts so you can find specific information more easily.

1] Modeling
2] Rigging
3] Animation Setup
4] Animating
5] Animation Arrangement
6] Exporting


NOTE: This tutorial is meant for Blender 2.49! DO NOT animate in a newer version and move the file to 2.49 for exporting - you will lose ALL animation data! You have been warned. Also, sorry that this isn't a tutorial for Milkshape, but I don't use it so I can't really instruct on it. However, I do know that the basic setup is the same, so you can still use a good portion of this tutorial and probably get it working in Milkshape too.

[1] Modeling - Set up your suspension system. Model in/position it in the decompressed (fully extended) state before you continue with animation. Make sure each of the four (or however many you have) suspension units are separate objects.

[2] Rigging - Rig the suspension. If you're here, you should already know how to do this. It's basically linking either a) bones to objects, or b) bones to vertex groups. If you use vertex groups, add an Armature modifier to each suspension unit, select your armature object, make sure VertGroups is selected, and select the appropriate vertex group. NOTE: If you use vertex groups, make sure each object ONLY has the vertex groups it uses. Also, make sure the vertex group has the name of the hub that it's paired to. This last part may not be necessary, but it might be.

[3] Animation Setup - Now for the hard part - animating. Go to the Action Editor window, and set your armature to pose mode. Create a new action. BEFORE YOU ANIMATE THE SUSPENSION, click on one of the bones that isn't being animated, such as a mount point. Select it, and on frame one, add a position keyframe. On frame two, do the same, without moving the mount point. Name this animation whatever - it isn't used.

[4] Animating - Next, create a new action. Deselect all bones, and then select you first hub (hub0). Starting on frame four, place a location keyframe for the hub at its highest point. On frame six, make another keyframe for the lowest point. Do this for all bones that go to hub0's suspension. Since the suspension starts in the lower position, it may be easiest to do this part backward. Name this animation spring0. The important info is this, however: one frame gap between animations, animation (at least) three frames long, animation goes from high -> low, name animation springX, where X is the hub number. So your next animation (new action!) should start on frame eight if the previous one ended on frame six. Make sure that you're only animating the bones that correspond to the current hub you're working on for any given animation.

[5] Animation Arrangement - Once you're all done creating actions (dummy and hub0 - hubX), go to the NLA Editor. Click Strip on the bottom panel, and select the dummy animation. Do this for all the other animations, in order. If you animated on the correct frames, they should arrange themselves in a stair step pattern automatically, one frame in-between each. If not (and they're all stacked on one another), you'll have to do this part yourself. Grab all but the first strip with the B selection tool (hit B on your keyboard), then hit G and type however many spaces you need it to move. In this case, three frames, since the dummy animation is first and we want a frame in between each animation (although having between-frames is not required for the dummy animation). The select all but the first and second strip, hit G, and type the number four (hit 4). Since the rest of the animations are three frames long, we need to move them four frames. Do this until the strips are all stair stepped, with a frame between each. If you have a steering animation, do the same, but put it either last or before ALL of the spring animations - not in between. However, it still needs to be behind the dummy.

This is what it should look like. Don't worry about the vertical order in this image - it's the horizontal order that matters. (You can have any number of "dummy animation" frames before the first real animation, as long as it is at least one frame. As you can see here, my dummy animation is only one frame offset, not three like I said in the text. Either should work fine.)


[6] Exporting - Final step - exporting! Before you do this, though, make sure that, between each animation (on the blank frames we left between each animation) the vehicle is in its "default" or "rest" position. In other words, how it will look when it spawns (steering wheel straight, all suspension down). If this is not the case, go over the steps to see if you missed anything. If it is all good (and most importantly, it is in the rest position on the frame after the dummy animation), you are ready to export. On the sequence panel of your exporter, add all your animations via Create from Action Strips. Set each to export/non-cyclic/non-dsq. Turn on blend for all animations except for the dummy one. Set the reference frame to the frame BEFORE the corresponding frame starts (remember this blank frames I had you set?). So, for his hub0, which starts on frame four would have a reference frame of three. Once you have your other export setting set up, you're ready to export! The only thing left to do is match the suspension length in the script to the length of the travel.

Here's what one of the spring animations looks like ready to export. Note that the ref frame (5) is the empty frame before the spring0 animation (frame 5 is at the second dark vertical line in the first picture). For each animation, the ref frame should be the empty frame before the corresponding animation.


I hope this is helpful to people in the future. If this could either be added to the big list of tutorials or pinned, that would be great - I know many people have had this question, but there is very little documentation on suspension for the Torque engine.
« Last Edit: May 21, 2015, 10:57:21 PM by BluetoothBoy »

This is a very helpful tutorial! Is it possible you can also add some pictures of these steps being done throughout the tutorial in case some people don't understand?

This is a very helpful tutorial! Is it possible you can also add some pictures of these steps being done throughout the tutorial in case some people don't understand?
Yes, I was planning to later. :)

Omg! I can try make Fury have Suspension model with this tutorial someday :o

Added some pictures for clarification.