Tank Vehicle built to be part of the rest of Vehicle system
by John "Mythic" Henry · 08/10/2011 (8:28 am) · 23 comments
This all started with the purchase of the Bravetree tank ages ago.
Initially it was a great system with a few issues.
It didn't directly inheret from the Base Vehicle class.
That was what I was unhappy with. So I started over and made a tank class
based roughly on the wheeled vehicle class. This is not truly complete as the treads do not
change speed they are just animated at a set speed.
Here is the main files:
torque.abigholeintheweb.com/public_system/useruploads/tankvehicles.zip
Here are the DataBlocks and script parts:
torque.abigholeintheweb.com/public_system/useruploads/tankscripts.zip
First important note!! These are my working versions of the the following files...
vehicle.(h/cpp)
wheeledvehicle.(h/cpp)
tankvehicle.(h/cpp)
....
And the Tank DataBlocks and Modified Vehicle.cs
Here are a few additional files that will help:
*edit*
Had an older version of the Skeleton in there, this is the correct MS3D Skeleton
Sorry About that
*edit*
torque.abigholeintheweb.com/public_system/useruploads/miscfiles_updated.zip
(Notes)
The txt file is general notes of the nodes and such as I was working on it.
The skeleton.ms3d is the Tank Skeleton I used with Hubs/Springs
The Rigid.h/cpp are modified according to some changes others came up with
for rigid bodyu collisions.
I've done some changes that fit with my preferences to basic vehicles (movement keys mainly)
which can be ignored for wheeledvehicles. The modifications to vehicle base class are needed.
It is pretty heavily commented where I made most changes, but this was not coded to be given out.
So please be aware I may have forgotten to mark some changes :)
This basic system is not complete and needs fine tuning and further testing. I am releasing it
so others can improve on what I've done.
You can see where the majority of my work was done in earlier posts, so I am not going to
duplicate those posts, instead I will provide links to those posts. I am providing this
work to get others involved in improving this system so when vehicles are finally made to
work with Physics, we should be able to convert the tanks over as well. This is really for
any vehicle with a rotating gun mount and more then 4 wheels with or without treads.
The main post is this one:
www.garagegames.com/community/forums/viewthread/126020/2#comment-813803
Where I was asking for assistance with mounting objects (Related):
www.garagegames.com/community/forums/viewthread/126560
Further discussion of mounted nodes:
www.garagegames.com/community/forums/viewthread/126180
The resource I used for solving control of the turret rotation:
www.garagegames.com/community/blogs/view/17759
Good luck and I will watch this and help as best I can for those that attempt to work with and
improve it.
As to the Tank itself... I took the basic shape provided by Bravetree and just removed the
Turret/wheels in Milkshape, then created a new skeleton with hubs/springs for the wheels.
As I did not make my own shape, I cannot provide that one, sorry :(
Good luck and may the force be with you...
Initially it was a great system with a few issues.
It didn't directly inheret from the Base Vehicle class.
That was what I was unhappy with. So I started over and made a tank class
based roughly on the wheeled vehicle class. This is not truly complete as the treads do not
change speed they are just animated at a set speed.
Here is the main files:
torque.abigholeintheweb.com/public_system/useruploads/tankvehicles.zip
Here are the DataBlocks and script parts:
torque.abigholeintheweb.com/public_system/useruploads/tankscripts.zip
First important note!! These are my working versions of the the following files...
vehicle.(h/cpp)
wheeledvehicle.(h/cpp)
tankvehicle.(h/cpp)
....
And the Tank DataBlocks and Modified Vehicle.cs
Here are a few additional files that will help:
*edit*
Had an older version of the Skeleton in there, this is the correct MS3D Skeleton
Sorry About that
*edit*
torque.abigholeintheweb.com/public_system/useruploads/miscfiles_updated.zip
(Notes)
The txt file is general notes of the nodes and such as I was working on it.
The skeleton.ms3d is the Tank Skeleton I used with Hubs/Springs
The Rigid.h/cpp are modified according to some changes others came up with
for rigid bodyu collisions.
I've done some changes that fit with my preferences to basic vehicles (movement keys mainly)
which can be ignored for wheeledvehicles. The modifications to vehicle base class are needed.
It is pretty heavily commented where I made most changes, but this was not coded to be given out.
So please be aware I may have forgotten to mark some changes :)
This basic system is not complete and needs fine tuning and further testing. I am releasing it
so others can improve on what I've done.
You can see where the majority of my work was done in earlier posts, so I am not going to
duplicate those posts, instead I will provide links to those posts. I am providing this
work to get others involved in improving this system so when vehicles are finally made to
work with Physics, we should be able to convert the tanks over as well. This is really for
any vehicle with a rotating gun mount and more then 4 wheels with or without treads.
The main post is this one:
www.garagegames.com/community/forums/viewthread/126020/2#comment-813803
Where I was asking for assistance with mounting objects (Related):
www.garagegames.com/community/forums/viewthread/126560
Further discussion of mounted nodes:
www.garagegames.com/community/forums/viewthread/126180
The resource I used for solving control of the turret rotation:
www.garagegames.com/community/blogs/view/17759
Good luck and I will watch this and help as best I can for those that attempt to work with and
improve it.
As to the Tank itself... I took the basic shape provided by Bravetree and just removed the
Turret/wheels in Milkshape, then created a new skeleton with hubs/springs for the wheels.
As I did not make my own shape, I cannot provide that one, sorry :(
Good luck and may the force be with you...
About the author
#2
08/10/2011 (9:05 am)
Cool, thanks John. Tanks are on my list of to-do's!
#3
08/10/2011 (6:06 pm)
Thanks a bunch for this. This should hopefully resolve my issue.
#4
My e-mail is tremb40@videotron.ca
Can you send me your?
Sylvain
08/10/2011 (6:06 pm)
Thanks alot John,My e-mail is tremb40@videotron.ca
Can you send me your?
Sylvain
#5
an excellent first resource!!
but now you've set a standard for your next one's..... ;)
keep it up
08/11/2011 (1:08 am)
well done John,an excellent first resource!!
but now you've set a standard for your next one's..... ;)
keep it up
#6
operation, but now I'm back at work full time again, so my free time
has been reduced (*ugh*). I'd prefer working full time on this but
life is never fair..
08/11/2011 (6:07 am)
Well I had some free time to do this while i was recovering from anoperation, but now I'm back at work full time again, so my free time
has been reduced (*ugh*). I'd prefer working full time on this but
life is never fair..
#7
My email is kcpdad at yahoo
08/12/2011 (9:25 am)
I would like to work on this. Would you mind sending me your tank model? I have the tank pack, I can email you a screen shot of my license. thanks!My email is kcpdad at yahoo
#8
08/12/2011 (1:21 pm)
I always thought the Tank pack was awesome. Glad to see someone trying to resurrect it.
#9
I can post that one as it is mine..
I'll put that up too this weekend as I was already thinking about it.
Then you can just merge it into any tank shape in Milkshape.
08/12/2011 (5:28 pm)
The only real thing I did to the model was make a new SkeletonI can post that one as it is mine..
I'll put that up too this weekend as I was already thinking about it.
Then you can just merge it into any tank shape in Milkshape.
#10
Added my Rigid.h/cpp files as I did a modification to collision that a few others did.
Added a txt file with some of my notes.
I believe the post I worked with to change Rigid.cpp was this one,
but can't be certain... :)
www.garagegames.com/community/forums/viewthread/63305
Thanks goto kcpdad for spotting the rigid changes..
I've got quite a few modifications going on, so if you run into issues
let me know and I'll point out what I did so you can get it working with
the base T3D.
08/13/2011 (3:44 am)
Added my Skeleton file to the available filesAdded my Rigid.h/cpp files as I did a modification to collision that a few others did.
Added a txt file with some of my notes.
I believe the post I worked with to change Rigid.cpp was this one,
but can't be certain... :)
www.garagegames.com/community/forums/viewthread/63305
Thanks goto kcpdad for spotting the rigid changes..
I've got quite a few modifications going on, so if you run into issues
let me know and I'll point out what I did so you can get it working with
the base T3D.
#11
a Vehicle inherted basetank. This IS a work in progress. :)
It does take a change to the base tank files include in the TankPack
as they need some changes to Nodes/Mounts. But then I didn't use those
files directly. I converted the Shape to Milkshape and created the
new Skeleton of my own. This means the basic DTS shapes from the
tankpack won't work as is. Especially as they still have the wheels
in the shape and those have to be removed as seperate objects (wheels)
are added in the ::onAdd() call just like the other wheeled vehicles.
The Skeleton I've provided can be merged into a tank shape and connected
thus allowing you to use any tank shape of your own. If you find any
missing pieces of script, let me know and I will include them as well.
The suspension system (Rocking of tank when firing) has not been finished yet.
Most of the basic code is there for it, but I hadn't had time to
work on it yet as I was adding in the IAV to this system. I ran into
an issue with mounted objects at that point. Which is why the tanks
had been on hold.
08/13/2011 (6:17 am)
I'd better warn people... This is NOT a drop in for the TankPack toa Vehicle inherted basetank. This IS a work in progress. :)
It does take a change to the base tank files include in the TankPack
as they need some changes to Nodes/Mounts. But then I didn't use those
files directly. I converted the Shape to Milkshape and created the
new Skeleton of my own. This means the basic DTS shapes from the
tankpack won't work as is. Especially as they still have the wheels
in the shape and those have to be removed as seperate objects (wheels)
are added in the ::onAdd() call just like the other wheeled vehicles.
The Skeleton I've provided can be merged into a tank shape and connected
thus allowing you to use any tank shape of your own. If you find any
missing pieces of script, let me know and I will include them as well.
The suspension system (Rocking of tank when firing) has not been finished yet.
Most of the basic code is there for it, but I hadn't had time to
work on it yet as I was adding in the IAV to this system. I ran into
an issue with mounted objects at that point. Which is why the tanks
had been on hold.
#12
08/15/2011 (8:26 am)
Kudos, kind sir. :)
#13
I've been trying to get my head around how to create a vehicle to work with this...Man it hurts...
Is there any way of using T3D's cheetah in this as a test, that way we can all get to look at your setup and get working on it...
Looks really interesting BTW! 8)
08/16/2011 (2:03 pm)
Hey all,I've been trying to get my head around how to create a vehicle to work with this...Man it hurts...
Is there any way of using T3D's cheetah in this as a test, that way we can all get to look at your setup and get working on it...
Looks really interesting BTW! 8)
#14
on the Web, I think you might even find a basic one with no
animation or skeleton that you can load up in MS3D and then
merge/connect to the skeleton instead of using the Cheetah.
If you can't work out milkshape, I'd recommend finding an
artist friend to do it. Any artist should be able to connect
a simple shape to the Skeleton, you could even just create
some boxes for some parts of a test tank and have a test
object that way.
I dont really have the time do it at the moment. If I get a chance
I might look at doing that later, but remember I'm not an
artist :) I've just got a knack for modifying the basics of art work.
Out of necessity being a Sole Developer Indie ..
Also, the Cheetah is sold as an art pack by GG, so I can't modify
the shape and place it out there for people to use.. sorry.
08/16/2011 (4:37 pm)
Basically, I'm not an artist. I've seen some other tankson the Web, I think you might even find a basic one with no
animation or skeleton that you can load up in MS3D and then
merge/connect to the skeleton instead of using the Cheetah.
If you can't work out milkshape, I'd recommend finding an
artist friend to do it. Any artist should be able to connect
a simple shape to the Skeleton, you could even just create
some boxes for some parts of a test tank and have a test
object that way.
I dont really have the time do it at the moment. If I get a chance
I might look at doing that later, but remember I'm not an
artist :) I've just got a knack for modifying the basics of art work.
Out of necessity being a Sole Developer Indie ..
Also, the Cheetah is sold as an art pack by GG, so I can't modify
the shape and place it out there for people to use.. sorry.
#15
This work maybe a bit tough for some, it's not really
a polished product.
08/16/2011 (4:42 pm)
Also thanks for the nice comments.This work maybe a bit tough for some, it's not really
a polished product.
#16
I've already got the bravetree tank pack. As with the guys above do you think if I provided proof of ownership you could get me your model somehow so I can see properly how you've set it up? I'll then use that knowledge to rig up my own vehicle and have a play with it??
my address is harvey@stickmanstudios.co.uk
As already said, it really does look like it could be a great resource!
08/17/2011 (12:32 pm)
Hey John,I've already got the bravetree tank pack. As with the guys above do you think if I provided proof of ownership you could get me your model somehow so I can see properly how you've set it up? I'll then use that knowledge to rig up my own vehicle and have a play with it??
my address is harvey@stickmanstudios.co.uk
As already said, it really does look like it could be a great resource!
#17
Dts shapes in Game have to have the correct Bone Orientation or you
can have all sorts of problems. The best way to see this is to open a
shape in the editor and Look at how the Orientation is for like the
basic buggy or cheetah. Then make sure your own shape meets that same
orientation. I believe there is some forum posts about it in the art
sections.
This gave me a few problems initially in Milkshape but I did
manage to work it out. Just do your basic shape and export it then
check it in the Editor to make sure you have it correct. Also I found
less problems with Milkshape if I zeroed the Bones whenever I moved or
added anything (skeleton wise).
08/23/2011 (8:00 am)
As I told two of the other guys and figured I had better mention here too.Dts shapes in Game have to have the correct Bone Orientation or you
can have all sorts of problems. The best way to see this is to open a
shape in the editor and Look at how the Orientation is for like the
basic buggy or cheetah. Then make sure your own shape meets that same
orientation. I believe there is some forum posts about it in the art
sections.
This gave me a few problems initially in Milkshape but I did
manage to work it out. Just do your basic shape and export it then
check it in the Editor to make sure you have it correct. Also I found
less problems with Milkshape if I zeroed the Bones whenever I moved or
added anything (skeleton wise).
#18
using that giving me some errors.something like this:
setWheelTire: invalid tire datablock or wheel index, vehicle has 0 hubs
10/15/2011 (10:28 pm)
john,is that Tank Skeleton has all necessary nodes with proper name?using that giving me some errors.something like this:
setWheelTire: invalid tire datablock or wheel index, vehicle has 0 hubs
#19
Im putting the correct one up now.. *sheepish grin*
Really sorry about that.
torque.abigholeintheweb.com/public_system/useruploads/tank_skeleton.zip
This is JUST the skeleton.
Ill swap out that bad file on the upload section in a min..
10/16/2011 (4:42 am)
Man, your right, I mixed up one of my Older versionsIm putting the correct one up now.. *sheepish grin*
Really sorry about that.
torque.abigholeintheweb.com/public_system/useruploads/tank_skeleton.zip
This is JUST the skeleton.
Ill swap out that bad file on the upload section in a min..
#20
Seems i've ran into a snag. The engine compiles just fine(only had to remove Interior object type from collision masks), i also went through the scripts and made sure all file paths are up to date and after that there were no errors on start up.
The issue im faced with is in the level editor when i try to spawn a tank vehicle. I get the following error msg: <input> (0): Unable to find function TankVehicleData::Create
Any help with this would be most appreciated.
Best regards
Jonas
02/08/2014 (10:04 pm)
Hello, have anyone tried this resource with the MIT 3.5 version of the engine?Seems i've ran into a snag. The engine compiles just fine(only had to remove Interior object type from collision masks), i also went through the scripts and made sure all file paths are up to date and after that there were no errors on start up.
The issue im faced with is in the level editor when i try to spawn a tank vehicle. I get the following error msg: <input> (0): Unable to find function TankVehicleData::Create
Any help with this would be most appreciated.
Best regards
Jonas

Torque 3D Owner John "Mythic" Henry
EveronWorlds
I may have left a few bits from the striker IAV in there but I think
I removed em all :)