Wheeled Vehicle Nodes
by Jim Evans · in Artist Corner · 11/18/2005 (1:03 am) · 13 replies
Hi I was wondering if someone could help me with wheeled vehicle nodes...
I glanced over this, but didnt change any code, as I only have 4 wheels..
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5038
I created the following axle nodes
Front Axle "hub0" "front" "hub1"
Rear Axle "hub2" "rear" "hub3"
The camera ones I made are good, and I need to tinker with the mass because right now my truck rolls over quite easily, though it is kind of entertaining, I had it rolling sideways down a hill... (I guess I'll have to model the bottom of my vehicle too lol)
The problem I'm having, is that my axles are backwards... when I press forward my truck drives backward, when I steer, the back wheels turn... any help is appreciated, thanks.
I glanced over this, but didnt change any code, as I only have 4 wheels..
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5038
I created the following axle nodes
Front Axle "hub0" "front" "hub1"
Rear Axle "hub2" "rear" "hub3"
The camera ones I made are good, and I need to tinker with the mass because right now my truck rolls over quite easily, though it is kind of entertaining, I had it rolling sideways down a hill... (I guess I'll have to model the bottom of my vehicle too lol)
The problem I'm having, is that my axles are backwards... when I press forward my truck drives backward, when I steer, the back wheels turn... any help is appreciated, thanks.
About the author
#2
11/23/2005 (8:40 am)
It's tough to say without being able to see the shape, but my guess is that your pivots are pointing the wrong way. You're going to want all the pivots aligned so Y is pointing forward, X is pointing to the side, and Z is pointing up.
#3
From the driver perspective.
Driver front, hub0 passenger front hub1
driver rear hub3 passenger rear hub2
never had a issue like you describe, are you using the standard car.cs datablock?
11/23/2005 (9:08 am)
Everytime I setup a car it's a hair different than yours, the Hubs are in a clockwise fashonFrom the driver perspective.
Driver front, hub0 passenger front hub1
driver rear hub3 passenger rear hub2
never had a issue like you describe, are you using the standard car.cs datablock?
#4
11/23/2005 (7:09 pm)
David, do you mean that the wheels are rotated 90 degrees? If thats the case, same as Jim, I'd make sure the pivots are all properly aligned.
#5
11/23/2005 (8:52 pm)
No mine works fine, I was showing him that his hub setup isn't clockwise which is what is recommended.
#6
11/23/2005 (10:11 pm)
Ahh, I misunderstood. :)
#7
11/24/2005 (12:15 am)
Pivots? I guess I did make the wrong nodes, looking at the chapter in 3dgpaio it doesn't have the front and rear node, just the hubs... and I did put them in the wrong order... I redid it in milkshape and reexported it but I haven't had a chance to test it yet... I'm using the demo currently, tho I have the sdk, I just exported a top of buggy.dts to test my model in game
#8
As far as pivots go: every shape/bone/whatever in your scene has a pivot. Its how it aligns itself in 3d space. I say pivots because in 3ds Max you can move the pivot independently from the object. You may not be able to do that in Milkshape, in which case you should just be aligning the node itself correctly. Bottom line: y is forward, x is to the side, and z is up.
11/24/2005 (4:10 pm)
Exporting over the buggy works fine for testing vehicles.As far as pivots go: every shape/bone/whatever in your scene has a pivot. Its how it aligns itself in 3d space. I say pivots because in 3ds Max you can move the pivot independently from the object. You may not be able to do that in Milkshape, in which case you should just be aligning the node itself correctly. Bottom line: y is forward, x is to the side, and z is up.
#9
@Adam: those coordinates are the TGE's; the Milkshape environment's have the Y/Z reversed[Y=up/down[cyan],Z=front/back[magenta]], within the Viewports and the exporter compensensates for the finished DTS shape.
11/25/2005 (7:39 am)
Ms3d does not allow any transforms on the pivot; I 'believe' the world origin of the Scene is used as the pivot. Also, I 'believe' Ms3d doesn't recognize any other 'object' in the Scene as a separate object[merely separate shading/normals/whatever? 'grouping' of meshes], thus any separate meshes 'should/will' share the common origin at 0,0,0.@Adam: those coordinates are the TGE's; the Milkshape environment's have the Y/Z reversed[Y=up/down[cyan],Z=front/back[magenta]], within the Viewports and the exporter compensensates for the finished DTS shape.
#10
Thanks for the correction. I was under the impression that Maya was the only tool that had Y up/ Z in coordinates.
11/25/2005 (7:46 am)
@Rex Thanks for the correction. I was under the impression that Maya was the only tool that had Y up/ Z in coordinates.
#11
11/27/2005 (3:07 pm)
As covered in the resource at the beginning of this post, you can use a cheap trick in Milkshape of attaching a child bone to your hubs/mounts/bounds nodes and use it to orient it in a particular direction.
#12
Another very 'dirty' hack is to manipulate the Joint data as text that is described here. Definitely not a pretty way to do it, but discovering this taught me a bit about the Ms3d format and got the job done. I'm sure a clever coder here could put together a plugin that could help on the milkfarm...;).
It would be really nice to get a realtime feedback on the current Joint rotation...alas, the milkfarm shows it's basic features limitations...
...dang, keep substituting TDN code for this sites....:|.
11/29/2005 (6:51 am)
You can also use the Zero Joints plugin under Tools. It should take all the Joints in the Scene[even Parent/Child chains], and return them to Ms3d World Coordinates.Another very 'dirty' hack is to manipulate the Joint data as text that is described here. Definitely not a pretty way to do it, but discovering this taught me a bit about the Ms3d format and got the job done. I'm sure a clever coder here could put together a plugin that could help on the milkfarm...;).
It would be really nice to get a realtime feedback on the current Joint rotation...alas, the milkfarm shows it's basic features limitations...
...dang, keep substituting TDN code for this sites....:|.
#13
BraveTree Milkshape Plugins
These are *totally* unsupported. Use at your own risk.
11/30/2005 (5:22 pm)
Here are a couple of plugins I wrote while doing the port of the BT Car Pack to Milkshape. One of them will allow you to directly edit the rotation of a node. However, any further editing of the bones via Milkshape's bone widgets usually causes the changes you make to revert so it is only useful once you are done animating your shape and are ready to export.BraveTree Milkshape Plugins
These are *totally* unsupported. Use at your own risk.
Torque Owner Jim Evans