Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Assets [RELEASED] Silantro Flight Simulator

Discussion in 'Works In Progress' started by Oyedoyin1, Mar 20, 2018.

?

Which is better in terms of "user-friendliness" and "performance"

Poll closed Aug 13, 2018.
  1. 1 giant script

    0 vote(s)
    0.0%
  2. Multiple smaller scripts

    15 vote(s)
    100.0%
  1. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
    Nice can't wait to try out the new engine system, another feature when you get some time would be to implement variable pitch propeller system.
     
    Oyedoyin1 likes this.
  2. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    Yea.. I'll work on it when I'm done with the Spitfire :)
     
    reggie_sgs likes this.
  3. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    Spitfire Flight Tests

    1.Normal Flight Test

    2. Normal Test 2

    3. Destruction and Slight Weapons Test

    //
    4.Testing the Merlin engine with a "SU Carburetor"

    //
    Flight Data
     
    John-G likes this.
  4. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    Last edited: May 21, 2018
    John-G likes this.
  5. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    190
    Thanks for putting together a demo. One thing I would suggest is making it so the elevator returns to center like the rudder and ailerons do. It makes it hard to fly when the elevator stays in a fixed position.

    So after trying the Spitfire out I'm sad to say this does not fill our needs for a realistic flight sim. Here are just some of the issues I've found in the first few minutes of trying it.

    1) With engine off and throttle at 0%, the plane begins moving and picking up speed.
    2) While rolling on the ground at a low speed and using the rudder (wheels move in wrong direction), the plane lurches to one side when it should simply turn.
    3) While flying and doing a knife edge, the plane should dramatically lose altitude but it flies fairly straight.
    4) While doing a knife edge and leaving the controls neutral, the plane should roll back upright due to diehedral in the wings but it stays on it's side.
    5) With the brakes on and increasing engine speed, the plane lurches forward on it's nose. If you decrease the engine speed, the plane should fall back on it's rear but it stays on it's nose. I'm not positive the COG is in front of the wheels at this point but I really don't think the plane should stay in that position.
    6) With the brakes off, increasing the engine speed to full still causes the plane to lurch forward on it's nose.
    7) After #6 occurs, the plane is moving forwards and is staying on it's nose. The air hitting the tail elevator fin should push it downards but it continues rolling forward with it's nose on the ground.
    8) While attempting to do a hammerhead, the engine cut off and the plane began falling and rolling end over end (front to back) in a very unrealistic manner.
    9) During flight, the ailerons began rotating the plane in the wrong direction at one point.

    From what I can tell, this is not actually calculating aerodynamic forces and using those to predict flight. It seems to be using some sort of flight model designed to mimic an aircraft and not really doing the real flight calculations.

    This is not remotely close to a realistic flight mode an I don't think it's fair to advertise it as such. I'm sure it does it good job of being an all around aircraft sim but it's focus is clearly not on flight dynamics.
     
  6. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    This can be easily changed from the input settings by turning on the snap feature of the control button.

    You can also increase or decrease the sensitivity of the control from here.

    Definitely a bug because just turning off the brake is not supposed to make the aircraft move as the initial push-force applied to the wheels is calculated as 10% of the Total engine thrust which will be 0N if all engines are off.


    This was a mistake by me during aircraft setup. I selected the wrong axis of wheel rotation ( Used the wheel settings for the A29 Tucano).


    This is probably due to the minor "control augmentation" system i have in place. I developed it and added it to the system while working on the F-35 fighter. This keeps it in place (rollwise and altitude) while the controls are in neutral i.e the aircraft maintains its position while no control is applied.

    #5,6,7 are all due to the wrong placement of the COG of the spitfire. During the aircraft setup, i did a lot of research trying to find the correct position of the COG.

    From my previous knowledge of tricycle landing gear aircraft (and this is what I've been working with) the center of gravity should be ahead of the double wheels at an angle of 15 degrees.


    This however became a huge problem with the spitfire, i tried moving it backwards so it will still be at the 15 degrees angle, but this didn't solve the problem either. I actually have no flying or design experience with the spitfire landing gear type, so i'll be very glad if anyone could provide me with a proper equation to calculate the position of the COG for such aircrafts.

    I'm actually very happy this happened. The piston engine carburetor i selected for the demo is the "SU-Carburetor" which is designed to "Lose power and cut-off" during sharp negative g turns like the hammerhead.

    Selecting the "RAE Corrected" Carburetor fixes this problem.

    The camera is designed to roll from side to side providing the best possible view of the aircraft from a particular angle. In a sharp upward or downward turn, the position of the camera is flipped thus giving the perception the aircraft moving in "Opposite directions" i.e Trying to roll the plane left will be seen as a right roll movement. I can turn this effect off if it will be a problem.

    I beg to differ. The system is not a "model" as everything from the aircraft lift, engine thrust down to ambient temperature and pressure are all calculated with realistic equations with the defined parameters. All the things you noted from flying the spitfire demo are "minor Setup" issues that can be adjusted by the flyer (like carburetor type, camera type, control sensitivity, COG position and wheel rotation direction) not issues with the actual flight "System".

    Thanks for the review as i'm going to adjust the spitfire and improve the system with the things you pointed out. :):)
     
    Last edited: May 20, 2018
    John-G likes this.
  7. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    927
    Great work man! I was getting into some aircraft physics last night and I thought I had some decent working system but now I see your system with all these great features! Although for the game I'm making I don't really need a realistic system since that's not the point of the game, but still this is a huge inspiration.

    Have a wonderful day!

    Alex
     
    Oyedoyin1 likes this.
  8. reggie_sgs

    reggie_sgs

    Joined:
    Jun 29, 2014
    Posts:
    190
    If you update the demo, let me know and I'll take a look again. If you feel the camera angle was giving the impression of the plane rotating the wrong way, it might be best to put a quick terrain in there so you can have a reference point. I really think you need some sort of terrain in there so you can get a feel for how the plane is flying.

    The time the engine cut off, I wasn't concerned about that as I suspected it was your fuel cutoff system. The problem was that it was rolling end over end which should pretty much never happen.

    If this can provide realistic results, I would be happy to use it in our upcoming PS4 game but right now, I didn't see anything in the demo that I could use. If it's mainly config issues, it sounds like something you can easily update so let me know and I'll try it again.

    Thanks,
    Reggie
     
    Oyedoyin1 likes this.
  9. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
    Spitfire COG (Note Datum line) is calculated from Datum point for both undercarriage up and down.

    48ABFD9D-CA2D-46B9-8633-C1D9B129D0AA.jpeg
     
    Last edited: May 21, 2018
    Oyedoyin1 likes this.
  10. Alcyone

    Alcyone

    Joined:
    Nov 15, 2013
    Posts:
    13
    Congratulations for this fantastic asset!!

    I know you are working in the F35, and I am looking forward to see it soon!
    But the question is, could this be modified to create an helicopter too?

    Seems possible.

    Thanks!
     
    Oyedoyin1 likes this.
  11. bzdur

    bzdur

    Joined:
    Mar 23, 2017
    Posts:
    56
    Just a quick tip from me, do something with that propeller ( try to blur it ).
    See my video and you'll get a picture what I'm talking about :)
     
  12. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    Thanks :). I guess it could, but I've never experimented with it before. I plan to develop a separate "Helicopter Simulator .
     
  13. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    Yea!!.. Funny thing is I have the Texture and engine is designed with a "Slow" to "Blurred" prop transition. I just personally like leaving the slow prop ;)
     
    John-G likes this.
  14. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,457
    Helicopter simulator would be great addition.
     
    Oyedoyin1 likes this.
  15. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    Definitely.. I'm just trying to get the Flight Simulator to a very stable point..then I'll begin development on the Helicopter Sim :):)
     
  16. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    UPDATE##

    Airfoil system update .. With xfoil data plots



    Wing Airfoil: contain lift, drag and moment plots against alpha



    Propeller Airfoil: containing data such as CT, Cp and eta for both stationary and dynamic conditions.



    Airfoil Shape Plot: the shape of the airfoil can be visualized during selection.



    All propeller engines will now require the propeller airfoil prefab, thus reducing the amount of data to be supplied.
     
  17. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
    Liking the airfoil data from the property addition.
    And clever use of the curves to show the naca data.
     
    Oyedoyin1 likes this.
  18. SimLoop

    SimLoop

    Joined:
    Jun 17, 2013
    Posts:
    25
    Question? Is a propulsion system required for simulator? Looking to use this for a Space Shuttle simulation and also wingsuit simulator.
     
  19. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    No. The Flight system is completely independent of the propulsion system.
     
  20. gl33mer

    gl33mer

    Joined:
    May 24, 2010
    Posts:
    280
    This looks promising. Haven't tried the demo.

    @Oyedoyin1, have you tested any soaring/sail plane scenarios? It would be great to have sailplanes with thermals/ridge rift/etc. phenomenon or at least have the code ready for such scenarios.

    Regarding the helicopter simulator quest from above ( @Alcyon, @longroadhwy ) - Try giving Helisharp (and the unity example implementation) by @minsulander a twirl.

    https://github.com/minsulander

    I've been having good results with it but haven't gone through all the code and still unsure as to what effects are actually modeled (or are emergent) - apparently there a bunch of aerodynamic effects that occur with helicopters that are difficult to model (and I doubt they are represented) but @minsulander could probably help with that.

    I am using it for prototyping and find that I can get a lot of variation in "feel" just by playing with the different player input settings, etc (with a little code fiddling).

    Next step I'm working towards is to use ml-agents to fly my prototype (I'm using an eight key setup which the machine should find intuitive ;-)

    * A good opportunity to thank @minsulander for his much appreciated work, it has provided countless hours of excellent fun if nothing else.
     
    Oyedoyin1 and John-G like this.
  21. SimLoop

    SimLoop

    Joined:
    Jun 17, 2013
    Posts:
    25

    How are you adding NACA airfoil data?
     
  22. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    Thank you very much for the suggestions.
    Sailplanes are basically gliders, so the work is almost done :)
    The Flight system does not necessarily require the propulsion element or engine attached to it to function properly,if set up correctly, a airplane can glide without an engine or with the engines off.

    The only unfinished part is the thermals related weather system, which I'm currently working for the next update.

    I'll also check out the Helisharp package cause I'm thinking of using Unity's ML agents to power the flight AI system (provided it'll work and will not be too difficult)
     
  23. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
  24. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
    Is that conversion script included, tried the one from UnityFS but that didn't work with your system.
     
  25. iichiversii

    iichiversii

    Joined:
    Nov 23, 2011
    Posts:
    107
    I see you mentioned your gonna be working on a helicopter simulation, thats great, will we be able to swap out the heli models for our own and enter in the characteristics of the heli?
     
  26. SimLoop

    SimLoop

    Joined:
    Jun 17, 2013
    Posts:
    25
    Used "Manual" to create left wing with "Silantro Mirror Transform", but the components keep jumping to a position to the right. One minute they are correct, the next not. See images.
     

    Attached Files:

  27. SimLoop

    SimLoop

    Joined:
    Jun 17, 2013
    Posts:
    25
    So, UnityFS had a way to incorporate NACA data, will you be adding this?
     
  28. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    Yes it will. Here is it in the inspector, ii'm going to convert it to an editor window next
     
    John-G likes this.
  29. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    Definitely. The components are going to be independent as the Flight simulator components currently are....So all you will need to create a new helicopter will be just your model with the parts correctly separated.
     
    iichiversii likes this.
  30. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    Have you tried creating an "Unbound Left Wing" from the Component Menu? Create a controllable wing first, select the new wing and click select the unbound structure option as show below



    Then adjust the wing as you want. But make sure the "Chord indicators" are lined up i.e red-red, blue-blue.


    P.S Wing color indicators
    Red = Root Leading Edge ;
    Blue = Root Trailing Edge
    Grey = Tip Leading Edge
    Green = Tip Trailing Edge
     
  31. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    Yes i'm almost done with the setup

     
  32. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    Then there is a small cheat to the wing system...To change a right wing to a left wing, change the scale from (x,y,z) to (-x, y, z) ;)
     
  33. gl33mer

    gl33mer

    Joined:
    May 24, 2010
    Posts:
    280
    Sailplanes are gliders. They can be lots of fun. Some have folding motors that can be used in-flight when necessary (for a relatively short duration) others may have motors capable of takeoff. Usually takeoffs are either with a tow rope and a small plane or winch tow from a dedicated ground based device.

    How do you intend to model thermals? there are quite a few other distinct phenomena that are used in gliding such as ridge lift and possibly wave lift that would be interesting to simulate.

    Helisharp has nothing built in to do with ml-agents. Just a simulation library and a unity sample project.
     
  34. gl33mer

    gl33mer

    Joined:
    May 24, 2010
    Posts:
    280
    Regarding the thermals and sailplanes for that matter. They may end up being more complicated to model in a realistic manner than at first glance.

    Here's an example thermal package for xplane10 - just to get into some of the subtleties involved.

    https://github.com/alexferrer/xplane_thermals
     
    Oyedoyin1 likes this.
  35. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    Yes. I can even imagining attaching two planes together (glider and tow-plane)... should be fun;)
    I'll have to do a lot of reading and research to try and come up with a model. But a glider in the current setting will use the normal simulation physics.
     
  36. gl33mer

    gl33mer

    Joined:
    May 24, 2010
    Posts:
    280
    There will be a lot of questions. Tow plane has a wake that needs some kind of modelling (or faking). As for glider behavior you could possibly get a glider pilot to try and see whether it feels right.
    As for the thermals/envior./weather. I'm not sure but you may be better off modelling an interface to the api and allow the individual developers to model their own.
     
    Oyedoyin1 likes this.
  37. gl33mer

    gl33mer

    Joined:
    May 24, 2010
    Posts:
    280
    Oyedoyin1 likes this.
  38. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    Does anyone have any information about the airfoil used on the F-35!?.. Specifically the F35B.
     
  39. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
  40. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    F-35 STOVL System Update
    ///
    Vertical Takeoff

    //
    Vertical Landing

    //
    Hover and Transition to Normal Flight

    //
    Short takeoff in STOVL Configuration
     
    John-G likes this.
  41. Alcyone

    Alcyone

    Joined:
    Nov 15, 2013
    Posts:
    13
    WOW! Impressive! Do we have any chance to test this?
     
  42. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    Not yet. I'm still trying to setup the VTOL controller to handle all possible planes besides the F35 which is kinda difficult because of the F35's uniqueness.
    I'm planning to use the V-22 Osprey to compare and adjust the system :)
     
  43. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    John-G likes this.
  44. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
    Last edited: Jun 14, 2018
    Oyedoyin1 likes this.
  45. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    Last edited: Jun 15, 2018
  46. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    892
    Ermmm, is this available to buy yet, if so how much? :)
     
  47. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    892
    Doh, note to self: Read the first post first!
     
  48. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    892
    I imagine this can work on RC aircraft, so smaller models in the Unity scenes?
     
  49. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    Sure. The size of the model has no effect on the system.... So you can setup any aircraft from the smallest RC to the biggest A380.
    A fully configured MQ-1 predator is included in the package.
     
    khos likes this.
  50. Oyedoyin1

    Oyedoyin1

    Joined:
    Oct 30, 2016
    Posts:
    677
    ##UPDATE

    New Turboshaft Engine and Blade System to power the V-22 Osprey




    //
    Blade System
     
    HeadClot88 likes this.