XP2AFSAirportConverter Progress (Automated Airport Generation)

  • I like it when people show work in progress of stuff they're messing around with, so I thought I'd show where I am with my new tool XP2AFSAirportConverter.


    I took a bit of time away from AeroScenery to look at converting open source airport data from "another flight sim" into a 3D model that could be brought into AFS.


    I spent a few evenings writing parsers for all the "other sim" data types. Boring code to write, but once done I had a clean object model of an airport.

    I then started writing a tool that compiles a 3DS Max Python Script to draw each airport.


    Things are pretty rough at the moment, but interesting enough to show some screenshots. My spline renderer isn't right in all cases, leading to occasional weird shapes.

    I'm using four airports to test, with increasing levels of complexity:

    • Cardiff, UK (my home airport, I know what it should look like)
    • Manchester, UK (also well known to me)
    • Portland US (interesting crossing runways)
    • Chicago US (doesn't come much more complex)


    I've done some basic work on automating textures and a UVW Unwrap on the runways to prove it was doable, but nothing else is textured yet.


    To be clear, this tool will draw any airport in the world, not just these four.


    Hopefully at some point I can get the output of this directly playable in AFS.

    I may do a phased release of world airports starting with runways, then taxi ways (if possible), then buildings (if possible)


    For now, I'll do a bit more work on AeroScenery as the code behind this has made my brain hurt :S



    Cardiff



    Manchester




    Portland




    Chicago



  • Wow. Absolutely mind blowing potential here. I guess the big advantage is the final product will generate a recognizable airport with the correct runways, ramps, taxiways, terminals, etc. How exciting. Thanks for the early look.


    Regards,

    Ray

    A good test might be LAX, Denver, Miami or JFK. All of these have IPACS' best work for large airports so you could compare your project output with the existing DLC airports when running AFS2. Of course, the Orbx version of Chicago never made it to the download desk.


    Regards,

    Ray

  • This looks quite promising. Would be great to generate airports without the need of additionally and expensive software!

    In which language are you coding this?

    It's C# that generates a Python Script (from a template) for 3DS Max.


    I don't think this will be an end-user tool, although I'll make it available.

    If I can get the end result to a useful level, my intention is to generate all 28k airports as AFS files and make them available for download.


    Would be great to have an IPACS plugin for recent Max versions (hint, hint) ;). New versions have the Python support that I need for this. I'm currently having to save as a 2016 file and switch to that for export.

  • Which 3DS Max plugin version do you need?

    My latest is 2017 I believe

    IPACS Development Team Member

    I'm just a cook, I don't own the restaurant.
    On behalf of Torsten, Marc, and the rest of the IPACS team, we would all like to thank you for your continued support.


    Regards,


    Jeff

  • Which 3DS Max plugin version do you need?

    My latest is 2017 I believe

    I think more and more people have subscriptions now and are always on the latest, so ideally 2019.


    For whatever reason, I can't get 2017 to run on my machine due to a bad install, hence using 2019 then 2016 to export.


    I think it's only a case of changing a constant or a header reference to support a new Max version since the API calls that the plugin would use are well established.

    In this case you guys might as well compile for new Max versions and mark them as 'beta' even if you can't test them directly. It's 99% likely it'll work. If not users with Max subscriptions will let you know!

  • Hi Nick


    I am really impressed by your work and dedication for Aerofly FS2 and your ongoing support in this forum. A big portion of a flightsim's success is based on the engagement of people like you. Thank you very much!

    Best regards,

    Thomas


    i7-6700K @ 4.0 GHz, Geforce GTX 1080, 32MB RAM, 500 GB SSD, 1 TB SSD, 1TB HD, 32" Monitor 4K, Oculus Rift

  • Fantastic Job Nick, it looks very promising !


    A question though, do you plan to manage the base mesh too, for these airports to get integrated to AFS2?

    That's currently one of the tricky parts in AFS2 airport design.


    Cheers

    Antoine

    Config : i7 6900K - 20MB currently set at 4.00GHz, Cooling Noctua NH-U14S, Motherboard ASUS Rampage V Extreme U3.1, RAM HyperX Savage Black Edition 16GB DDR4 3000 MHz, Graphic Card Gigabyte GeForce GTX 1080 8GB, Power supply Corsair RM Series 850W, Windows 10 64 bit.

  • A question though, do you plan to manage the base mesh too, for these airports to get integrated to AFS2?

    Yeah, good question, it depends what comes out of testing...


    I do have data on the airport boundary, so I could create a base mesh. What I can't do very easily in an automated way is the carving out of the runway and pavements, then selecting specific faces to apply runway and pavement textures.


    I've seen airports without a base mesh, where the (single) "runway" model in the TSC is just the group of polys for the runway(s) and pavement areas. These seem to work OK, so that's my preferred approach at the moment.


    If doing that messes up the mesh smoothing algorithm as the outline geometry is too complex, plan B would be to create a simple base mesh, but use a transparent texture. Presumably mesh smoothing would then take place on the whole wider area.


    The mesh smoothing definitely has problems when you have multiple runway definitions in the TSC file and they overlap or are near each other, but that wouldn't be the case here.


    Ultimately these airports will never be as optimised or the quality of a DLC airport, but I'm hopeful I can get them "pretty good".


    If people want to build optimised (freeware) airports on the back of the output of this tool they can get the Max scripts or files and have a project 70% done, ready to hand-tweak.

  • I've seen airports without a base mesh, where the (single) "runway" model in the TSC is just the group of polys for the runway(s) and pavement areas. These seem to work OK, so that's my preferred approach at the moment.

    That's one of the issues actually with current FSCloudport AD : it doesn't work unless the terrain is already very flat, and you can only taxi on the runway.


    I've been trying to superpose a flatten polygon (= mesh designed as XX__airport__oustide) and an FScloudport AD, but they don't fit :

    Either I declare both of them as ground in the TSC file and they fight for display, or I define the FSCloudport runway as an object and it gets totally flat, while the flattened terrain is still curvy.


    Not tested intensively though... has anybody found a way of doing it ?


    Cheers

    Antoine

    Config : i7 6900K - 20MB currently set at 4.00GHz, Cooling Noctua NH-U14S, Motherboard ASUS Rampage V Extreme U3.1, RAM HyperX Savage Black Edition 16GB DDR4 3000 MHz, Graphic Card Gigabyte GeForce GTX 1080 8GB, Power supply Corsair RM Series 850W, Windows 10 64 bit.

  • That's one of the issues actually with current FSCloudport AD : it doesn't work unless the terrain is already very flat, and you can only taxi on the runway.

    The runway itself is flattened though isn't it? Just not the rest of the airport because there's no geometry for it.


    I'm going to guess that the mesh smoothing algorithm of AFS gets the bounding box of the runway model defined in the TSC applies a padding to the edge and then normalises the base mesh under that.


    If the runway model (terrible naming, it's really the airport ground model) in the TSC contained all the runways, taxiways and aprons, the mesh smoothing bounding box would cover the whole airport by default. This would be the case for what I'm doing.


    That's my theory anyway, based on zero testing so far ^^

  • With my Ac3D approach i make a mesh that's rectangular and big enough for all polys. The AC3D trick is to call it something__airport_outside (hmm i think, i'm away from my pc) and then it gets a one level of smoothing. Cut out of that mesh using boolean knife and cut away are the runways with a stronger level of smoothing as these have __airport_runway (again, i think)


    I think i could save one of my airports in some sort of 3dsmax format for you to look at.