Skip to content
Shane Saxon edited this page Jul 18, 2020 · 10 revisions

Media Asset Types

  • 3D Models
  • Texture Maps
  • CSV, JSON & MySQL

3D Models

3D Models (3DS, OBJ, STL, PLY, COLLADA...) are IMPORTED using the ASSIMP library:

http://assimp.sourceforge.net/main_features_formats.html

Models placed in the 'usr/global/models' folder are added to the geometry_id ('O' key) list at startup. You can also use the File Dialog ('L' key) to load models and auto-assign to the current node(s). At this time we support basic geometry mesh hierarchies and a single texture map per models file.

First Header Second Header
Content from cell 1 Content from cell 2
Content in the first column Content in the second column
[np_models]Native-Tables#np_models) table fields:
  • np_models_id row id is referenced by parent_id.
  • parent_id specifies the models_id object hierarchy, 0 for root objects.
  • geometry_id per object, starts at 1001 (lower id's are reserved for primitives).
  • topo_id defines topology and (if missing vertex normals) type of texture coords.
  • texture_id links texture map files using the np_texture table.
  • center XYZ is auto-calculated using a bounding box.
  • rotate XYZ is manually set in the np_models table using KML Model Orientation.
  • scale XYZ is auto-normalized to fit into a 2 unit cube.
  • flags set the import filter, ie: "GTXXXXXXXXXX" will load (only) geometry and textures.
  • object name in the models scene file.
  • file name.
  • path location.

Tip: You can re-generate the (bounding box) scale and (geometric) center by setting the x/y/z scale to zero (in np_models table). Note that at draw time, grid objects are scaled to fit the grid extents (and it is assumed the geometry is normalized).

Texture Loading File Search Order:

  • First it tries the path specified in the 3D models file.
  • Then it checks if the texture is in the same folder as the models file.
  • Lastly, it searches the default 'usr/global/images' texture folder.

See np_texture table for image processing: crop, scale, rotate....

Future planned import flags are "GTKSNMPGLCAT" for: Geometry, Textures, Kinematics, Shading, Nurbs, Morphing, Particles, Geolocation, Lights, Cameras, (track) Animation and Tags. At this time, we only import geometry and its texture map, so "GTXXXXXXXXXX" are the current default flags.

Future feature to EXPORT entire scene to a GLTF or COLLADA file. We plan to map our topo hierarchies to GLTF bones (and/or COLLADA kinematics) tree structures with closed (link) loops. Eventually, add track animation and support for shaders, geolocation, tags, etc. We intend to support export/import to 3D modeling programs (Blender, 3DS Max, etc.) and some GIS systems (such as GeoFusion) or view in a standard web browser using WebGL+GLTF.

Note there are millions of paid and free models available on the web.


Texture Maps


CSV, JSON & MySQL

Clone this wiki locally