realistic flight physics function library, anyone interested?

OK guys, here’s what’s going on: There’s been another plugin submitted to the marketplace that does almost the exact same thing as my full FM.
This one: AeroComp - Modular Aerodynamics Simulation Components - Marketplace - Unreal Engine Forums

It makes no sense for me to keep working on something that’s been already done by someone else. So i’ll be working on SimpleFM now, make it as “polished” as possible, and include a whole lot of extra features that make it more useful for missiles etc.
I already converted it to C++ and made it run in physx substep, so it remains stable and predictable at extreme velocities, regardless of framerate.

I also talked to the developer of the other library and we’re working on making them compatible. Not just “can be used in same project” kind of compatible, but they’ll be even able to use same airfoil data, and use same units where applicable. In other words, you can have AeroComp plane firing SimpleFM missiles and it will work without a hitch.

I did not see control movements in that one… actually the video was not impressive at all, nor did it demonstrate much of the product. Still loving yours.

Video was not meant to demonstrate much of a product, its just a small reveal video. The actual playable demo download link was meant to demonstrate the actual product, I assume you didn’t see that?

I like this :smiley:

Cannot wait to get my hands on both of these items :slight_smile:

Thanks a lot for that comment. Mookie is working on some awesome stuff that he’ll probably mention as he progresses, he’s a great guy and it a lot of fun talking to him and validating each other’s ideas and design approaches

BTW, my post includes a link to a playable demo if you’d like to play around with it.

Saw it and tried it. Everything seemed stiff and slow to react. But I come from a background of flying remote control planes, and having used loads of simulators, so most often games get flight wrong…

Mmm. Yes please.

In first post I promised i’ll also throw in stability augmentation as a bonus. Well I got a bit carried away. SimpleFM now includes full featured fly-by-wire system simulation, complete with autotrim, autorudder, stability augmentation, alpha limiter and autothrottle.


Commands from this system are also readable from blueprint, so you can use them to drive animations, or even control another flight model.

Complete overkill for a “simple” flight model? Maybe.
But it also be used to prevent stupid AI from crashing due to overcontrolling the aircraft.

…or to make players of your game think they’re better pilots than they really are :wink:

Glad to hear that you’ve switched to C++. So you won’t be publishing “full model”?

Nope, not in its current form anyway.
There’s a possibility that after both SimpleFM and AeroComp are done, Irakli and I could start working together on some sort of “super FM” that combines best features of both, but nothing’s certain yet.

OK, i promised you some extra features to make simpleFM easier to use for missiles and such. So, here. Now it has a guidance system, simply give it a target vector and it will go there.

-and as you can see here, it doesn’t cheat. If you launch it from a position where it doesn’t have enough control authority to steer towards target, it will not hit.

Guidance can be used for airplanes as well, allowing mouse control like in War Thunder.

And that landing gear simulation i promised as a bonus? Well I converted that to C++ and made it use physx substepping as well.
Here you can see that it can even handle F/A18-style flareless landing:

Try doing THAT in 30fps :slight_smile:

This is super cool!

What is the price?

That I don’t know yet. As far as I know, there’s nothing on the marketplace in similar category, so I have no clue what a reasonable price would be, gonna have to think about that. Any ideas?

Ok, So a few questions then my pricing suggestion after you reply. :slight_smile:

  1. What platforms does this run on? Desktop? Mobile? VR? etc.
  2. Can you sum up the features into a list of this tool/plugin in the original post?
  3. Do you plan on supporting Helicopters and VTOLs?
  4. Will there be support for space craft? Star wars-esque space craft? Realistic Six Degrees of Freedom Newtonian space craft?

Desktop - of course.
VR - the guy who’s testing it tried the example project with Rift and said it works really well, didn’t try it myself though.
Mobile - well I don’t know anything about mobile. I’m going to be cautious here and say no, even though I did my best to not write any non-standard C++. But again, I don’t even know if C++ plugins even work there.

  1. I’ll update OP with list of features. I’ll just have to think about what even needs listing.

  2. Helicopters - Nope, sorry. I don’t know much about helicopters and rather than writing something completely wrong i’ll just stay away from them.
    VTOL - now that you mention it…yeah I can add that, shouldn’t be too hard. Gonna need some attitude control at zero velocity too.

  3. Well realistic Newtonian spacecraft don’t need a flight model in the first place, just some physics thrusters that are already in base UE4. It is however possible to use this model for re-entry - it has an adjustable curves that control how air density and speed of sound vary with altitude.
    Star Wars-esque - yeah, when I add that above mentioned zero speed attitude control, it will be possible.

awesome work, couple of questions

  1. does it support multiplier replication ?
  2. is there PID controller implemented ?
  3. what do u use Physics for ? ground collision or whole flight model ( applying forces etc.)
  4. are there any issues (precision) if you fly too far from origin ?
  5. do you have air friction (drag) implemented and if so, is the drag coeff dependent on frontal area ?
  1. Not by itself. If it’s attached to replicated body, transformation and velocity are of course replicated.
  2. yeah, guidance uses a PID controller, direct control is PD (or, with autotrim enabled, it becomes sort of pseudo-PID, where I only accumulates when manual input is zero).
  3. Whole model, because substepping is only possible for bodies with enabled physics.
  4. No. I even tried to fly roughly twice the max map size away from origin (with bounds checking disabled) and didn’t notice any changes. Of course, at some point it will break down, but not in “normal” play area.
  5. It has curves that control how it varies with alpha and slip. you’ll have to calculate frontal/side/top area yourself.

As you’ve decided to not continue with component based approach. How would you handle creating something like biplan or triplan with destruction of wings and control surfaces.

That’s unfortunately not possible to simulate with this, that’s definitely something that requires multiple components. I mean, you could just scale lift and stability multipliers, but you wouldn’t get any effects of lift asymmetry or anything like that, at best you could fake them by messing with trim. Or you could disable built-in lift and combine it with AeroComp, it is possible to have both acting on the same body.
On a similar note, do not expect a simpleFM aircraft to get in a flat spin and similar, things like that just cannot be simulated at single point, you need to know locations of aircraft’s surfaces for that.
There’s a tradeoff between ease of usage and realism, and i’m trying to keep simpleFM on, well, the simple side.

Sorry for long time without update, Had to do some changes to make sure the plugin will work in UE 4.11
I also added VTOL, attitude thrusters, linear force scaling for “star wars physics”, and that instrument helper thing.

Anyway, I think it’s now reasonably complete as far as features go. Now I just have to remove a couple of remaining hardcoded variables, double check if there’s any bugs, and it’s ready to go.

Meanwhile, here’s a little demo game, so you can try the flight model yourself.

Controls:
kb/m:
mouse - aim
W, S - throttle
A, D - manual roll
G - retract gear and arm bombs
LMB - drop bomb
MMB - mark target
RMB - freelook

gamepad:
select - switch to gamepad
left stick - pitch, roll
right stick - throttle, yaw
left thumbstick press - retract gear and arm bombs
bumpers - yaw
triggers - throttle
X - mark target
A - drop bomb
B - full manual control (deactivate FBW)

DOWNLOAD - https://drive.google.com/file/d/0B20tIRBAcOlsMlRWeFJWMDVDcWc/view?usp=sharing


This will also be the example project that’ll come with the plugin.