Object generation utility

  • Stu, another use for pole placement would be restaurant / store signs.

    However, instead of using the oneObject configuration that creates a virtual node at the center of a way / storage tank, the virtual node needs to be offset so the store sign is placed on the perimeter of the way. Would this be an easy tweak to your oneObject code?

    With a library of store sign models (that are lighted at night!), the streets would look a bit more realistic - later we could add animated drive-thru traffic.

  • Would this be an easy tweak to your oneObject code?

    No.

    ... but it will be possible with the upcoming virtualObjects feature.

    Assuming

    - there is appropriate tag data to select buildings of interest

    - the first point of the way is consistently defined wrt road frontage or desired sign location.

    A virtualObjects specification element with fixed (or small random range) starting distance and a very large spacing would export a single object at the starting distance along the way.

    The offset could be configured or hard coded in the model.

    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

  • Released version 0.6.0 ObjectGen

    Main feature is the virtualObjects capability.

    This will export objects along a way at a fixed or random spacing with a configurable offset from the path of the way.

    The obvious example is randomly spaced traffic along a highway. Oh, it must be construction season because we have construction markers on the lane divider line.

    This scene was generated with the example.xml in the release package. The scenario is expecting Rodeo's new car library to be available in the objects folder.

    As usual check out the readme and UserGuide for details of the new features.

    cheers

    Stu

    PS

    The construction markers are not just a joke. They give a useful indication of how well the ways align with the center line of the highway feature.

    In the screen shot above they align quite well, but in other sections they deviate by several meters and the traffic wanders off the road. You may need to tweak the highway feature alignment in your OSM editor.

    PPS

    wait till you see Rodeo's cars at night.:thumbup::thumbup::thumbup:

    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

    Edited 2 times, last by lenidcamper: ps (April 8, 2019 at 1:51 PM).

  • We have hundreds, maybe thousands of waste treatment plants similar to this all over the USA. Sound like your new program could generate the large clarifiers with the rotating arm.

    Regards,

    Ray

  • I added the FORrotationOffSet attribute in version 0.6 to correct what I assumed would be an infrequent problem of models defined in a non standard frame of reference.

    It turns out there is some unanticipated functionality available with this attribute. It gives a way to tackle the parking lot scenario.

    There were no appropriate OSM features already defined for parking lots, so I added ways down the center lines of the parking rows and tagged them parking="double_row"

    With appropriate tweaking of spacing and offsets and using a FORrotationOffset of 90 I got what I think is a reasonable representation of a parking lot.

    A slightly sparse random mapping (without buses and trucks) leaves some empty spaces.

    PS

    Will update next release to not export nodes with blank model names to support sparse mapping scenario

    but avoiding "..\..\..\..\objects\.tmb' not found)" messages in tm.log

    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

    Edited once, last by lenidcamper: ps (April 9, 2019 at 5:30 PM).

  • Wow. This just keeps getting better and better. Populated parking lots are some of most visual things we see when flying low and slow. Sometime even when flying faster and higher.

    Thanks for all this creative work.

    Ray

  • A very good idea, Stu.

    I placed a lot manually along a line. Then I inserted an orientation angle in the toc file with text editor.

    Different groups for straight and diagonal parking.
    But this is of cause the more elegant way!

    Question: Is it possible to insert a small optional random factor for the front/rear position on the line?

    Then it does not look so synthethic and more natural, as no one is always parking strictly to the front line ;)

    Ii means to simulate this:

    Cheers, Thomas


    Edited once, last by TomSimMuc (April 9, 2019 at 6:28 PM).

  • no one is always parking strictly to the front line

    The spacing can be randomized slightly.

    The offset could be a min max. Even for highway traffic the vehicles don't always stay centered in the lanes.

    Then of course we need a orientationMode of Random to give a mix of nose-in / node-out.

    Although in NA 95% of people park nose-in unless they can pull through.

    Or convert from orientationMode enum to orientationSense value

    100 => 100% Forward

    50 => 50/50 mix

    0 => 0% Forward ( ie 100% Reverse)

    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

  • Stu, while you're on a roll, any creative solution for the car traffic at intersections?

    Maybe tag a small area around a traffic_signals node as a "parking lot" but with the lighted cars parked like a train. Small streets would get a single train while major intersections would get 3 lanes of traffic at the intersection.

    The streets of NYC would look busy at night!

  • any creative solution for the car traffic at intersections?

    Variable density at intersections is pretty far down the list.

    There are more significant issues to deal with for crossing ways.

    Even in the motorway scenario there is the problem that there is no easy way to detect that the crossing way is actually an overpass (flyover) and no vehicles should be placed at the crossover unless it is a rail underpass then it is ok. A crossing line algorithm would be pretty slow for a node set in the thousands.

    At street intersections there is the problem of 2 lanes becoming 4 lanes without any change in the OSM way.

    Or a 4 way stop intersection with multiple turning lanes tagged (and drawn) as a roundabout.

    That is on top of the general way misalignment to highway center line issue.

    There are limits to the realism of vehicle cultivation without extreme efforts on the processing side and a lot of tweaking of the OSM data

    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

  • can you introduce an empty parking lot factor?

    You don't need dummy map entries.

    If you set the default model name to empty string and set the upperLimit on the random tag to be appropriately larger than the number of (real) entries in the model map, when there is no match in the model map the empty default model is exported.

    In v0.7 the [tmsimulator_scenery_object][element] will no longer be exported if the model name is blank (to avoid the "..\..\..\..\objects\.tmb' not found"messages in the TM.log)

    I had assumed that the default model was fail safe and would always exist , but that is no longer the case.


    Maybe when Jeff is farther along with vehicle animation

    the preview of Aerofly Life is very interesting.

    It may make ObjectGen traffic redundant.
    No indication yet of how the traffic is defined or how easy that will be for large areas.

    The same issues of multiple lanes and intersections need to be addressed.

    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

  • Stu, I noticed your generated TSC files have objects with the same element [0] value whereas IPACS files have increasing element numbers for objects in their TSC and TOC files. I'm guessing the element number is optional, do you have any other insight?

    ObjectGen example ... <[tmsimulator_scenery_object][element][0] #nodeid = virtual

    Also, iIs the autoheight_override an option in the WayConfiguration or NodeConfiguration? It looks like it defaults to -1m below ground (I guess to avoid floating pylons) but was curious if it can be defined in the configuration like orientation is.

    ObjectGen example ... <[int32][autoheight_override][-1]>

    When I experimented with a lighted baseball field (using the OneObject configuration), I noticed the textured field was partially sunken into the ground. At the time, I fixed it by floating the SketchUp model above the origin but now I realize it was probably the [-1] override that caused it.