Game Development Community

Creating wheelVehicle meshes... What a pain this can be.

by Shane09 · in General Discussion · 01/31/2009 (4:45 pm) · 13 replies

I'm creating wheelVehicle meshes in Blender for my game. Here is a following list of questions:

[questions]

NEW QUESTION: Lights & windshield glass. How would I make a windshield on my vehicle? Well I know how to create the mesh, but how do you make it transparent so you can see what is inside the vehicle? I'm using Blender. Also, how would I make the windshields break when shot at? Would I have to have them mounted on the vehicle, and make glass shards for the debris? This way it takes 1 shot to break the glass, and another to shoot at the driver. I know how to set damage levels and all that, but I am lack SO much knowledge about vehicles. About the headlights, I'm not too sure if I will be needing them, but how do you create them?

1)Would the wheels have armatures named hub0, hub1, hub2, and hub3? Or would I just create the 4 wheels as a DIFFERENT '.dts'. I looked at the 'starter.racing' and noticed they had the buggy seperate from the wheels. Is that what I am supposed to do?

2) Do I really have to make a '.dsq' file for doors being able to open and close or can I just keep that along with the vehicle mesh?

3) Would I have to create a '.dsq' file for a turret? Or would I do this... Create the turret as a seperate mesh, and have a mount point for it and the top of the vehicle where the turret goes. Then would I used TorqueScript to be able to have the mounted turret rotate?

4) To be able to upgrade the doors, side panels, front panels, and back panels, I would have to create mount points for each using armatures in Blender, correct?

5) If I wanted to have to have the cars to be able to be upgraded would I do... Just keep the same car, but have a different '.cs' file that loads with a different engine torque?

6) When the player gets in the vehicle, do you have a in game GUI screen load that looks like the inside of the vehicle (guages & steering wheel), or would I add this in the mesh? I assume that using a GUI would cause less lag, correct?

7) To have the player mount in the vehicle, I would add a armature on the seats and turret along with a armature on the player?

8) What does it mean by Torque can only have 8 mount points? Does this mean 8 mounts points on the player and I can have 8 mounts points on the vehicle?

9) This is kind of off topic but... On page 227 of the GPGT it says
Quote:
"There are working samples of each type of vehicle included in the GPGT lesson kit, and a full explanation of how they were created in the appendices."

Where can I find the vehicles on the GPGT cd so I can examine them and get a better understanding of my own game? Yay, I found the vehicles. Question 9 is now closed. Questions 1-8 are still open :)

[/questions]

Any help is greatly appreciated. Thanks.

#1
01/31/2009 (5:13 pm)
1. Yes/no. Yes, hub0 is front left, hub1 is right front, etc..
You only need 1 wheel.

2. No. You can embed the animations. Name each door animation differently.

3. Purchase the combat kit. Everything works and it's exactly what you need.

4. Yes.

5. Don't know the answer to this.

6. You would need a gui most likely. I'm not sure tho.

7. You would place a "mount point" where you want the driver to sit. (mount0) Place as many as your car will hold. The turret would have to have it's own mount point. The combat kit will show you all you need to know for turrets and player mount points, including multiple mountpoints.

8. I don't know the answer to this.

Hope the rest helps you tho.
#2
01/31/2009 (5:24 pm)
Thanks. That combat kit looks extremely helpful. I'm still going to try and get around the problem though. I will maybe invest into the combat kit if I really, really can not fix the problem. Thanks for the help though. Most of those answers were actually pretty useful. :)
#3
01/31/2009 (5:47 pm)
1, 2, 4, 7 are already answered.

3 & 6 I felt needed a little extra
3. Yes, turrets are created separately. Engines changes are needed to make use of them. It's then a simple script call to "add" the turret to the vehicle.

6. A GUI for the interior would be the most efficient solution, but you can have a "realistic" 3d interior view if you wish -- it just means more polygons that have to be kept track of.

5, 8 where unanswered
5. Yep. You wouldn't need a whole new script file though, just a new datablock that inherits the common fields from a parent datablock. In the child datablock you would only need to specify the fields that are different. It's mostly a matter of coding preference. I'm lazy and inheritance means less code I have to keep track of.

8. The mount point limit is just a hard-coded limit built into the engine. You can expand the number if needed.

EDIT: Resources do exist for the turrets and number of mount points solution.
#4
01/31/2009 (5:54 pm)
NEW QUESTION at the top of the original post
#5
02/01/2009 (6:54 am)
Also, how would I create doors on a vehicle? Do I have to make a seperate '.dsq' file just for the doors on the vehicle? Also, how would I make it so the door opens on a button command? It sounds like a simple piece of script. Does anyone know how?
#6
02/01/2009 (11:23 am)
*BUMP*
#7
02/01/2009 (11:33 am)
You can make the door as part of the vehicle. Just animate each door seperately. Most of what your users will see will be the eye candy of your textures. If you want to simulate changing door styles, just swap out the textures.
You can keep the animation information in the dts unless you want it seperate.
To operate the door on a button press, just bind the key to the door opening/closing function you write in script.
#8
02/01/2009 (12:25 pm)
Ok, 1 more question before I can test my prototype vehicle. Yay :)

Wheels. I add 4 armatures in Blender where the wheels will go. I named them hub01, hub02, hub03, hub04... Now what? Do I save and export this way? Then do I create 1 wheel and create a armature on it? I really have no clue... So I basically just need to mount the wheels to the truck. I'm going to replace the model with the starter.racing model and test my new vehicle. But, I can't do this without the wheels. I'm so close :) Thanks all who have helped so far.
#9
02/01/2009 (12:35 pm)
I think it's just hub0, hub1, hub2, hub3. I've never looked, but I don't think there is a mountpoint on the wheel itself.
Make sure you change the dts shapes in car.cs.
#10
02/01/2009 (12:52 pm)
So I just create armatures named hub0, hub1, hub2, and hub3, export the model of the truck and then export the wheels and change the files and I'm done?
#11
02/01/2009 (1:09 pm)
I did this. Here's what happened. I named my wheel 'wheel.dts' and my truck 'buggy.dts' to avoid having to edit everything. Right as I started the 'starter.racing', the numbers began counting and my car just kept falling, along with no wheels on it. What have I done wrong?
#12
02/02/2009 (8:14 am)
Did you add collision mesh(es)?
#13
02/02/2009 (1:45 pm)
I have my mesh. How do I add a collision mesh?