3D Tiles

From Maria GDK Wiki
Revision as of 13:20, 23 September 2021 by Mbu (talk | contribs) ()
Jump to navigation Jump to search

From version 4.2

Maria Map Maker is capable of importing, rendering and editing 3D models from a variety of sources. The format used for storage is 3D Tiles. A collection of models in the 3D Tiles format is called a 3D Tileset, and contains all information about geographical position, textures and transformations to correctly place and render a model on a 3D globe.


Import

M3 import 3DTiles.PNG

Importing models is handled by the library assimp. A full list of supported formats can be found at https://github.com/assimp/assimp/blob/master/doc/Fileformats.md, however many of the formats have not yet been tested in Maria Map Maker. The imported 3D tileset will consist of the models themselves in the format b3dm, as well as texture files, and several text files which define the position, and relationships between the models.

Parameters

  • 3D Tileset - Choose an existing 3D tileset as a destination for the model, or create a new tileset.
  • Model - Choose an existing model as a parent for the current import, or define it as a top-level model.
  • Compress textures - Compress textures into a DirectDraw Surface container file. This reduces file size, but should not be used if you intend to use the tileset in the Cesium platform, as it's not supported there.
  • Auto place - Attempt to find geographic position for the model in the source files.
  • Latitude / Longitude / Elevation - Manually enter position and elevation for the placement of the model. Only used if "Auto place" is disabled or unable to find geographic position in the source files.
  • Unit select - Unit in the source data - meters or feet.


3D Tileset editor

Navigation

When you open a 3D tileset, Maria Map Maker will enable 3D mode, which will render the background map on top of the highest resolution elevation data available in your workspace (or external sources). There are several ways to navigate the 3D environment:

Movement Mouse / keyboard
Move camera along the surface Left mouse button on the terrain / keyboard arrow keys / WASD keys. Hold Ctrl to move slower.
Tilt and rotate camera around a point Right mouse button
Move along the camera direction Mouse wheel up/down

Model hierarchy

The 3D tileset is represented as a hierarchy of models. Double-click any model in the hierarchy to open its properties.

You can delete models from the tileset by right-clicking it and selecting "Delete". You can import a new top-level model with the "Add" button, or you can create a sub-model by right-clicking a specific level in the model hierarchy and clicking "Add model from file".

M3 3d tileset submodel.PNG


Model placement

M3 3dtiles model properties.PNG

An important feature of the 3D tileset is that any translation or rotation of a top-level model will also apply to all is sub-models. To adjust the placement of a model, double click any model to open its properties. The top bar of this window gives you a few convenient buttons:

  • Camera to Model - Move the camera to the position of the model. Only the position of the camera is moved, not the altitude.
  • Model to Camera - Move the model to the position of the camera.
  • Place on Terrain - Calculates the average height of the model and places it on the terrain at the current position

A top-level model's placement on the globe is defined by geographical coordinates (latitude and longitude) and an altitude above the surface of the globe. Vertical datum is not considered. It is possible to enable offset on a top-level model, in which case the offset will be in relation to the values in the Position/Altitude fields.

The position and altitude of a sub-model is only defined as an offset from its parent model.

The following table shows how models can be placed, offset and rotated in the 3D environment. The method varies according to whether the model is at the top level or a sub level.

M3 3dtiles duck widget.PNG
Action Model level Mouse / keyboard
Move model in any direction along the surface Top level Ctrl + Left mouse button on the model. Holding Shift as well increases precision.
Move model up and down Top level Ctrl + mouse wheel up/down. Holding Shift as well increases precision.
Offset model along X,Y, or Z axis Top level or sub-level Left click the arrow components of the model widget
Rotate model about X,Y, or Z axis Top level or sub-level Left click the circular components of the model widget



The model can be scaled by a user-defined scale factor. This is mostly relevant for instanced models - for instance vehicles which are placed around the 3D environment for added realism.