Vehicle Animation Tutorials?
by James Abraham · in Artist Corner · 05/19/2004 (2:11 pm) · 9 replies
Hi,
I'm new to the Torque engine, and frankly, I've never rigged a vehicle for animation in any real-time application.
I'm looking for hints, tip, tutorials, or just general guidance on how to go about doing this. I need to rig a motorcycle. The front wheel needs a left / right turn sequece, both wheels need a revolution sequence, and both wheels need an up / down sequence.
From what I understand, this vehicle needs to be comprised of a single mesh. So, I'm assuming I'll need to rig the mesh with some kind of bones setup. I'm familiar with setting up bones for characters but I'm a bit clueless on how to do this with vehicles. I anticipate lots of vertex weighting problems.
For example, to rig the wheels to spin, would I do something like the following?:
create a torus, define it as a bone, skin it so it only affects the wheel in question, then rotate the torus bone to make the wheel turn?
And while I'm on the subject,.. can animation be added AFTER the detail markers have been setup? Or will I have to create them again after I animate?
Any guidance will be greatly appreaciated.
Edit: I found a few would-be good tutorials here, but unfortunaelty they are all dead links. There are WAY too many dead links here. What a shame.
Jim
I'm new to the Torque engine, and frankly, I've never rigged a vehicle for animation in any real-time application.
I'm looking for hints, tip, tutorials, or just general guidance on how to go about doing this. I need to rig a motorcycle. The front wheel needs a left / right turn sequece, both wheels need a revolution sequence, and both wheels need an up / down sequence.
From what I understand, this vehicle needs to be comprised of a single mesh. So, I'm assuming I'll need to rig the mesh with some kind of bones setup. I'm familiar with setting up bones for characters but I'm a bit clueless on how to do this with vehicles. I anticipate lots of vertex weighting problems.
For example, to rig the wheels to spin, would I do something like the following?:
create a torus, define it as a bone, skin it so it only affects the wheel in question, then rotate the torus bone to make the wheel turn?
And while I'm on the subject,.. can animation be added AFTER the detail markers have been setup? Or will I have to create them again after I animate?
Any guidance will be greatly appreaciated.
Edit: I found a few would-be good tutorials here, but unfortunaelty they are all dead links. There are WAY too many dead links here. What a shame.
Jim
#2
That being said, there is no need to make a vehicle as a "skin" mesh. (A mesh that uses the skin modifier for animation). Especially since none of the max exporters I have tried are capable of properly exporting a skin mesh and a collision mesh into the same DTS.
You are not actually required to include any animations for the vehicles to work. the engine will go ahead and move the wheels up and down as is appropriate, it just won't animate any suspension nodes.
For each hubx node in your model that you want to have a suspension animation, create a springX sequence helper. In the helpers modifiers rollout it should be set to a non-cyclic, blend, transform animation. The First frame of the animation should have the hub and suspension all the way up in it's fully compressed state. The last frame should have the hub and suspension set to it's fully extended state. FOr most setups you will not need more then 2-3 frames per spring sequence, as the engine will interpolate a nice smooth animation. Also, once the key times for the animation are finished, reset the hub/suspensions positions back to the fully compressed state, ensuring that this additional frame of animation is not within the keytimes of any of the sequences.
For steering create a sequence named "steering", as a non-cyclic blend transform animation. The first frame should have the steering turned all the way to the right, the middle frame should have it centered and the last frame should have it runed fully to the left.
However please note that using the default torque code will make it very difficult to exactly, or even closely match the steering aniation to the actual turning of the wheels in-game. I posted a thread in the SDK forums with the code to fix this, and would highly recommend it for anyone planning on having disk rotors and suspension components that turn with the steering.
FInally if you wish you can have an animation for the breaklight. Name the sequence helper "brakeLight", using the same settings as the others. the first frame should have the light off, the last should be full breaking. You could use an IFL texture animation for this, or you could have a cover hiding the applied breake which you set to invisible to show it, you could even make some BillBoards for a T2 style muzzle flash effect when the breaks are applied.
Turn animations are no longer needed for the wheels, the engine handles the rotation itself.
I believe that is the complete list of vehicle animations currently supported by the default TGE.
06/04/2004 (1:57 pm)
Your vehicles can be comprised of any number of meshes, the only mesh limitation would be for the collision, since by default wheeled vehicles only support one collision mesh.That being said, there is no need to make a vehicle as a "skin" mesh. (A mesh that uses the skin modifier for animation). Especially since none of the max exporters I have tried are capable of properly exporting a skin mesh and a collision mesh into the same DTS.
You are not actually required to include any animations for the vehicles to work. the engine will go ahead and move the wheels up and down as is appropriate, it just won't animate any suspension nodes.
For each hubx node in your model that you want to have a suspension animation, create a springX sequence helper. In the helpers modifiers rollout it should be set to a non-cyclic, blend, transform animation. The First frame of the animation should have the hub and suspension all the way up in it's fully compressed state. The last frame should have the hub and suspension set to it's fully extended state. FOr most setups you will not need more then 2-3 frames per spring sequence, as the engine will interpolate a nice smooth animation. Also, once the key times for the animation are finished, reset the hub/suspensions positions back to the fully compressed state, ensuring that this additional frame of animation is not within the keytimes of any of the sequences.
For steering create a sequence named "steering", as a non-cyclic blend transform animation. The first frame should have the steering turned all the way to the right, the middle frame should have it centered and the last frame should have it runed fully to the left.
However please note that using the default torque code will make it very difficult to exactly, or even closely match the steering aniation to the actual turning of the wheels in-game. I posted a thread in the SDK forums with the code to fix this, and would highly recommend it for anyone planning on having disk rotors and suspension components that turn with the steering.
FInally if you wish you can have an animation for the breaklight. Name the sequence helper "brakeLight", using the same settings as the others. the first frame should have the light off, the last should be full breaking. You could use an IFL texture animation for this, or you could have a cover hiding the applied breake which you set to invisible to show it, you could even make some BillBoards for a T2 style muzzle flash effect when the breaks are applied.
Turn animations are no longer needed for the wheels, the engine handles the rotation itself.
I believe that is the complete list of vehicle animations currently supported by the default TGE.
#3
Thanks Martin. Very thorogh explaination. I'll need to pass this thread on to my programmer.
Jim
06/04/2004 (2:02 pm)
Thanks Jason. That article helped.Thanks Martin. Very thorogh explaination. I'll need to pass this thread on to my programmer.
Jim
#4
Thanks Martin. Very thorogh explaination. I'll need to pass this thread on to my programmer.
Jim
06/04/2004 (2:59 pm)
Thanks Jason. That article helped.Thanks Martin. Very thorogh explaination. I'll need to pass this thread on to my programmer.
Jim
#5
04/19/2005 (3:50 am)
Not that I know what I am talking about (as usual :-), but wouldn't it be sufficient to make the handles children of the front wheel in the DTS? ? Like in real life (tm): when the front wheel turns the handles follow, since they are connected directly?
#6
04/19/2005 (4:19 am)
So in your game the front wheel turns, but the handle doesn't?
#7
04/19/2005 (5:46 am)
Animate both the Handle bars and wheels moving at the same time.
#8
04/19/2005 (10:10 pm)
There's a great tutorial on getting Vehicle Shocks animated like the demo Buggy up at http://www.gamesextract.com
#9
07/10/2006 (8:42 am)
Can i have also vehicle animations for other vehicles such as flyers or hovercrafts?
Jason Luke
http://tork.beffy.de/
Jason