[OPEN-SOURCE] Machinery Modelling Toolkit

Ohh wait. I think there is a bit of confusion. The unit conversion variable “0.001”, is suppose to handle velocity in cm. Area should be calculated in m2. Air density in kg/m^3. Drag coefficient is unitless. I think the wrong value you had before is the area of the cross section as 0.338 is really large, that’s like a 65cm diameter shell.

Basically you either convert all inputs into metric and then multiply results - to get it in cm again (a factor of 100 for Force and 10000 for Torque). Or just use Unit Conversion which was calculated in following way: [kg/m3][m^2] -> [kg/cm3][cm^2] -> 0.000001 * 10000 = 0.01
So with Unit Conversion, the output is already in proper UE4 scale for Force calculation, but it’s valid only for this specific air drag formula:
1/2 * Ro * V^2 * S * Cd
Unit Conversion handles Ro (air density) and S (area) being inputted in meters.

So keep velocity in cm/s but re-calculate areas in m^2. Ideally you should take into account mass as well. The output of the formula is force. So acceleration will be Force/mass. Basically, heavier projectiles are harder to slowdown by airdrag.

You’re right, it was the diameter in inches not the area, the area is 0.00231. It is getting way too much force now, initial speed is 830m/s. I think I’m getting the unit conversion wrong, do you mind in take a look in the project? it’s a 2MB size with 1 projectile blueprint inside: google drive link.

Can’t check it now, but take into account that ballistic coefficient doesn’t equal air drag coefficient. They are different. Don’t know conversion but formulas at the beginning can be helpful:

Actually I was wrong, if your bullet can reach transsonic speeds then air drag equation won’t work near M1. Need a different formula to cover transsonic/supersonic parts.
It appears that this is the reason why ballistic coefficient is used in the first place and it changes with speed.

thank you, this page shows a different perspective, it’s helping a lot.

Hi everyone.
First, thanks very much for this amazing plugin. It’s very helpful.
Now I’m doing the final computer degree project for university and I chose to make a videogame, because I want to learn how work and are built. Then, the best way to do it, is making one.

I need some suggestion about the actual progress… I’m a beginner in Unreal Engine and I’m sure that I’m doing something wrong or not quite correct. Of course, I’ll put my project open source :wink: for everyone.

The project objectives are:

  • Make 2 tanks ([DONE] T34-85, and Tiger I).
  • [In Progress] Make a very simple ballistics system for damage system.
  • Make a simple multiplayer (4 vs 4) or (8 vs 8) rounds, that the team must to destroy the enemies or capture the base.

I have based on the World of Tanks and WarThunder games.

Video Link: 2018 04 28 17 28 - YouTube

Source: GitHub - elYuma/FDPTank

Thanks very much, yours sincerely;
elGears

First of all, it’s unethical to swap the original license into GPL and hide the original MIT license if you just make small changes to the project (it’s pretty clear that wanted this work public and usable for all with the license type he originally picked for the plugin). Please use the original license type and add your own copyright note for the changes instead if you want to protect your work.

Secondly, you can’t use GPL with UE4 at all, as it clashes with UE4 license itself.

Ohh, sorry. It’s a mistake. I’m not familiar making GitHub Projects. Thanks.

I guess GitHub added license automatically. But do follow @0lento suggestions - if you want to host your own variant of project, add additional license. Technically you don’t need MMT Content as it’s a project with examples . You can migrate parts that you need and include MMT Plugin as that one is necessary to work with physics sub-stepping in easy manner.


Брат Люк, как сделать анимацию движения танка и снять на камеру в Секвенсоре?
Надо чтобы танк въезжал в кадр и останавливался, как на картинке.

Мы делаем документальный патриотический некоммерческий фильм о Подольских курсантах.
Спаси тебя Христос.](https://forums.unrealengine.com/member/12960-)

Brother Luke, how to make an animation of the movement of the tank and shoot on camera in the Sequencer?
It is necessary that the tank drove into the frame and stopped, as in the picture.

We are doing a Patriotic non-profit documentary film about Podolsk cadets.
Christ save you.

Updated plugin and content to 4.20.2.

Forum doesn’t send notifications when it’s your first post. I’ve noticed your post just now.

To answer your question. I don’t know how physics interaction can be recorded, beyond some basic stuff like movement of an actor. To record tank movement properly, number of things need to be done:

  1. Suspension movement have to be captured, so that track spline can bend properly
  2. Track rotation position need to be recorded and “played”
  3. Movement and rotation of the tank root body can be easily recorded with sequencer

I’ve tried sequencer for a different type of the vehicle and we could record only actor’s rotation/position and state of the skeletal meshes. So suspension animation would have to be done using skeletal mesh to record it. But such recording won’t capture movement of the tracks. So it’s not possible out of the box.

Hello! First of all, Big Thank You to for this giant work done so far, and shared. It is mind blowing. I started to dig UE4 a year ago, and “my thing” is Sci-Fi aerial combat (i will post youtube link at the end of post). I learn, I experiment, I have some pleasant results with arcade-ish flying AI. Recently, I started to to look in PIDs direction (so far i have used just “fake” flying and a bit physics). I know there is a PID component in MMT too, I did read on page 2 here, I also have tried downloaded project too, of course. I would like to ask some educational question, could Author or anyone who knows this matter, direct me please in just couple of sentences, what principles i should try to drive PID by “AI”, and by AI for now i mean simple “go there” commands. I would be interested to try PID for both flying and ground vehicles. What will be right UE4 nodes to apply here, to point “PID arrow” to whereever my AI logic says so?
Thank You in advance! :slight_smile:
My UE4 videos here: Juris Perkons - YouTube

PID controller is a very simple device described by a few math operations. It might be too simple to drive any sort of AI. One of the typical PID controllers is a thermostat in refrigerator that enables cooler when temperature goes higher than some threshold value. It just measures the difference between current and desired temperature (this value is called error) then does few math operations on this value and outputs “control signal”, which is again just a value. For cooler it can be an actual electric current that enables it.
Just PID on it’s own is not very useful, the challenge is in understanding how to measure error and what to do with the control signal, when you solve those, the PID code is trivial. The other problem is that parameters P, D and I are not intuitive, they don’t really have any relation to a real world and not transferable from one device to another. They are very low level too which means that only very basic behavior can be done using them. If you drop integral (I in PID) coefficient then it becomes a spring - how much AI can you do with a spring? :wink:

For AI controlling physics based vehicles you can look into example of “Steering Behaviors” it’s a collection of simple algorithms, that are kind of like PID controller but made for more specific purpose:

https://www.red3d.com/cwr/steer/

Just google it if you need more articles or other examples.

Thank You for this insight, initial explanation! :slight_smile: Appreciated.

Hi, I downloaded your project, but it says:
" “MMT” plugin, which is not compatible with the current engine version."
After this it says:
“The following modules are missing or built with a different engine version: UE4Editor-MMT_Content.dll
Would you like to rebuild them now?”
I used yes, but it said:
“MMT_Content could not be compiles. Try rebuilding from source manually.”

What should I do? Please help :smiley:
Thx

Hello. I don’t speak English very well. So sorry for the stupid question. Can i use your content for commercial target?

Use the correct engine version. The latest version of the plugin is for 4.20, so if you’re using 4.21 it won’t work.

RaceTheMaSe made update of plugin for 4.21:
https://github.com//MMT_Plugin/pull/5
So if you grab a master version and compile it, you will have a 4.21 version working.
I’ll upgrade MMT Content to 4.21 a bit later.

Nice! :slight_smile: Appreciated.