Game Development Community

Help please (file included)

by James Laker (BurNinG) · in Artist Corner · 11/30/2005 (4:43 am) · 13 replies

Be warned... Programmer art!!

I'm trying to test some bike physics. So I created this Offroad bike to test it with. When I use the DTS, it crashes. I've used both the normal and the Plus exporter.

It works in the Torque Show Tool Pro, but as soon as I change the buggy (dts) to the bike (dts) file it crashes on loading...

I also commented out this to get it to act like a bike:

// Steer front tires
   %obj.setWheelSteering(0,1);
//   %obj.setWheelSteering(1,1);

   // Only power the two rear wheels...
   %obj.setWheelPowered(1,true);
//   %obj.setWheelPowered(3,true);

Any help will be appreciated...

The files can foud here

It also seems to work as a static shape...
www.geocities.com/burningza/Image2.jpg
So I dunno what else to look for and need your help :-|

Using Milkshape 1.7.6 and TGE 1.4

#1
11/30/2005 (8:03 am)
The image link doesn't work to see it as a static shape. I downloaded your files and found a dirtbike.dts and a wheel.ms3d but no wheel.dts and the texture?? I exported your wheel as is[scale=.01] from Ms3d and when I mounted the wheel in ShowToolPro; the wheel was enormous compared to the bike shape.DTS and the wheels mounted 90 degrees from 'normal' for a bike shape.

I tweeked the UV's a bit, rotated it in the Scene to what I 'think' would produce a 'proper' wheel orientation and jizzled the scale to .03 and got somewhat 'normal' wheels mounted in the shape viewer, no crashing...

This leads me to believe that the crashing is due to your scripting and perhaps not the shape itself that is causing it; unless you exported your wheel at a 1:1 scale and then it would have been ULTRA huge and may have caused the crashing....seems a bit more information is needed to help any further.

from Milkshape3Dv1.7.4 & ShowToolProv1.0...I did not run this thru the engine as I had no vehicle/wheel scripting or spawn code.
#2
11/30/2005 (10:41 pm)
Thanx for info Rex.

I used the buggy wheel first to try it out with no luck. The picture i used as reference(background) in Milkshape was big so I scaled the body down to 0.03 when I exported.
#3
12/01/2005 (12:48 am)
Okay... I've added the correct bike wheel i want to use, and updated the zip file with my latest
changes to the bike... Still no luck... when changing my buggy to the bike it crashes...

Here's a picture.. but i placed all the objects(dts) as static shapes...
www.geocities.com/burningza/bikewheelhack.jpg
#4
12/01/2005 (1:30 am)
Okay...
I turned the bike around. Now it faces the same way as the buggy when opened in the Show Tool Pro.

I also changed my bikewheel to face the same way as the buggy's wheel as viewed in ShowToolPro. This is a strange one. The seems to be turned 90 degrees in the engine. Anyway I tested the wheels by replacing the buggywheels in the car.cs file and it works...
www.geocities.com/burningza/bikewheelsonbuggy.jpg
I've also updated the zip file for anyone who wishes to help me... or use the model.
#5
12/01/2005 (1:42 am)
Tried giving it more hubs so that there were four hubs like a car.... (hub0 to 3) but it stil crashes...
Okay, this sucks...
#6
12/01/2005 (5:10 am)
Okay... there seems to be a problem with the Plus exporter when using the dts as a vehicle...
It works when you use the stock milkshape exporter
#7
12/01/2005 (6:11 am)
Hehe... I dont really like talking to myself... But Hey... maybe oneday someone will come across this and find it usefull.

2 make a 2 wheeled vehicle (Bike) you need to add the second piece of this resource.

I finally got it working... There's no shock animation as the Plus exporter is giving me crap but it is in the file for one day when it gets fixed.

www.geocities.com/burningza/bikeonhill.jpg
It needs some fine tuning on the shocks/gyro, etc... but i will post my .cs when I'm happy.
#8
12/01/2005 (9:34 am)
May I ask?
What difference is shown in the ShowToolPro between the DTSPlus! exporter vehicle & the stock GG produced vehicle? That sounds very odd one shape working and the other not if they've both got the proper Nodes. I've made a 3-wheeled vehicle with DTSPlus! before and it worked fine; this was with an earlier version of Ms3d, but not too far back. Also, do you have more than one collision mesh for the shape? I believe the vehicleClass can only have one, convex mesh to calculate collisions.

