[ASSETS] [OPEN SOURCE] Tanks, tracks and N-wheeled vehicles

thx for reply, but now i have new problem, i follow Oldraven tutorial and i can’t see in my BP(duplicated m113) wheels, suspension and track components(suspLxx, Rxx, Lxx, SprocketR, SprocketL and etc ), but after searching i find those components in window below but i can’t change them to my wheels mesh, i use 4.11 p3

b8c04f8df8dd8ada59da673305508122287e1fa8.jpeg

Perhaps it’s a 4.11 bug, it’s not a stable version after all.

good to hear that!, so i wait a final version!!..

Hi guys, solution to varied FPS is here:

I’ll be re-constructing this whole thing on components based approach. Will take a while but I guarantee you it’s worth it.

super!!! I don’t know what you doing, but i know you are right!!! thx

Sounds good!

Does this mean that the current Blueprint version will not be updated anymore?

I’ll move main tank BP into MMT so it can work with physics sub-stepping and I don’t have to update two separate projects. For this, I would need to re-factor some of the functions, more specifically change most of the nodes such as GetWorldLocation, AddForce and etc. to MMT version of them. I don’t know how much work it’s going to take as it’s rather difficult to re-factor what I have build, due to somewhat monolithic structure. But I want to do it anyway, otherwise this project won’t survive.
At the same time it won’t survive without physics sub-stepping as whole simulations goes to trash when FPS drops.
The content which is already build on a basis of this project can be simply migrated into MMT based project and it should just work. You don’t need any C++ knowledge or any C++ codding to use it, the only limitation is to have Visual Studio installed so Unreal Engine can package the game. This limitation might be lifted with 4.11 or 4.12 when plugins becomes available on marketplace, to my understanding this is one of the reason where there not there already.

Let me know if you have more questions! I’m not abandoning this, I’m making it better! :smiley:

Btw, it’s much easier to see the issue with your own eyes. Start game and type “t.maxFPS 15” in console. You’ll see how everything starts to freakout. When FPS drops not so dramatically you might not spot any issues visually at first but steering and performance of the vehicles will change. There was an old racing game where people with older hardware were driving faster than players with beefy PCs, while it was amusing I don’t think it’s acceptable for professional usage.

I Just found your thread this week and I want to thank you for all of your hard work. I am building a tank game for my 9yro son and this has saved me so much time and the headache of bugging the TD’s at work! I’m an artist so the tech stuff is a bit beyond me. Your BP along with the vids by peter were super helpful in getting to understand BPs and what is actually involved. Currently I am making a custom tank based off of interwar tech using a hortsmann suspension. I was just able to get the tracks and wheels going when I saw your latest post about MMT.

Is this something we should wait for you to change your BP into MMT or can we just copy and past the construction of the old BP into the MMT? I’m a bit confused although extremely excited about your new modular approach! I was just about to investigate springs and rollers with track slack which I expected to take months hahaha.

I am really excited and cant express my gratitude enough!
Mark

Hi Mark,
If you follow Oldraven’s tutorial and based you tank on A_Tracked_Vehicle or used copy of M113 or Ripsaw as basis, then simply migrating BP into MMT project would be enough. I’ll port current setup as it is, without component first. If any changes would be necessary in child blueprints I’ll surely will highlight them.
Thank you, for the kind words!

I’ve been following this thread for quite a while now, mainly because I find this type of developing to be incredibly interesting. Recently (today) I was able to get the materials I needed to try to get a tank of my own in there, because, who doesn’t like physics-based tanks?

But after setting it up, I found myself in need of a lot of help. So I’ll include them all here.

I followed Oldraven’s tutorial, and so far everything works as intended. the wheels collide, the splines are aligned, the suspension is hooked up, everything seemed to be fine visually. Except for one thing.

When running/simulating the game, the tracks seem to be linked to the suspension rather than the wheels. The tracks “bend” so that they are always directly below the suspension node-thingys. Now, that normally wouldn’t be a problem, since it would just be a matter of moving the nodes on the y-axis to make the tracks more straight. But the problem is that the road wheels are also connected to the suspension, so the act of moving the suspension nodes on the y-axis also moves the wheels.

I’m trying to port over a centurion, which is wider than the M113, so I have to move the suspension over to make the tracks act correctly, but by doing that, it ends up moving the wheels into the side skirts, no matter where I place the wheels. And it only shows when the game/simulation is running, and not in any of the editors. Any idea on why this happens?

Also, not really a problem, but more of a question, how do torque curves and gear ratios work here? I’ve been trying to get it to be somewhat accurate, but the only info I can get on the engine is it’s horsepower, max RPM, top speed, and number of gears. How can I use this with the ratios and torque curves?

If you move the suspension or the wheel in the blueprint… make sure you move both.
The suspension and wheel should both have the same xyz coordinates. (I believe they can differ in height coordinate based on what travel you set for the suspension)

I had the same thing with the Tiger setup.

Boredengineer is the one who knows more about torque curves :slight_smile:

In editor mode, position of the wheels relative to suspension is not really important, it’s more of the “reference” pose to place objects around. When you run the game, wheels will be re-oriented according to position and compression of suspension. If I remember correctly you need to place suspension handles horizontally in the position where you want you wheels to be during simulation. So first place the wheel where you want them to be and then move suspension handles into the same horizontal coordinates.
If you change vertical position of suspension then you need to make sure that you adjust Suspension Length parameter in suspension settings. When you change length of suspension or mass of the vehicle, suspension stiffness parameter have to be adjusted too. Longer suspension or higher mass - more stiffness.
In current setup suspension length is the “suspension travel distance” which sometimes can be found in technical specification of machines. This number is not the “default” distance between suspension handle and the wheel, it’s more of the distance at which suspension will have maximum force, or maximum suspension length. To get wheel positioned properly during simulation you need to adjust stiffness and length of suspension.

