Game Development Community

Spring animations

by John Cooney · in Artist Corner · 01/01/2005 (11:41 pm) · 12 replies

To animate the suspension of a vehicle, do the hubs need to be parented to whatever is getting animated? Cause the only way for a hub to move with the mesh object, the root node of that group has to be animated, but then it eventually gets culled out in the .cfg file. So then no animation data gets exported. Thanks for any help.

#1
01/02/2005 (11:24 am)
Ah the joys of parent animation in gameSpace. :o) there are a few things you can do:

1.) animate the suspension parts and hub seperately but within the same sequence.

2.) group the hub suspension together. Then move the axes of the group to the point you want your rotation to be at and then add the name of the group to the always export list in the .cfg file. this will export the group (say you named it "LeftSuspension") as a node that is the parent of both the hub and suspension part. The problem you will run into is getting the hub to be oriented correctly so you might have to rotate the hub manually within the animation to correct for this.

3.) you can use bone to assist you, but dont make them skined meshes you can attach rigid objects together with bones and use them to help articulate the suspension. only issue you will run into is controlling what bones and nodes get exported.

Just remember that to Torque there is no real difference between a bone and a node. The only difference really is that one has vertex weights and the other does not. they are both just a location in 3d space with animated translation and rotation.

Every mesh object in the DTS file is attached to a node. For instance, if you exported an object named "WoodenBox" if you were to open the DTS file in the Torque ShowTool Pro and look in the nodes drop down list you would see that there was a node created called "WoodenBox". The mesh object for the shape is attached to this node and the nodes location is created where the axes of the object were located in gameSpace. This is how object animation works. No matter what you create in gameSpace the result is a mesh attached to a node and its the node that animates not the mesh. (its the opposite of what you might think and many people dont understand this)

Now say you have one mesh object in your DTS file named "WoodenBox" and you create a .cfg file and add the name of the mesh object to the NeverExport list. What happens is that the node "WoodenBox" is now no longer created and instead the mesh object is attached to the node of its parent. In this example since there are no other objects the mesh "WoodenBox" would be attached to transforms of the bounds. This give you some insight into what is actually going on under the hood.

There are a few other things you could do as well. CkGameFactory makes a plugin for gameSpace that adds constraints: ckgamefactory.hp.infoseek.co.jp/tsxe/truecons.html this lets you use "look at", "orient like", and "translate to" to make your suspension parts "aware" of where each other are so that they will animate automatically when you move the hub node. (constraints are what all of the pro 3d apps use to streamline animation setup)

Hope this helps...
#2
01/03/2005 (10:54 am)
Matt and all:
Have you used vcTek for animating vehicles? I saw that the trueConstraints plugin you mentioned above is only $15 and started looking at what else is available. The vcTek plugin is $20 and looks great for animating machinery/vehicles. It looks like we could get some really useful tools for just a little more cash.

edit: I should add that trueContraints looks like an easier to understand, more general tool.

thanks-
Paul
#3
01/03/2005 (1:31 pm)
Great explanation on bones/nodes, Matt; I was beginning to think there wasn't much difference between the two. So is it legal to use a bone as an attachment point[attachments+vert weight=OK?] Thanks for heads up on the plugins as well. I've seen the Vtek sight and blurb but didn't know if it was supported by gS...I've just started experimenting with Hierarchal/Group animations and IK linking with bones[which worked Super!], and your post here is a wealth of tidbits! I had no problems linking up a mech/bot in no time at all, and the joint locations were perfect! I've gotten pretty good at aligning my group/objects' axes for nice mechination, the awareness plugin would make for some really nice ones, :).
#4
02/08/2005 (9:20 am)
So is there documentation on how to properly rigid bind objects to bones as opposed to making them skinned meshes? Cause I've tried all 3 processes so far, and my hubs still aren't animating in Torque. Once I select my hub and bone, do I just apply the "Attach object to bone" command? Thanks
#5
02/08/2005 (11:42 am)
If you open the scene editor you can just drag the node onto the bone that you want to be its parent. Sometimes there is a bug where if the node is already in a group changing its parent will fail. You can get around this my moving the node back out to the scene root and then onto its target parent.

Do your nodes show up in Showtool Pro? If not make sure they are all listed in the AlwaysExport list in your .CFG file for your DTS shape.

The only issue with exporting objects using bones as parents is to the axes positions of objects is important. The location of the axes of an object is the point where the object rotates from. As such your animation may require that you adjust the location of one or all of your objects for animation to be exported properly.
#6
02/08/2005 (6:26 pm)
Does the vctek plug-ins work with Gamespace 1.6?
#7
02/09/2005 (1:29 pm)
Thanks I'll try that.
#8
02/17/2005 (9:16 pm)
Hmm, does the animation thread for the suspension need to be named anything special - like "spring" or "ski"? I've tried grouping each hub node to its own axle and then animating the axle and the bones method. I've also tried grouping hubs to bones.Things seem to work fine in the ShowTool but the axle won't follow the hubs spring physics once its loaded in Torque.
Any help would be appreciated.
#9
02/18/2005 (9:42 am)
suspension_prob.jpg
I don't know if the above image will post or not but its supposed to show my grouping setup with the suspension. For example, a hub node is grouped with an "_dummy" node. This group is subsequently parented to the axle mesh. Then I make an animation of the axle rotating and the hub node follows it, at least in the Show Tool. But when the car is loaded in Torque, the axle animates but the hub node isn't affected at all. Any advice? Thanks
#10
02/25/2005 (8:57 am)
* bump *
#11
02/28/2005 (10:26 am)
Hello Andrew, I just got back from vacation, I will take a look at your scene and get back to you.
#12
04/20/2005 (8:48 pm)
Anythiing new with this???