Wheeled Vehicle Update
by Tim Gift · in Torque Game Engine · 02/15/2002 (9:47 am) · 118 replies
Just moving this thread over from the news items as that was starting to get a little long.
I went ahead and changed the wheeled vehicle to use datablocks for both the tire and spring parameters. The datablocks are set dynamically for each wheel, so you can mix and match suspension and tires...
The tire datablocks also includes the tire shape, so the car body no longer includes the tires. Getting those to render correctly has been a pain in the butt, mainly because MilkShape mangles it's node transforms (and you can't edit them, etc. very annoying). This wasn't so much of a problem when the tires were in the shape, but now that I'm trying to attach them to the hubs, it's lame. Anyway, because I've been having trouble getting the node transforms in MilkShape oriented correctly, I decided to bag it and do all the animations in code. That means the new minimum requirements for a car body is that it contains the root position of the hubs, that's it.
I have it pretty much all working, but rendering the wheels as separate shapes, and the new datablocks has complicated the code a little. I'm going to take some time and do a little more cleanup and re-factoring before I check it all in.
On the animations... the suspension and steering animations are still there, and are still being run, but now have nothing to due with the physics at all, or the placement of the wheels. (You won't even need any animations to import a new car.) You will still be able to do suspension and turning animations though if you want, and the code will try to line them up. I'll put some suspension struts in the test car later and make sure that code is all working correctly :)
I'll post back on this thread when it's checked in... this will, of course, mean re-doing any current test shapes you have, but that's life on the edge :O
I went ahead and changed the wheeled vehicle to use datablocks for both the tire and spring parameters. The datablocks are set dynamically for each wheel, so you can mix and match suspension and tires...
The tire datablocks also includes the tire shape, so the car body no longer includes the tires. Getting those to render correctly has been a pain in the butt, mainly because MilkShape mangles it's node transforms (and you can't edit them, etc. very annoying). This wasn't so much of a problem when the tires were in the shape, but now that I'm trying to attach them to the hubs, it's lame. Anyway, because I've been having trouble getting the node transforms in MilkShape oriented correctly, I decided to bag it and do all the animations in code. That means the new minimum requirements for a car body is that it contains the root position of the hubs, that's it.
I have it pretty much all working, but rendering the wheels as separate shapes, and the new datablocks has complicated the code a little. I'm going to take some time and do a little more cleanup and re-factoring before I check it all in.
On the animations... the suspension and steering animations are still there, and are still being run, but now have nothing to due with the physics at all, or the placement of the wheels. (You won't even need any animations to import a new car.) You will still be able to do suspension and turning animations though if you want, and the code will try to line them up. I'll put some suspension struts in the test car later and make sure that code is all working correctly :)
I'll post back on this thread when it's checked in... this will, of course, mean re-doing any current test shapes you have, but that's life on the edge :O
#42
02/18/2002 (2:45 pm)
i'm still unable to get the latest version with the racing mod, can anyone post a guide of some sorts!
#43
02/18/2002 (2:47 pm)
So what's going on Hugo? You can't login? or it you just keep getting same tag? Can you email me the error your getting from CVS?
#44
CVS gives me headaches!Tim thanks, what seems to happen is when i go to admin and click login and put password it doesn't accept and gives me this
*****CVS exited normally with code 0*****
going to compile this sdk i dled. post news after!
02/18/2002 (3:01 pm)
i think that i sorted it out i created new folder then i did checkout module and put dev_stable and now it is dling something!hopefully it is the dev_stable with the racing mod on it!CVS gives me headaches!Tim thanks, what seems to happen is when i go to admin and click login and put password it doesn't accept and gives me this
*****CVS exited normally with code 0*****
going to compile this sdk i dled. post news after!
#45
@Hugo when you d/l the SDK for the 1st time or logging in with pword you are suppost to get "exiting with 0" that means there were no problems. But when you update it will say "exiting with 1" (don't know why, cause everything does get transfered) 0 and 1 are like true and false
02/18/2002 (3:11 pm)
@TIM I just d/l the latest version an I noticed that the wheels don't cast shadows anymore, that is to say they did when they were part of the vehicle.dts but as seperate objects, the only the body now cast shadow.@Hugo when you d/l the SDK for the 1st time or logging in with pword you are suppost to get "exiting with 0" that means there were no problems. But when you update it will say "exiting with 1" (don't know why, cause everything does get transfered) 0 and 1 are like true and false
#46
Hugo... that's good news it's working again, the bad news is that the racing mod is not in Dev_Stable, you have to do an update with no tag (or use the tag "HEAD"). When the update dialog pops up, make sure and set the two check boxes: "Reset any sticky date/tag/-k options" and "Create missing directroeis that exist in the repository".
02/18/2002 (3:12 pm)
Bruce, I checked in a fix for the skid/squeal sounds, but haven't tested it. Let me know if it works... and I fixed the spelling on it as well, so make sure your script file says squealSound = xxxx; (as opposed to squeelSound).Hugo... that's good news it's working again, the bad news is that the racing mod is not in Dev_Stable, you have to do an update with no tag (or use the tag "HEAD"). When the update dialog pops up, make sure and set the two check boxes: "Reset any sticky date/tag/-k options" and "Create missing directroeis that exist in the repository".
#47
Well trying to update it! thanks for that Tim!
02/18/2002 (3:19 pm)
that is where i was going wrong then, damm !Well trying to update it! thanks for that Tim!
#48
02/18/2002 (3:24 pm)
Anthony... the wheels are not casting shadows. They are not propery integrated with ShapeBase, which casts shadows, does fading, and shield effects, etc. I couldn't see any easy way to integrate the new tires into the existing structure, so I left them out for now. ShapeBase is not really setup to deal with sub-objects that want to render their own sub-shapes, it's going to take a little re-org to get that going.
#49
It downloads the head, then when i go and select torque folder and update selection i do what you said check those 2 options but when i click ok then nothing happens doesn't dl or update it!
02/18/2002 (3:33 pm)
Ok maybe it is just me but i cannot get it to dl the head version with the racing mod!It downloads the head, then when i go and select torque folder and update selection i do what you said check those 2 options but when i click ok then nothing happens doesn't dl or update it!
#50
The vehicles are great except for one thing. The braking.
In wheeled vehicles, the best part about them is the ability to "lock up" the wheels and slide. How difficult would it be to include a seperate "hand brake" key so that the driver could hit this and lock up the wheels as well as having the ability to brake gradually?
02/18/2002 (3:33 pm)
Tim,The vehicles are great except for one thing. The braking.
In wheeled vehicles, the best part about them is the ability to "lock up" the wheels and slide. How difficult would it be to include a seperate "hand brake" key so that the driver could hit this and lock up the wheels as well as having the ability to brake gradually?
#51
Thanks people!
02/18/2002 (3:42 pm)
finally after a few hours(well minutes) simple selling mistake -racing mod instead of -mod racing!Thanks people!
#52
02/18/2002 (4:48 pm)
The squeal sounds are working now Tim, I'll play with it as I am testing out the lap scripts, it's kind of suprizing how much the cars slide hehe.
#53
Should be up and available in the near future.
02/19/2002 (4:34 am)
I have submitted a code snippet of a race track with working gates without using triggers.Should be up and available in the near future.
#54
02/19/2002 (6:27 am)
is there any error checking when you are using the command line paramaters. I find alot of people are running into problems that could be solved by some verbose feedback.
#55
I haven't even bought Torque yet, but I've been trying to read all tutorials and informational threads/info posted. I have to say that given what I understand to be the current vehicle setup, having the wheels, suspension etc all be separate 'datablocks' (which I understand defines the physical properties necessary for a complex object like a 4-wheeled vehicle with suspension, and those properties are used in the engine to manipulate animations/generate animations for suspension and wheels and steering, etc) -- that seems to make sense.
Like some other people mentioned, having all of the peices use separate datablocks would allow you to swap around the components of a vehicle -- change tire sizes, tweak suspension or change suspension type, have bigger back wheels, etc.
Also, am I right in assuming that by separating the various components of a vehicle like this, we would be able to have damage effects/conditions on a 'per-wheel' basis? So you could shoot out or even blow off a tire? Or can't you dynamically change that kind of information? Heh, like the new Hummers that can inflate/deflate their tires on the fly. Still, even if we can't do this now because of other issues, you'd still need to split things up like this for it to be really workable anyways, right? Of course for all I know it might be possible already; like I said, I don't have Torque right now (I know it would devour my soul and right now my soul has a gig with SATAN aka my job).
02/20/2002 (10:25 am)
Very cool, guys.I haven't even bought Torque yet, but I've been trying to read all tutorials and informational threads/info posted. I have to say that given what I understand to be the current vehicle setup, having the wheels, suspension etc all be separate 'datablocks' (which I understand defines the physical properties necessary for a complex object like a 4-wheeled vehicle with suspension, and those properties are used in the engine to manipulate animations/generate animations for suspension and wheels and steering, etc) -- that seems to make sense.
Like some other people mentioned, having all of the peices use separate datablocks would allow you to swap around the components of a vehicle -- change tire sizes, tweak suspension or change suspension type, have bigger back wheels, etc.
Also, am I right in assuming that by separating the various components of a vehicle like this, we would be able to have damage effects/conditions on a 'per-wheel' basis? So you could shoot out or even blow off a tire? Or can't you dynamically change that kind of information? Heh, like the new Hummers that can inflate/deflate their tires on the fly. Still, even if we can't do this now because of other issues, you'd still need to split things up like this for it to be really workable anyways, right? Of course for all I know it might be possible already; like I said, I don't have Torque right now (I know it would devour my soul and right now my soul has a gig with SATAN aka my job).
#56
I have a simple checkpoint race set up and have posted it here
Readme included and if I missed anything to make it work let me know.
02/20/2002 (3:50 pm)
The leaning thing seems to be more pronounced in vehicles with higher center of gravity. Also when you apply throttle the nose of the vehicle dives and when you apply brakes it raises, also opposite of what it should be, If you want a copy of my test vehicle I can post it for download, It is much worse with it because the mass is higher over the wheels.I have a simple checkpoint race set up and have posted it here
Readme included and if I missed anything to make it work let me know.
#57
I've been having connection problems all day and CVS is acting up on me, so it may be a little while before I can check in the fix.
02/20/2002 (5:35 pm)
I have a fix for the leaning problem... something I overlooked when I was cleaning up all that code. All the wheel forces were being applied at the spring's anchor point. It's now been changed to apply the spring forces to the the spring's anchor point, and the tire forces to the wheel hub. This gives the expected behavior, though you won't see very much lean in the example car, but that's because it's center of gravity happens to line up almost exactly with the rest position of the wheel hubs. If you shift the center of gravity up, you'll notice a difference :)I've been having connection problems all day and CVS is acting up on me, so it may be a little while before I can check in the fix.
#58
02/20/2002 (5:42 pm)
Change/fix for the leaning issue has been checked in.
#59
I've posted my test car here wich seems to really lean heh.
Car and skin
I've tried adjusting forces.
Thanks,
Bruce
02/20/2002 (7:40 pm)
I just tried the fix and with my car it still acts odd, leaning into turns and instead of lifting the front when you apply throttle it nose dives.I've posted my test car here wich seems to really lean heh.
Car and skin
I've tried adjusting forces.
Thanks,
Bruce
#60
02/21/2002 (8:34 am)
I'll check it out.
Torque 3D Owner Bruce Wallace