Game Development Community

Spring animation on vehicles help needed (3dsmax6)

by Jason Luke · in Artist Corner · 08/30/2004 (10:07 pm) · 15 replies

Ok, ive been trying to get this working for a few days now on a test car and havent had much luck. The information ive been finding in the fourms has been a bit vague. Ive included the max files of one of our vehicles ready to export.

users.tpg.com.au/boblives/springtest.zip


what i want to know is :)

1) have the sequences and spring objects been keyed correctly

2) and what the hell im doing wrong :)

please feel free to Msn/email at jasonluke@netspace.net.au if you have a solution or any helpful hints

Jason

About the author

Recent Threads


#1
08/31/2004 (5:42 am)
Jason, Im cuious about this as well. Please post your findings if you have time.
#2
08/31/2004 (8:15 am)
First, your hub are ok :

hub0 hub1
[]....[]
..\.../
...***
...***
...***
../...\
[]....[]
hub2 hub 3

But you have inverted your 3rd wheel animation. Just move your keys from the 3rd wheel to the 4th, and vis-versa.

Second, your hubs and springs don't have keys assigned. What you've made is attach the hub to the anim. Detach them and let them in the root(like your springs and bounds in the hierarchy), and anim them at the same keys of your anim. For exemple : your 1st wheel anim is at frame 0 to 1. So assign keys to your hub0 at 0 and 1 ... and do the same for spring0, spring1, etc ...

That should help you going on the right track :). Cool model btw. Let me know if it's unclear.

Gilles Jr

[edited my cool graphic :). Seems it don't take spaces]
#3
09/03/2004 (5:45 pm)
Ok still no luck, Gilles.

Ive reordered the animations and keyed the hubs which i aniamted and spring# sequences as you suggested. one problem with what you suggested is that,putting the hubs at the root wont work, they arnt exported because there not in the hierarchy.

one question as well, does the tourqe demo which we a using to test this stuff use the spring animation or does it need to be activated in code ?

and if anyone has a working max file or any more hint's. just to let you know that ill setup my own religion devoted to you and worship you daily

Jason
#4
09/04/2004 (6:07 am)
Jason,

Oupss, sorry, I wrote it too fast. I didn't meant in the root with bounds, but root of the shape. Really sorry. I will take a better look of your model hierarchy today and prepare it for you to use as an exemple.

coming back later today ...
#5
09/04/2004 (7:15 am)
Sent you a mail with a max file. You'll see the hierarchy and anim. But the exporter crash max !? I do all my model in max5 so maybe someone that have succeed with the max6exporter could help you from here. I'll be interested to know what's different between max5 and 6 exporters also.
#6
09/04/2004 (10:21 pm)
*preps shrine*

Ok I was able to get the car exported, but alas the tiny torque deamons are still proding away with their little forks (they have good aim). car works fine but no spring animation *cry*. I've rared up all the dts's and the dump file from the vechicle. I'm hoping that one of the dev will be kind enough to have a look HINT HINT.

users.tpg.com.au/boblives/springfiles.rar

this contains the car and wheel dts's and texture file.

Gills, im asuming that this type of spring setup works for you in max5, and your own projects and in the demo ? I have a few versions of the exporter for max 6 . ill do a few more exports with them.

Jason
#7
09/04/2004 (11:18 pm)
Jason,

Yes this is how I set my vehicles. We have 16 vehicles in our games. But maybe your problem is with scripts of the vehicles (?).

I'm just about to go to sleep but tomorow, I will try your dts in my game to see if the anims are working.

Maybe take a look in the script to see if you are setting the anims :

Exemple of this is here :
torque\example\starter.racing\server\scripts\car.cs

You set your anims with this :
%obj.setWheelSpring(%i,DefaultCarSpring);
in function WheeledVehicleData::onAdd(%this,%obj)
-->DefaultCarSpring must have the same name as the datablock WheeledVehicleSpring(DefaultCarSpring)

PS: Your rar is corrupted
#8
09/04/2004 (11:55 pm)
Link updated with working file,

