Object generation utility

  • I have seen examples of TSC files with enumerated [elements] and with [0]

    I assumed the scenery loader needs to merge [element] entries from multiple TSC files into an internal list anyway so enumeration does not seem

    to be particularly relevant. Since it works without enumeration I did not bother to add it.


    As for the [autoheight_override] I am unclear on the interpretation. I forget where I copied the original snippet for the template but it did have [-1]

    Models I have placed at zero elevation in Sketchup seem to render at grade level with it set to [-1] (or [10] ) so I left it at [-1]


    For an object model with larger area, if there is a slight slope in the elevation data one edge may be floating or depressed.

    I had to extend the pylon piers well below grade to avoid floating pylon legs on steeper grades


    If [autoheight_override] is set to [0] only XREF objects will render (no user defined objects).


    As with the element index the autoheight_override did not seem broken so I did not fix it.


    Changing the default values is easy if there is a "correct" answer.


    Adding an optional model configuration element is more work so I would need to see good justification for the change.

    The models I have converted worked fine with a zero elevation in Sketchup and autoheight_override of -1


    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

  • Thanks for the feedback Stu. When I did the TSC files for the radio towers in South Florida, the [autoheight_override] line wasn't included and everything still worked - another piece of the puzzle/mystery.


    Leaving the element [0] is good to know and simplifies things.

  • Uploaded version v0.7 of ObjectGen


    The main feature is XREF library support.

    There are some schema changes to support this.

    There is a standalone xmlConvert utility to migrate locally modified configuration files to the current schema.


    See the readme and User Guide


    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

  • For an object model with larger area, if there is a slight slope in the elevation data one edge may be floating or depressed.

    I had to extend the pylon piers well below grade to avoid floating pylon legs on steeper grades

    Well actually for such an example it'd be better to build the models with "legs". If we build the pylons with like a concrete rectangular or pyramidal leg underneath each foot, then they can be implemented at regular height, and the concrete footing will be more realistic too. We could have 2 versions, one with feet, and one without for flat land if that helps too, although I don't think 16 more polygons make a big difference.

    Same principle applies to many things, including houses. We could build a bottom as a concrete block, or some wooden pile structure. When on slopes then the structure would show. Cars will be more of an issue, we need a roll and pitch angle. Boats won't be an issue ;)

    My 2 cents.

  • Congratulations Stu,


    you developed a well thought through object definition. It contains all necessary direction and randomizing features I ever wished.


    Together with your examples they give a helpful directive how to uses them.

    Once I got home from my holliday I am eager to try them out.


    Also the new xref model class for sure will give great new possibilities to play with!


    Cheeers,

    Thomas

  • Stu,

    I just wanted to say thank you for your ObjectGen with this picture.

    It uses the xref objects. They are extremely well in the near view!


    I am able to make such good looking sceneries. Impossible without it.

    Sorry for my long pause - I was very busy with the Turkey Point project.




    Also good for mooring boats in a row ...


  • It is possible with the current release of ObectGen to place a building object at the "midpoint" of a building footprint.


    As with the scenProc FLENGTH the wayLength derived tag could be used to distinguish residential vs commercial.


    The random tag could be used to mix model types.


    Currently the objects would have random orientation.

    It is difficult to derive a meaningful orientation for an arbitrary polygon. If the way has 5 nodes it is a square or rectangle and an axis of orientation could be derived. But few houses are simple rectangles (particularly in NA housing developments).

    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

  • Yep. Lots of reasons for find another solution for houses. Thanks for the discussion.


    Ray

    Hi Ray,

    That's why I use block data(land parcel), build a polygon within the the block (various sizes), street align the polygons.

    The second method, I use address points, create a polygon around address point (various sizes) and then align polygon with street.

    Windows 10 64bit | iCore7-7770K| ASUS STRIX Z270E |KHX2400C15D4 - 32GB | Gigabyte Ge-Force GTX 1080Ti| SSD Intel 520 Series | 40" Philips BDM4065UC/75 4K - Oculus Rift

    Edited once, last by Kloot ().

  • Stu,

    could you please implement a command to set the name of the file(s) to save?

    Expecially since you generate a tsc AND a toc file. Renaming via script is no longer possible, as the tsc would not find its toc file anymore.

    And as every tsc must have a unique file name, it would be quite needed.

    As It is mostly called by a batch file, an optional argument %2 would be very handy.

  • command to set the name of the file(s) to save?

    I overlooked the embedded name issue with the TOC.

    Since I use tile based cultivation with a folder for each tile, renaming was never an issue for me.


    No problem to add the output file name argument.

    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

  • Updated ObjectGen with v0.7.1


    Minor release

    • Allow output file name as optional command line argument
    • Add support for negation of sparse tags eg ($highway == 'primary') #AND# ($tunnel #NEQ# 'yes')

    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 Stu for the name parameter - it works easy and good.


    I have a request for parking density:

    In city you often have different density of parked cars, depending from the distance of the city core or a specific highlight.

    In the OSM parameters I could add an attribute to a parking_line, like parking_density 0.8 (for 80%).


    Could you implement a parameter, which controls the density depending from this OSM attribute?


    Currently we control it about a count, higher then the existing number of models.

    If we multiply the model count with the density factor, could it already work?


    Could you give an example?


    Stu, I had a complaint from a MAC user, that my sceneries are not compatible.

    He found out, that backslashes "\" are not understood and that he needs a "/" instead.

    In windows both versions seem to work.


    What do you think, to use in your future versions (examples and manual) the "/" instead?


    See also:

    https://softwareengineering.st…aths-with-a-simple-replac

  • Under Windows \ or / might both work and it does also not distinguish between capital letters and lower case letters in file names. This is where a lot of user sceneries break, because of the upper and lower case differences. If you are developing any kind of content for aerofly, please stick to lower case only otherwise Mac users and maybe even Linux, Android and iOS users won't be able to use it.

  • could it already work?

    There is currently no way to specify arithmetic operations on tags. The XSharper expression engine has that capability. I only exposed what was needed for boolean selection expressions.


    I need to think about a generic way to expose this.

    Under Windows \ or / might both work

    I had not placed any attention towards platform independence. I can update examples and documentation to forward slash and lower case.

    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

  • I have a request for parking density:

    Thomas


    I have looked at the parking density issue. Adding a computed parameter is possible but is a can of worms I would rather not open right now.

    Particularly since there is a work around for this issue.


    All it requires is separate configurations for the few (3? 5??) different parking densities.

    Each configuration would have a selectionCondition expression with the appropriate parking_density value and randomInteger upperLimit.

    Using sharedModelMaps there will only be a dozen lines for each configuration.


    If there is a scenario that cannot be solved without numeric tag operations I can look at the issue again.


    /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