Object generation utility

  • I did some tests with the tool over the weekend in relation with aerial ways. Great tool and it worked fine. The only problem I have is with this 'relativePathPrefix' thing. I had the objects on another drive than the scenery. This was shown correctly in the tsc but the models were not found:

    (tsc)

    <[string8][geometry][D:\osm2AFSobject\objects\AerialWays\Lift_Tower\lift_tower]>

    it only worked when I moved the objects folder into the same folder as the tsc and changed manually the tsc entries to:

    <[string8][geometry][\objects\AerialWays\Lift_Tower\lift_tower]>

    Is it not possible to have the objects on another drive?

    Regards,

    Thomas

    i7-14700KF @ 5.6 GHz, Geforce RTX 4090, 32MB RAM, 1TB SSD M.2, 1TB SSD M.2, 2TB SSD M.2, 32" Monitor 4K, Pimax Crystal

  • I finally got around to using PylonGen, perhaps I ran into a glitch? I started fresh with the OSM data using JOSM and tested some smaller tile power line areas. After converting OSM and generating the TSC I noticed that not all Pylons were generated, all Keys and Values looked good. I figured I should try again and download the same area in smaller sections, I was successful generating short small areas with 8-15 Pylons (4-8kb file size) and only successful one time generating 100 or so Pylons (48kb files size). Long story short, it seems PylonGen doesn't always convert every power line with the given OSM data. Anyone else?

    Example: All the color dots are pylons in OSM data but only the pylons displayed in Red dots were generated.

  • Is it not possible to have the objects on another drive?

    This appears to be inherent in the AFS2 scenery loading mechanism.

    In the core AFS2 distribution there is an objects folder at the same level as scenery that contains pilot models and a few other objects. The pilot models are are referenced in the aircraft TMC files by model name only , so there is a concept of "well known location of objects" for pilots at least.

    The airport scenery objects always seem to be co-resident with the TSC file for that airport.

    The [geometry] directive in the TSC will resolve a relative path so models can be packaged into folders. I extended that concept with the relativePathPrefix so the objects folder can be moved up in the folder hierarchy to be shared across different scenery packages with easier specification of the object paths in the XML.

    osm2AFSobjects cannot support explicit object paths unless it is allowed by the core system.

    See the osm2AFSobjects User Guide for more discussion on relative paths.

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10

  • it seems PylonGen doesn't always convert every power line with the given OSM data. Anyone else?

    a) PylonGen has been deprecated. osm2AFSobject has equivalent functionality (and more) and is the current support stream.

    b) check that the tags are correct on the power line way and pylon nodes that do not get exported.

    If it still fails with osm2AFSobject send me the configuration XML and coordinates of the offending feature (by conversation)

    /Stu

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10

  • As long as all configuration files comply with the schema (pass validation) they will be parsed and processed correctly

    Hi Stu,

    I tried to add a Churches scenario.

    They seem to exist in a way or node definition, here way:

    I copied the code from the tank scenario and adapted it.


    However I get an error message:

    Cheers, Thomas


    Edited once, last by TomSimMuc (March 4, 2019 at 3:03 PM).

  • However I get an error message:

    I'm afraid my Germain is not good enough to parse the error message.

    Was the wayConfiguration you added after a nodeConfiguration?

    I want to change it to an unordered list of configurations but but the relativePathPrefix must come first. I need to find the right schema declaration or load the config file in a different way.

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10

  • Yes, the definition before was the tank node definition.

    Rough translation:

    Validation error: The element osm2AFS in Namespace urn: - schema has an unvalid sub-ordered element 'wayConfiguration' in Namespace urn. Expected was the list of possible elements: Nodeconfiguration in Namespace urn_osm2AFSobject - schema

    Cheers, Thomas


  • Validation error: The element osm2AFS in Namespace urn: - schema has an unvalid sub-ordered element 'wayConfiguration' in Namespace urn. Expected was the list of possible elements: Nodeconfiguration in Namespace urn_osm2AFSobject - schema

    OK

    All way configurations must come before any node configurations until I find a way to relax the schema.

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10

  • THANK YOU!!!

    That did the job:

    Do you think you can implement a mechanism, that if 10 churches are defined as possible model, that the algorithm is selecting one of them per random

    if "building" = church is detected in the OSM data?

    Cheers, Thomas


    Edited once, last by TomSimMuc (March 4, 2019 at 7:29 PM).

  • Cooling towers via XML

    The ScenProc definitions needs to be reworked to automatically exclude Cooling Towers and Churches with the below code:

    Code
    # LOAD OPENSTREETMAP DATA of the area to work on
    ImportOGR|@0@|*|*|NOREPROJ
    #ImportOGR|f:\Geoconvert\Out\8500_AC40_Ling.osm|*|*|NOREPROJ
    
    AddAttributeIfInside|building="church"|*|String;skip|yes
    AddAttributeIfInside|building="cathedral"|*|String;skip|yes
    AddAttributeIfInside|building="*" AND man_made="tower"|*|String;skip|yes
    AddAttributeIfInside|building="*" AND man_made="storage_tank"|*|String;skip|yes
    UnloadFeatures|skip="yes"

    Cheers, Thomas


    Edited 2 times, last by TomSimMuc (March 5, 2019 at 4:24 PM).

  • drhotwing1 (IPACS) March 4, 2019 at 10:13 PM

    Changed the title of the thread from “Powerline model Utility” to “Object generation utility”.
  • Hi Tom - great stuff. Are these sketchup models? I am working on farmhouses and mountain cableways/chair lifts but not very happy with the models I got from sketchup.

    Regards,

    Thomas

    i7-14700KF @ 5.6 GHz, Geforce RTX 4090, 32MB RAM, 1TB SSD M.2, 1TB SSD M.2, 2TB SSD M.2, 32" Monitor 4K, Pimax Crystal

  • When necessary I did replace colours by textures. But the problem is more that the bigger pylons for the lifts do not look good when in Aerofly, very bright on the sunny side, almost white from the distance. These are the kind of problems I have. I am sure I will find solutions even if I have to build the models myself. To be honest I do not have much experience with 3D programmes.

    Bigger models like castels cannot be transferred into Aerofly as easy as I would wish. Rodeo was so kind and helped me. But I saw that quite some 3D knowledge is needed to correct the problems with these models, in his case AC3D. Hence start with learning 3D programm stuff.

    Regards,

    Thomas

    i7-14700KF @ 5.6 GHz, Geforce RTX 4090, 32MB RAM, 1TB SSD M.2, 1TB SSD M.2, 2TB SSD M.2, 32" Monitor 4K, Pimax Crystal

  • Same for me Thomas. I only worked a bit with Sketchup_make and ModelconverterX.

    It's a hit or miss if a model works or not for me.

    Indeed Rodeo has much more experience here.

    Finally we have to build up a public domain library of objects, which can be distributed.

    Only that way, a scenery which is made with osm2AFS can be given to others.

    Cheers, Thomas


    Edited once, last by TomSimMuc (March 5, 2019 at 8:53 PM).

  • I can't help with AC3D, but sketchup is not problem for 3D for me, so don't hesitate to ask. Textures in Sketchup are a bit tricky when used for FS2, but we'll get to it when we get there.

    If someone could please confirm that FS2 still doesn't recognize the alpha channel (meaning transparent textures are not recognized). With alpha a pylon could be a few polygons (as long as no one wants to fly through the mesh), without alpha it's quite a few more, but we should still be able to do with very low count in FS2 standards.

    Anything specific to be modeled, find a good hi res pict, preferably with some 90deg reference (road, building corner, etc..) and I can model with a single known dimension (sometime I can pick it from google earth)

  • Just uploaded a new version of osm2AFSobject

    Major change is the ability to use animated object models wherever a model can be specified.

    There is a schema change involved so see readme.txt for details

    v0.2 also contains test.xml and test.OSM to demonstrate generation features independent of any specific scenery.

    /Stu

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10