Game Development Community

Suspention animation problems (milkshape user)

by TrapHouseGaming · in Torque Game Engine · 03/16/2014 (9:15 pm) · 7 replies

ok, im a long time milkshape user and brand new to the garage games forum :P but i have a question for you about exporting animations in Torque DTS plus exporter, I'll export my vehicle suspension animations and everything looks good in milkshape, ill export and enable blend transform,

FIXED:
[[everything should be fine but then when i use the vehicle in game the animations for suspension i have just made kind of build off of each other in a way, i don't know how to really explain it but say i have a joint that moves up 4 units for one spring... if i have 4 spring animations on my car that same joint will have moved up 16 units in game... how can i fix this?]]

Still having issues with hub and wheel alignment in game... vvv see my post below rex's for more vvv

About the author

long time torque player, decent at scripting and modeling, no good at textures, I primarily work with milkshape and blender. Follow progress on my shitty lil game: https://discord.gg/qsXb9CG


#1
03/17/2014 (5:15 am)
You need an animation for each 'spring'(wheel system) you have in the vehicle. Each animation should have ONLY the 'spring' you need moving in the sequence. Each sequence should consist of the extreme UP and extreme DOWN position(Keyframe) of the spring with the 'middle' of the sequence being at the 'default' position. So, I would have each sequence be 3 keyframes long. Frame 1 would be the UP extreme, Frame 2 would be the 'at rest' position, and Frame 3 would be the extreme DOWN position. Export them as a 'blend' type sequence and use the middle frame as the Frame Reference or have the 'at rest' keyframe of the default construction pose. I hope this makes some sense....

Vehicles have other animation sequences they can run, steering, braking, etc....check the object's Class in the Documentation for the full listing of what the object is capable of in the way of art.
#2
03/17/2014 (3:10 pm)
this makes complete sence, i guess the only thing i wasn't doing here is adding the middle at rest frame...

here is my current animation setup, note the hub node located just to the left of the red brake pads should hold the tire there while in game...

http://i889.photobucket.com/albums/ac97/alextaitt/Capture_zps939c3485.png

but what i was really asking is, why are my animations misaligned like this: http://i889.photobucket.com/albums/ac97/alextaitt/Blockland_00415_zps93d7eb0d.jpg

if i need to add a middle frame then i will but first i would like to know why the suspension is spawning in the compressed position and continuing the suspension animation up past compressed as if the compressed frame was the decompressed one, if you know what i mean.

also why the tire isn't spawning on the hub node, it is instead spawning where the suspension animation SHOULD start but isn't because the suspension is compressed upon vehicle spawn.
#3
03/17/2014 (5:25 pm)
Ah, it may appear as though your art is setup correctly; and here's the rub with 'vehciles'. The datablock values affect what the art will do. Mass, etc....all affect the vehicle. Vehicles take a lot of fine tuning...especially if your art is not scaled 1:1. If your art is scaled to 1 unit = 1 meter and your 'spring' animation moves the suspension, say .5 meters total, then the value for spring length in that datablock needs to match the art or you'll get odd results. Mass really affects vehicles and placement of the Center of Mass does as well. It can leave your vehicle embedded in the ground or dragging on the springs...as to why your nodes are not aligning....???

Again, vehicles take some tweaking to get operating 'properly'...keep at it.
#4
03/17/2014 (8:15 pm)
The car handles properly, I have used the jeep scripts as an example so far, but what you're saying about the springs might mean something here, lets say the hubs move 5 milkshape units up for the suspension animation (and they do) what might the spring datablock look like script wise for this? Would travel match the amounts of units moved in milkshape?
#5
03/18/2014 (7:05 am)
If your scale from Ms3d to DTS is 1:1[meaning you add NO scale factor upon export], the datablock value should match the art keyframe value. So, in your example, if the total length of the spring animation is 5 units, then the datablock value should match that. This, in my opinion, will give a better result at runtime.

My definition of 'properly' involves the mass, springs, the total of the vehicles, until it handles as I need it too. Tires are another matter entirely...lol. If they're too thin, too thick, yadda yadda, they don't work well, and so on. Vehicles involve 3 separate parts, the chassis, the springs, the tires! It definitely takes some tweaking to get all 3 functioning smoothly.

It might help to think of the art and datablocks like this: the art[geometry and animation] are only what you 'see' happening at runtime in the engine, they don't have really any effect on what the object 'does'. Steering is an example of this: you don't need a 'steering' animation, the vehicle will turn. This is due to the 'object' in code. If you want to see steeringwheel turning Left and Right as the vehicle 'turns' in code; you'll need a 'steering' animation.
#6
03/18/2014 (1:34 pm)
This gives me alot to consider :) I would have replied a few minutes after you posted that but garage games is blocked at school... On topic, do you think tuning it through unmess DTS would fix anything, I really have no idea what its for, I dld it awhile ago because I saw someone using it for a model in some old topic on these forums.
#7
03/18/2014 (1:51 pm)
huh jk, unmess did not work, it must be for somthing else, worth a try tho :P, would it help at all if i attached a save? or somthing?