the .cs seems fine but ill post the section you mentioned here just to be sure

datablock WheeledVehicleSpring(DefaultCarSpring)
{
// Wheel suspension properties
length = 0.85; // Suspension travel
force = 3000; // Spring force
damping = 600; // Spring damping
antiSwayForce = 3; // Lateral anti-sway force
};

and

function WheeledVehicleData::onAdd(%this,%obj)
{
// Setup the car with some defaults tires & springs
for (%i = %obj.getWheelCount() - 1; %i >= 0; %i--) {
%obj.setWheelTire(%i,DefaultCarTire);
%obj.setWheelSpring(%i,DefaultCarSpring);
%obj.setWheelPowered(%i,false);
}

and once agian thank you for all the help Gilles

Jason
#9
09/12/2004 (3:01 pm)
Can anyone post a working file? Preferably max 5 as I have yet to find a stable max 6 exporter.
There doesn't seem to be much usefull information on this subject.... and I really need this done. I tried, but I don't get my spring animations to work ingame. An explanation of the setup would probably do, an example file would be a lot better, so i can actually take a look.

Btw, isn't the exporter documentation about this subject outdated? I mean vehicles needing steering and wheel animations? since when?
#10
09/12/2004 (4:08 pm)
Ward,

I found that my .cfg file was crashing the max6exporter. I just removed it from the dir and I can export the models exactly like max5.

As for a working model, I made Jason's one working and sent him back. If you have one, I can help you with it, but tomorow morning only. And I will try to do a little "easy to understand for the first time users" tutorial of all the nodes, springs, etc ... but I don't know when :)
#11
09/12/2004 (11:45 pm)
Ward , if you want i can send yout the max 6 version of the vehicle that gilles helped us with.

one question for you gilles is that recreating the sequeces has been a problem in many of our new cars, I wasnt able to key them corecttly. ?? Ive check you sequences over and over to see if ive done anything different but with no luck. luckly merging in the spring sequence dummys from the one you provided into the new files fixed the problems.

I examined the timeline key and repelcated them and I even tryed placing keys in the begining and end(in the curve editor) for each sequence (which I did not notice in the rig you sent). I just found this very strange, where the sequences keyed in max 5 or 6 ? It shouldnt make a diference but i just thought i would ask. as i said we are working around it and it's not a problem, it would just be nice to do it with out the merge.

Jason
#12
09/13/2004 (5:06 am)
Jason,

Maybe you are making your sequences ok, but forget to set the sequences options. For you model, select the sequence :
spring0
Then on the modify panel, you'll see options there. The way you did your animation of the springs you have to select the options like this :
GENERAL :
Cyclic sequence = OFF (unselected)
Complete cycle = OFF
Blend Sequence = OFF
Use frame rate = ON ( I put 100 here, 15 is original. Maybe 15 is ok, not sure)

EXPORT CONTROL :
Enable Transform animation, nothing else

Do it for all your springs sequences.

If that's what you did, well, I don't know. You could send me a model that you tryed to do that isn't working (without merging the sequences) so I can look what is missing and tell you.

I used MAX6 for your tsunami model.

Thanks for the offer to share your model to Ward so he can have a look at it. I'm busy doing an outro movie for our game so I appreciate.

Gilles Jr.
#13
09/13/2004 (3:07 pm)
Hey, Jason, if you could send that max 6 file that would be great. I'm sure I can figure it out once I see it... and if not, I guess I will have to bug Gilles with it (sorry ;) )

You can send it to ward at multimediaportfolio dot net
#14
09/13/2004 (6:31 pm)
Ward, no problem. If you have problems, just ask or send me your file to fix it and I'll try to explain what was the problem.

3 problem on 1 line, what a "poet" I am ! :)

Gilles Jr
#15
09/14/2004 (4:49 pm)
K, but I'll first see if I cant do it myself. No reason to bug you with it if it's just something simple I'm overlooking.

So, Jason, can you send me that file? Thanks in advance.