Skip to content

3D objects placement

32kda edited this page Mar 6, 2020 · 6 revisions

Objects chosen by polygon size (since 4.1.0)

Since 4.1.0, 3D object placement logic was improved For now, you don't need to add each model manually to the rules. By default, ~50 models for houses are placed into xplane/objects/house folder. Besides house, following types (and corresponding folder names) can be used:

xplane/objects/block - for residential buildings/living blocks

xplane/objects/industrial - industrial buildings

xplane/objects/social - schools, hospitals, universities

xplane/objects/shop - shops, supermarkets

xplane/objects/mall - malls, department stores

xplane/objects/office - office buildings

xplane/objects/house - houses, detached homes

xplane/objects/garage - garages

Models placed in given folders should have _NxM part in file name specifying model length and width. Example: house_10x12.obj. Starting from 4.5.0, height is also supported, in such case model name should have h postfix with height after the size definition. Sample: house_10x12h6.obj. Of course, the size on the map would almost never be so exact. Default tolerance for the model by size selection is 10%, but you can change it on 3D Objects tab, under Object by polygon selection options Since 4.5.0 you can also configure height tolerance under the same section. By default, height tolerance is 30% and if the difference is less than 6m - the model is considered suitable. Second option there is a max perimeter, which would always be simplified to rectangular shape when selectiong model - since model can be selected by size only for rectangular polygon, and user most likely wouldn't care too much about small houses exact shapes.

Big thanks to user Lenya69 from forum avsim.su for creating several houses models. Other house models were taken from WorldModels library.

Objects choosed by rules (since 2.x)

Rules configuration page looks like the following:

Object rules

Objects rules - osm tags is a list of tag key/value pairs, for which we want to provide 3D models. id on the screenshot is a special value - it's not a tag, but unique osm entity (node, way, relation) id. If the rule is id-based, all size conditions will be ignored. The most useful case is inserting some unique buildings (monuments, historical buildings, large malls, etc.) using such rules.

Angle tab

Object rules

Here you can specify the building angle.

  • Random angle - use a random value
  • Polygon angle - calculate angle by polygon
  • Fixed angle - use specified value (true bearing). This one is good for using together with id-based rules

Advanced options

Object rules

  • Only simple polygons - rule can be applied only for 4-sided polygons
  • Primary & secondary wall min/max size - size bounds for primary and secondary walls. If the only primary is specified, it would be checked against all walls.
  • Area conditions - min/max area

Objects list with heights (since 4.1.0)

Object rules

Now you can specify several models having postfix like _100m specifying this model height. If corresponding osm entity has height or levels tag - OSM2XP will try to select a model with height closest to the given one. If no height is provided, first model from this list will be selected