Announcement

Collapse
No announcement yet.

realistic flight physics function library, anyone interested?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [GAUGING INTEREST] realistic flight physics function library, anyone interested?

    Hello,

    I'm working on aplugin that simulates airplane physics. I'm using it for my own flight sim, but if there's enough interest I'd like to put it up on the marketplace as well.

    It doesn't require any special setting up of your model, just enable physics, add it as a child component, plug in appropriate numbers, and it will fly. This model is ideal for simpler things that still need to have some aerodynamic properties (missiles etc), but for most games it can be used as "main" model - even though it's simplified, it's more realistic than flight model of almost every game that's not a dedicated flight simulator (and some that are...)






    -and as a bonus i'll also throw in a simple raycast landing gear simulation, sensor helper to feed data to your instruments, and stability augmentation system.

    Example project showing how to use it will be of course included.

    EDIT: test game here - https://forums.unrealengine.com/show...l=1#post446541

    EDIT2: released on Gumroad, get it here: https://gumroad.com/l/Mqnn

    Tutorial playlist: https://www.youtube.com/playlist?lis...9l_SGJjedPvAp9

    EDIT3: FS template test game (EFMSim) here - https://drive.google.com/open?id=0B2...llnbnZONjhOYkE - now with VR support

    Plugin now available on UE Marketplace: https://www.unrealengine.com/marketp...y-flight-model
    Last edited by moookiexl; 06-19-2017, 05:57 PM. Reason: Rename thread

    #2
    This is fantastic and something I'd definitely be interested in
    [FREE] Procedural Bridge Blueprint, [FREE] Spline Enabled Ivy BP

    Comment


      #3
      "Full" model looks well done!
      I've build something similar in 4.3 using blueprints and my concern is stability of the model at low fps. I was getting all kind of weird glitches, airplane starting to shake, magnitude of forces changing rapidly as delta time changes too much from frame to frame. Did you implemented some higher order integrator to avoid it?
      I'm planning to move my code to C++ but nevertheless it might be not necessary as your model looks solid. I would definitely be a happy customer!
      Couple of questions regarding the flight model:
      - physics forces are applied to root body or individual components of root body?
      - do you calculate pitching moment?
      - is it limited to slower than sound barrier model?
      - in one of your previous videos it looked like each airfoil is implemented as separate component, is it still the case or you expect each aircraft to have 2 wings, 2 ailerons, 1 rudder and etc. (like vehicle component does)?
      - I was building my model to get a bit of simulation of flying in other than earth atmosphere, so playing with density of air and Raynolds numbers is important. Are you using them as variable inputs or constants?
      Youtube Channel

      Comment


        #4
        -higher order integrator: nope,not using anything like that. But from my testing it's stable and changes in delta don't have significant effect on behavior until you're below ~15fps. Of course if you attached it to a propeller or something else where orientation rapidly changes from frame to frame like that, things *will* start breaking down.

        -forces are applied to individual components, if your model has bones, it's applied to bone the socket is attached to. (so yeah, if you set constraints right, you can have wing flex too )

        -pitching moment - at the moment no, but I might add it at some point. Currently cambered airfoils and resulting pitching moment can be approximated by splitting the foil chord-wise and simulating the halves individually.

        -there's a mach drag curve, supersonic flight is possible but simplified. No mach tuck or anything crazy like that.

        -yeah, each airfoil is still a separate component. Any configuration is possible, the logic is the same regardless of where the segment is located.

        -air density is a variable, but acts as a simple multiplier, effects of reynolds number are not simulated atm. Theoretically you could have two models, one for low rn and one for high rn, and "blend" between them based on speed (that's how it's done in X-Plane), but I haven't done that myself.
        Last edited by moookiexl; 11-18-2015, 12:27 PM.

        Comment


          #5
          Nice! Getting those extra features myself shouldn't be too hard.
          Are you planning on making C++ implementation? Cause it allows you to run all custom physics code in physx sub-stepping, making it more precise and stable and relatively fps independent.
          Good luck with getting it to marketplace! (if you decide to publish it)
          Youtube Channel

          Comment


            #6
            Well, I didn't plan to convert it to C++, as i'm... not very good at it, and the performance is alright in blueprint (there are no heavy iterations or anything, heaviest bit is raycast for ground effect and that won't be sped up much by C++). But running it in physics substep does sound very tempting.
            So...I don't know.
            Last edited by moookiexl; 11-18-2015, 01:52 PM.

            Comment


              #7
              I would love this.

              Comment


                #8
                Looks great, I'd certainly play around with it. Is it a C++ Plugin or Blueprint?

                Comment


                  #9
                  Originally posted by TheJamsh View Post
                  Looks great, I'd certainly play around with it. Is it a C++ Plugin or Blueprint?
                  I just started converting simple FM to C++, already getting some results.
                  Full FM is blueprint, dunno if i'll be able to convert it since it's hideously complex, but I'll try.

                  Also, one question:
                  I'm thinking about making C++ parts a plugin, that way they should work in both C++ and blueprint projects. Is there any problem with this approach?
                  Last edited by moookiexl; 11-19-2015, 03:22 PM.

                  Comment


                    #10
                    Here is what I would like to see from this -

                    1. Multi-player support - Cooperative and Versus
                    2. An Example Aircraft with weapons (Guns, Missiles, Bombs, etc. ) using both the simplified and physics based flight model.
                    3. An Newtonian or non Atmospheric flight model for Space for example
                    4. Lots of settings - So that we can make each flight model unique.

                    Comment


                      #11
                      1. Already there. If the object this is attached to is replicated, it will work in multiplayer, regardless of mode.
                      2. No problem, I already have bombs with flight model in my game, i'll add them to example aircraft too. Guns are not a part of flight model as such, but I can add them too.
                      3. The influence of this model fades with decreasing air density, if you set it to 0 it'll behave as if it was in space (although, at that point you don't really *need* a flight model, unless you want to have "Star Wars physics".)
                      4. Lots of settings - i'm actually trying to *reduce* the number of parameters. What I have at the moment is probably completely incomprehensible for a normal person:
                      Click image for larger version

Name:	settings.png
Views:	1
Size:	55.6 KB
ID:	1093627

                      Comment


                        #12
                        I like that you already included delta wing and ground effect. I would really love to play with this and see how it works.

                        What is Auto Drag?
                        Youtube Channel

                        Comment


                          #13
                          Auto drag is one of things that will get removed. It was an illconceived attempt to replace drag curve with automatically calculated one.

                          Comment


                            #14
                            Nice work, yes indeed, certainly interested.
                            Acclivity Game Studios. Making a BP FPS, Tutorial Series on Blog : On Unreal Wiki : Twitch

                            Comment


                              #15
                              Originally posted by moookiexl View Post
                              Auto drag is one of things that will get removed. It was an illconceived attempt to replace drag curve with automatically calculated one.
                              Thank you!
                              I have just some curiosity questions and you seam to know airplane physics better than me. I see that you have a ticker for delta wing with delta sweep setting. What kind of correction you do for delta wing? I vaguely remember that it was effecting induced drag, but I thought that just turning airfoil itself is enough to get the same effect.
                              Someone told me that for delta-plan kind of craft (no stabilizer) it's important to model pitching moment. But from what I understand that effects only airfoils with specific profile and as it name suggests adds pitching moment to airfoil itself, so I'm not sure how does it help to not have stabilizer and why it works only on delta-wing crafts.
                              Youtube Channel

                              Comment

                              Working...
                              X