Only number of gears won’t help, you need actual gear ratios, which can be hard to find. Normally, I look first for the name of the gear box or transmission, then look for it’s technical or maintenance manual, if you lucky it will have some records about amount of gears and ratio of each gear. Just in case you don’t know it, when you see something called “final ratio” it’s not a gear but a multiplier for all gear ratios, so something like 4.3/3.2/2.1 with final ratio 2.0 actually means these ratios: 8.6/6.4/4.2
As this is a WW2 tank, information on it should be available, otherwise you can always “tune” ratios manually. Maybe you would be more lucky with finding gear box for different tank with similar engine and mass for example.

Regarding engine power. I need to check something first. Will reply on this one later.

But that is the problem. I’m not talking about vertical position.

6dc125fe0dfea1e6dc9e3dee7cef9088a5a438ea.jpeg

When the suspension has the same horizontal coordinates, the wheel position is normal, but the tracks


Look like this.

But when I move the suspension right over the wheels, the tracks are fine, but now the wheels are like this:

Thoughts? Is it that the wheel transforms are just bad? Or am I royally ******** up somewhere else?

Also, I apprieciate the info on gear ratios and you looking into the engine horsepower bit. Very useful stuff right there.

Ohh I see now. I think tracks are aligned to the wheels vertically. Horizontally they have their own coordinate in Y axis and shouldn’t move. Unless I’m using wheel Y position for Y position of tracks. In this case I would make sure that pivot of the wheel is in the middle of the main wheel mass. Can you show a screenshot of your wheel mesh so that pivot (0.0.0) is visible? Like if you open mesh in content browser.

Regarding the engine. I see that Rolls-Royce Meteor was installed in plenty of different British tanks including Centurion. Which is good as it should be easier to find more detailed data.
There are seam to be a lot of data about Rolls-Royce Merlin aero-engine on which Rolls-Royce Meteor is based. Unfortunately I don’t know how much of the effect is there from removal of supercharger, switching to a different fuel and installing heavier pistons. Perhaps general curve is the same but we still don’t know the peak torque of the engine. From horsepower and max rpm you can only get a single point on the graph. But we need a full horsepower or torque curve. At least a “maximum torque” at some specific rpm can give a point to approximate the rest from. In the project, there are should be several curves for different engine, take a look at them, they are sort of similar but different enough. I’m sure that information is somewhere out there, perhaps on some obscure website about WW2 tanks.

729cc07a37960f497ffcd2cb3033d7d762fbac5a.jpeg

There is my pivot point. I am assuming that it is wrong.

Thank you for the info. I also did a little digging on the Meteor. The most useful info I found about the land-bound version is that it can get up to about 1550ft/lb of torque @1200rpm, but that may be from some aftermarket tinkering. I don’t know how that would be implemented in the engine curve, so I just made a point with an x value of 1200 and a y of 1550, but all that gives me is a constant red-lining.

Try re-importing it so that pivot is in the middle of the wheel. Otherwise if I have time today I can correct a code to remove this dependency as it make sense for tracks to have their own adjustable Y position just from coordinates of spline control points. I thought that this is how it actually works alread:D

You need to convert Torque into N.m which is going to be 2101.51782 Newton-Meter. This will be the highest point on the graph. What was the max RPM? Lowest would be somewhere around a 800-1000, just a guess.
By red-lining you mean color of RPM in GUI or absence of torque on tracks? GUI color is derived from a color curve which you need to change to your specific engine, otherwise you are using colors from M113 which is very specific to that engine.
From simulation point of view, red-lining happens when angular velocity of the axle multiplied by current gear ratio and differential is higher than engine max RPM. For this to work properly, sprocket radius, gear ratio and differential have to be somewhere around realistic values. This is not too difficult if you just tune everything one step at a time:

  1. Put all GearRatios, DifferentialRatio and EngineExtraPowerRatio into 1
  2. Draw new torque curve (we will revisit this after we know max and min RPM)
  3. With such settings it should be really hard to get into red-zone as tracks have to spin with whooping velocity of over 1000 rpm (which is surely possible but should happen around top speed of the vehicle).
  4. Disable auto -shifting when you test this (“Z” to switch mode)
    From here you could start playing with higher gear ratio for first gear and differential of about 2-3.

I’ve checked the code. So wheels indeed follow horizontal position of suspension and spline control points use horizontal position of wheel. That’s a bad design :expressionless:
Do you guys want me to fix this? So spline control points will only use height of the wheel to re-position themselves? Wheel position independent from suspension is a bit trickier to do right. In any case, if I fix any of this, most likely you will have to change your models after update.

Thanks for the help! I imported my level into the MMT Project and all is fine except I get an error because I am using complex collision on my hull. I get crashes when I accidentally shoot it because I cant seem to clamp my thumb-stick Y axis for the barrel… If I use default collision the tank wont play so I’m thinking of modeling a custom collision one and pray it works. Any fixes you make are more than welcome! I Really enjoying the thread and working on this. and dont mind re doing anything! Thanks so much!!!