Also, in your scripting of the datablock WheeledVehicleSpring(), what is the length of the spring, I had some issues with making it too small or nil, as this was to be a fixed axle type cart affair with no suspension, which doesn't really seem to apply to this type of vehicle...

You could be adding some extra Nodes to the shape via the different exporters and .CFG file, I've tried to follow your workflow but I'm getting lost somewhere along the process; with all the rotation of the different objects. What Ms3d vehicle documentation are you following to setup the shape???

Before I check a shape out in the engine with code, I examine the .DMP file or that portion in STP[although not all the data is written to .dmp]. I often go many times back/forth between the modeling package and the ShowTool to make sure my shape is properly assembled and textured.

I've always had great results with the DTSPlus! exporter, except some issues with visibility but I feel that it may be the way the code is written for compiling the exporters; as both my gameSpace and Ms3d shapes with a certain animation I was attempting, exhibited the same issue. I was attempting to get multiple shapes fading at different times but always the second mesh and beyond share the same fading? Eh, wasn't that important, as it was for a RTS project that never got off the ground...
#9
12/01/2005 (10:55 pm)
Morning... There is no difference when viewing the two exported files in ShowToolPro. They both show up as static shapes too. It's very odd... I tried the models in MS3d v1.7.6 and v1.7.4... There's no difference really as both versions use the same (1.7.4) SDK.

I only have one collision mesh... and yep... it's concave... Hmmm... getting confused with convex and concave now... here's a pic:

www.geocities.com/burningza/collisionmesh.jpg
If your spring is nil (0) the engine will crash too. Mine is 0.10 atm. The wheels are still not aligned to the shocks, but thats probably due to the shock animations aren't exported. Chris Robertson had a thread were he was trying it to, but he only got one wheel to animate. I'll try that today following what they say on this thread.

Where are you getting lost with my workflow? What's unclear? My nodes are correct. I'm using a trick that I've read with dummy nodes to orientate the hub0...1 nodes; Just attach child nodes to the hubs and make em point fwd:

www.geocities.com/burningza/nodetrick.jpg
I'm not adding any extra nodes with the exporter, except if the exporter does it by itself. But I have the normal nodes: hub0,hub1,cam,eye,mount0

I've used the document on this thread called DTS_Nodes.pdf

Quote:I often go many times back/forth between the modeling package and the ShowTool to make sure my shape is properly assembled and textured
It still works with the stock exporter though... I've also used the DTSplus exporter alot and it worked fine with other stuff like trees and barriers, etc.
#10
12/02/2005 (1:04 am)
Sounds good... First time I see this thread (from your CS)...

Now lemme play!!! I'll give you some results on monday as i don't have internet at home...
#11
12/02/2005 (1:18 am)
In your .cs... Does this variable actually work?

steeringSequenceWheels = 1; //number of wheels that are affected by the steering animation
#12
12/02/2005 (5:07 am)
Starting from stock TGE 1.4, I changed:

- buggy.dts to dirtbike.dts
- wheel.dts to bikewheel.dts
- steering/powered as you specified in your original post

When I load up the starter.racing mission, the bike falls over, but I don't get a crash. Doesn't look like an exporter problem so far.....

Why don't you run the debug executable and see exactly where it crashes?
#13
12/02/2005 (8:13 am)
@ Burning: I 'think' the DTSPlus! exporter assembles the DTS shape by adding a Root Node, and the base01 & start01 Nodes[well, on my exports, it does, and they're now part of stock Never Export listing]. Actually, I may be confusing gS to MS3d, but anyhoo...about start & base. I now cull these with the .cfg file...I thought that the Root Node may have been causing the oddities by adding it's Transforms to the object....looks like you're getting some topnotch help[especially if Chris has gotten involved! Hi, Chris], and will get this solved soon. Good luck, and safe modelling to you!

Rex

PS:

() = would be a convex shape
)( = would be a concave shape

...and I think the 'offset' between wheel and hub is the length of the Spring?? my fixed axle did the same, mounts perfectly to the Hub* Nodes in ShowTool, but when code was applied in the engine, the offset appears....my springs were the same and the offset distance looks the same to yours...about 4" or .10 meter