Open Geospatial Consortium |
Submission Date: 2018-03-20 |
Approval Date: 2018-08-27 |
Publication Date: 2018-12-19 |
External identifier of this OGC® document: http://www.opengis.net/doc/BP/CDB/openflight/1.1 |
Internal reference number of this OGC® document: 16-009r4 |
Version: 1.1 |
Category: OGC® Best Practice |
Editor: Carl Reed |
Volume 6: OGC CDB Rules for Encoding Data using OpenFlight |
Copyright notice |
Copyright © 2018 Open Geospatial Consortium |
To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ |
Warning |
This document defines an OGC Best Practices on a particular technology or approach related to an OGC standard. This document is not an OGC Standard and may not be referred to as an OGC Standard. It is subject to change without notice. However, this document is an official position of the OGC membership on this particular technology topic.
Document type: OGC® Best Practice |
Document subtype: |
Document stage: Approved |
Document language: English |
License Agreement
Permission is hereby granted by the Open Geospatial Consortium, ("Licensor"), free of charge and subject to the terms set forth below, to any person obtaining a copy of this Intellectual Property and any associated documentation, to deal in the Intellectual Property without restriction (except as set forth below), including without limitation the rights to implement, use, copy, modify, merge, publish, distribute, and/or sublicense copies of the Intellectual Property, and to permit persons to whom the Intellectual Property is furnished to do so, provided that all copyright notices on the intellectual property are retained intact and that each person to whom the Intellectual Property is furnished agrees to the terms of this Agreement.
If you modify the Intellectual Property, all copies of the modified Intellectual Property must include, in addition to the above copyright notice, a notice that the Intellectual Property includes modifications that have not been approved or adopted by LICENSOR.
THIS LICENSE IS A COPYRIGHT LICENSE ONLY, AND DOES NOT CONVEY ANY RIGHTS UNDER ANY PATENTS THAT MAY BE IN FORCE ANYWHERE IN THE WORLD.
THE INTELLECTUAL PROPERTY IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE DO NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE INTELLECTUAL PROPERTY WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE INTELLECTUAL PROPERTY WILL BE UNINTERRUPTED OR ERROR FREE. ANY USE OF THE INTELLECTUAL PROPERTY SHALL BE MADE ENTIRELY AT THE USER’S OWN RISK. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ANY CONTRIBUTOR OF INTELLECTUAL PROPERTY RIGHTS TO THE INTELLECTUAL PROPERTY BE LIABLE FOR ANY CLAIM, OR ANY DIRECT, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM ANY ALLEGED INFRINGEMENT OR ANY LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR UNDER ANY OTHER LEGAL THEORY, ARISING OUT OF OR IN CONNECTION WITH THE IMPLEMENTATION, USE, COMMERCIALIZATION OR PERFORMANCE OF THIS INTELLECTUAL PROPERTY.
This license is effective until terminated. You may terminate it at any time by destroying the Intellectual Property together with all copies in any form. The license will also terminate if you fail to comply with any term or condition of this Agreement. Except as provided in the following sentence, no such termination of this license shall require the termination of any third party end-user sublicense to the Intellectual Property which is in force as of the date of notice of such termination. In addition, should the Intellectual Property, or the operation of the Intellectual Property, infringe, or in LICENSOR’s sole opinion be likely to infringe, any patent, copyright, trademark or other right of a third party, you agree that LICENSOR, in its sole discretion, may terminate this license without any compensation or liability to you, your licensees or any other party. You agree upon termination of any kind to destroy or cause to be destroyed the Intellectual Property together with all copies in any form, whether held by you or by any third party.
Except as contained in this notice, the name of LICENSOR or of any other holder of a copyright in all or part of the Intellectual Property shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Intellectual Property without prior written authorization of LICENSOR or such copyright holder. LICENSOR is and shall at all times be the sole entity that may authorize you or any third party to use certification marks, trademarks or other special designations to indicate compliance with any LICENSOR standards or specifications. This Agreement is governed by the laws of the Commonwealth of Massachusetts. The application to this Agreement of the United Nations Convention on Contracts for the International Sale of Goods is hereby expressly excluded. In the event any provision of this Agreement shall be deemed unenforceable, void or invalid, such provision shall be modified so as to make it valid and enforceable, and as so modified the entire Agreement shall remain in full force and effect. No decision, action or inaction by LICENSOR shall be construed to be a waiver of any rights or remedies available to it.
- 1. Scope
- 2. Conformance
- 3. References
- 4. Terms and Definitions
- 5. Conventions
- 6. CDB OpenFlight Models
- 6.1. OpenFlight File Header
- 6.2. OpenFlight Model Tree Structure
- 6.3. Modeling Conventions
- 6.4. Model Identifiers
- 6.5. Model Zones
- 6.6. Model Points
- 6.7. Model Conforming
- 6.8. Model Levels-of-Detail
- 6.9. Model Switch Nodes
- 6.10. Model Articulations
- 6.11. Model Light Points
- 6.12. Model Attributes
- 6.13. Model Textures
- 6.14. Model Descriptor (Metadata) Datasets
- Annex A: Conformance Class Abstract Test Suite (Normative)
- A.1. Conformance class: CRS
- A.2. Conformance Class: Tree Structure
- A.3. Conformance Class: Modeling Conventions
- A.4. Conformance Class: Model Zones
- A.5. Conformance Class: Model Points
- A.6. Conformance Class: Model Level Of Detail
- A.7. Conformance Class: Model Switch Nodes
- A.8. Conformance Class: Damage Status
- A.9. Conformance Class: Model Articulations
- A.10. Conformance Class: Model Textures
- Annex B: OpenFlight v16.0 Technical Description – Annotated
- B.1. Contents
- B.2. OpenFlight® Scene Description
- B.3. OpenFlight Concepts
- B.4. Database Hierarchy
- B.5. Node Attributes
- B.6. Palettes
- B.7. Instancing
- B.8. Replication
- B.9. Bounding Volumes
- B.10. Multitexture
- B.11. OpenFlight File Format
- B.12. OpenFlight Record Types
- B.13. Texture Files
- B.14. Road Path Files
- B.15. Road Zone Files
- B.16. Linkage Editor Parameter IDs
- B.17. OpenFlight Opcodes
- Annex C: Summary of Changes Version 15.7
- Annex D: Summary of Changes Version 15.8
- Annex E: Summary of Changes Version 16.0
- Annex F: Revision History
- Annex G: Bibliography
i. Abstract
This volume defines the OpenFlight implementation requirements for a CDB conformant data store. Please also see Volume 1 OGC CDB Core Standard: Model and Physical Structure for a general description of all of the industry standard formats specified by the CDB standard. Please read section 1.3.1 of that document for a general overview.
ii. Keywords
The following are keywords to be used by search engines and document catalogues.
ogcdoc, OGC document, cdb, openflight
iii. Preface
Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. The Open Geospatial Consortium shall not be held responsible for identifying any or all such patent rights.
Recipients of this document are requested to submit, with their comments, notification of any relevant patent claims or other intellectual property rights of which they may be aware that might be infringed by any implementation of the standard set forth in this document, and to provide supporting documentation.
iv. Submitting organizations
The following organizations submitted this Document to the Open Geospatial Consortium (OGC):
Organization name(s)
-
CAE Inc.
-
Carl Reed, OGC Individual Member
-
Envitia, Ltd
-
Glen Johnson, OGC Individual Member
-
KaDSci, LLC
-
Laval University
-
Open Site Plan
-
University of Calgary
-
UK Met Office
v. Submitters
All questions regarding this submission should be directed to the editor or the submitters:
Name |
Affiliation |
Carl Reed |
Carl Reed & Associates |
David Graham |
CAE Inc. |
1. Scope
This volume of the CDB standard defines a set of conventions to represent 2D and 3D models based on version 16.0 of the OpenFlight Scene Description Database Specification as annotated in Appendix C of this document.
For ease of editing and review, the standard has been separated into 12 Volumes and a schema repository.
-
Volume 0: OGC CDB Companion Primer for the CDB standard. (Best Practice)
-
Volume 1: OGC CDB Core Standard: Model and Physical Data Store Structure. The main body (core) of the CDB standard (Normative).
-
Volume 2: OGC CDB Core Model and Physical Structure Annexes (Best Practice).
-
Volume 3: OGC CDB Terms and Definitions (Normative).
-
Volume 4: OGC CDB Use of Shapefiles for Vector Data Storage (Best Practice).
-
Volume 5: OGC CDB Radar Cross Section (RCS) Models (Best Practice).
-
Volume 6: OGC CDB Rules for Encoding Data using OpenFlight (Best Practice).
-
Volume 7: OGC CDB Data Model Guidance (Best Practice).
-
Volume 8: OGC CDB Spatial Reference System Guidance (Best Practice).
-
Volume 9: OGC CDB Schema Package: provides the normative schemas for key features types required in the synthetic modelling environment. Essentially, these schemas are designed to enable semantic interoperability within the simulation context. (Normative)
-
Volume 10: OGC CDB Implementation Guidance (Best Practice).
-
Volume 11: OGC CDB Core Standard Conceptual Model (Normative)
-
Volume 12: OGC CDB Navaids Attribution and Navaids Attribution Enumeration Values (Best Practice)
2. Conformance
This standard defines requirements for implementing OpenFlight content in a CDB compliant data store.
Requirements for 1 standardization target types are considered.
Conformance with this standard shall be checked using all the relevant tests specified in Annex A (normative) of this document. The framework, concepts, and methodology for testing, and the criteria to be achieved to claim conformance are specified in the OGC Compliance Testing Policies and Procedures and the OGC Compliance Testing web site [1].
In order to conform to this OGC™ interface standard, a software implementation shall choose to implement:
-
Any one of the conformance levels specified in Annex A (normative).
All requirements-classes and conformance-classes described in this document are owned by the standard(s) identified.
3. References
The following normative documents contain provisions that, through reference in this text, constitute provisions of this document. For dated references, subsequent amendments to, or revisions of, any of these publications do not apply. For undated references, the latest edition of the normative document referred to applies.
OpenFlight Specification version 16.4
4. Terms and Definitions
This document uses the terms defined in Sub-clause 5.3 of [OGC 06-121r8], which is based on the ISO/IEC Directives, Part 2, Rules for the structure and drafting of International Standards. In particular, the word “shall” (not “must”) is the verb form used to indicate a requirement to be strictly followed to conform to this standard.
For the purposes of this document, the additional terms and definitions provided in the OGC CDB Terms and Definitions document (Volume 3) apply.
4.1. A note on OpenFlight
OpenFlight (or .flt) [2] is a 3d geometry model file format originally developed by Software Systems Inc. for its MultiGen [3] real-time 3d modeling package in 1988. Originally called Flight, the format was designed as a nonproprietary 3D model format for use by real-time 3d visual simulation image generators. The format was later renamed to OpenFlight to denote its nonproprietary image generation (IG) usage. The MultiGen modeling package (known now as Creator [4]) and the OpenFlight format were rapidly adopted by the early commercial flight simulation industry in the later 80’s and early 90’s. NASA Ames was the first customer for the MultiGen modeling package.
The early advantage OpenFlight held over many 3d geometry model file formats (.obj, .dxf, .3ds) was its specific real-time 3d graphics industry design. This means that the format is polygon based (rather than NURB surfaces), and provides a real-time tree structure essential for real-time IG systems. Most early graphics file formats worried more about visual esthetics for non-real-time based rendering graphics packages such as Wavefront Technologies, or Alias Systems Corporation.
The OpenFlight file format is still widely used today in the high end real-time visual simulation industry as the standard interchange format between different IG systems, and is currently administrated by Presagis.
5. Conventions
This sections provides details and examples for any conventions used in the document. Examples of conventions are symbols, abbreviations, use of XML schema, or special notes regarding how to read the document.
5.1. Identifiers
The normative provisions in this standard are denoted by the URI
All requirements and conformance tests that appear in this document are denoted by partial URIs that are relative to this base.
For the sake of brevity, the use of “req” in a requirement URI denotes the literal:
An example might be:
req/openflight/crs
5.2. Schemas
The following XML Schemas can be found in the OGC CDB Standard schema repository:
-
Base_Material_Table.xsd
-
Composite_Material_Table.xsd
-
Configuration.xsd
-
Defaults.xsd
-
Feature_Data_Dictionary.xsd
-
Lights.xsd
-
Lights_Tuning.xsd
-
Model_Components.xsd
-
Model_Metadata.xsd
-
OpenFlight_Model_Extensions.xsd
-
Vector_Attributes.xsd
-
Version.xsd
6. CDB OpenFlight Models
This volume of the CDB standard defines a set of conventions for representing 2D and 3D models based on version 16.0 of the OpenFlight Scene Description Database Specification as annotated in Appendix C of this document. The conventions presented here address the needs of several types of simulation clients including OTW, FLIR, NVG, CGF, radar, and laser, acoustic, magnetic, visual and thermal sensors.
Requirements Class – CRS Metadata |
|
/req/core/metadata |
|
Target type |
Operations |
Dependency |
OpenFlight Specification |
Dependency |
File Management system |
Requirement 1 |
/req/core/openflight/header-crs |
6.1. OpenFlight File Header
The OpenFlight Header Record contains descriptive coordinate reference system (CRS) metadata about the manner vertices are encoded, and how these vertices are applied to an earth model and a projection type. On the other hand, the CDB standard itself mandates a prescribed set of conventions in this regard.
Requirement 1 |
http://www.opengis.net/spec/CDB/1.1/openflight/header-crs As a result; the following OpenFlight Header records SHALL be set as follows: Projection Type: • Flat Earth, value 0: This is the type of projection used by most CDB Models, GTModel, GSModel, and MModel. • Geodetic, value 5: This is the type of projection used by T2DModels. Earth Ellipsoid Model: • WGS-84, value 0: This is the Earth model to use with T2DModels. The field is ignored with other CDB Models. |
6.2. OpenFlight Model Tree Structure
The internal structure of OpenFlight models is a tree structure that consists of nodes having child nodes as well as sibling nodes [5]. This type of tree structure is called a directed acyclic graph, or DAG. The general tree structure of a Model resembles that of Figure 6‑1: General OpenFlight Tree Structure.
Figure 6-1. General OpenFlight Tree Structure
The CDB standard uses Group Nodes to arrange Models in a hierarchical manner. This way of organizing models helps identify components of interest.
The CDB standard refers to a number of OpenFlight nodes to store meaningful data for simulation client-devices. For a complete list of nodes supported by the CDB standard, see Appendix C. The nodes listed here are the ones referred to by one or more CDB conventions.
An example of an ancillary record is the OpenFlight comment record. A comment record may appear once, anywhere after a node’s primary record. The CDB standard relies on comment records to extend the definition of OpenFlight nodes. Instead of using the Extension Record to create new primary and ancillary records, the CDB standard uses comments to store the extra attributes required by the specialization of existing OpenFlight nodes [6]. Comment records were chosen over OpenFlight extensions in order to minimize any changes to the Creator tool or the need to develop a plug-in to Creator. Using this approach, anybody can create CDB-compliant models using a plain version of Creator. Nevertheless, the development of Creator CDB plug-ins would improve modeler’s efficiency. Such plug-ins could, for instance, offer a menu-based GUI to allow modelers to enter and edit CDB comments, while ensuring that syntax and conventions are fully adhered to.
The text contained in the comment record is formatted using the XML notation.
Requirements Class – tree structure |
|
/req/core/tree-structure |
|
Target type |
Operations |
Dependency |
OpenFlight Specification |
Dependency |
CDB File Management system |
Requirement 2 |
/req/core/openflight/model-global-zone |
Requirement 3 |
/req/openflight/2dmodel |
Requirement 4 |
/req/openflight/2dmodel-rules |
Requirement 5 |
/req/openflight/2dmodels |
Requirement 6 |
/req/openflight/xref |
6.2.1. CDB Model Tree Structure
Based on Figure 6‑1 above, the internal structure of CDB Models resemble this one:
Figure 6-2. Internal Structure of CDB Models
Requirement 2 |
req/model-global-zone All CDB Models SHALL have a global zone as their root node. This node identifies the model. Global zones are defined in section 6.5.2 below. |
6.2.2. T2DModel Tree Structure
A T2DModel being a collection of 2DModels, each individual 2DModel occupies its own subtree of the graph. The general structure of a T2DModel is as follows:
Figure 6-3. Internal Structure of T2DModels
Requirement 3 |
req/openflight/2dmodel Each 2DModel SHALL be implemented as a Model Zone (section 6.5) with its own subgraph. 2DModels are disjoint and non-overlapping. |
A 2DModel is comprised of multiple layers; the layer number is expressed by the group’s relative priority (section 6.3.4). Each layer has an optional LOD node followed by a fixed hierarchy of regular OpenFlight Object, Face, and Mesh nodes.
Restrictions
T2DModels being an alternate representation of the terrain and its imagery and materials, a number of restrictions are necessary to ensure client devices can consume the dataset efficiently.
Requirement 4 |
req/openflight/2dmodel-rules A 2DModel SHALL have at least two layers, layer 0 and layer 1. Layer 0 SHALL always empty because it represents the terrain on top of which subsequent layers are applied. Each layer is composed of zero, one, or more OpenFlight Object nodes. |
All Face and Mesh nodes share exactly the same set of graphic attributes (color, textures, material, and other flags). Stated differently, the Face and Mesh nodes provide the shape of the layer while the Object node controls its appearance.
Subfaces are not permitted because coplanar geometry is implemented through layers.
6.2.3. The Use of Node Names
Although the CDB standard defines naming conventions for objects stored in an OpenFlight file, the standard does not constrain the OpenFlight node names themselves. Instead, the CDB standard defines names that are assigned via XML tags stored in the comment record.
The following question arises, “Why not establish a set of CDB conventions around node names?” The answer lies primarily around constraints imposed by tools used to edit/create OpenFlight files. Tools such as Creator require unique node names throughout the OpenFlight file. The OpenFlight format specification itself does not state that node names must be unique; however, a tool such as Creator prevents the modeler from entering the same node name twice.
To circumvent this limitation, the CDB standard provides naming conventions through XML tags inserted in the comment record following a node’s primary record. This way of doing things leaves modelers with the needed freedom in naming nodes. The CDB standard defines how to organize a model; all extra object attributes that do not fit in the current OpenFlight records are stored in the comment record, including object names.
Here is an example of XML tags stored in the comment record for a Group Node.
Table 6-1: Sample XML Tag Used in a Comment Record
<CDB:Zone
name = "zone name"
/>
All XML tags defined by the CDB standard belong to a single XML namespace that is appropriately named CDB [7].
6.2.4. Model Master File
A Model Master file is an OpenFlight file that contains only external references to other OpenFlight files. The purpose of the master file is to ensure a Model is seen as a single “object” even though its constituents are stored in separate files. The use of a model master file provides a convenient means for modelers to reference all of the constituent files that make up the model. There is no other purpose associated to the master file.
The concept of a Model Master file is used in a single case, to regroup all representations (all LODs) of a geotypical model into a single OpenFlight file. However, the concept applies to all types of CDB Models. The concept can also be used to regroup a model’s shell with its interior. For this reason, expect new usage of the Model master file in future version of the Standard.
The master file is useful in two circumstances: when modelers create or edit Models, and when client devices want to discover at once all constituents of Models.
For modelers, it is useful (if not required) to edit a model using a single source file to present a coherent view of the model as a whole. For this reason, a master file with a set of LOD-XRef nodes is perfect to assemble and present a unified view of the model to edit.
Figure 6‑4: Typical Structure of a Model Master File presents the general structure of a master file.
Figure 6-4. Typical Structure of Model Master File
The value found in the Significant Size field of the above LOD nodes matches the values found in Table 3‑1 of Volume 1 CDB Core Standard: CDB LOD vs. Model Resolution. The next section provides details on XRef nodes themselves.
6.2.5. Referencing Other OpenFlight Files
Requirement 6 |
req/openflight/xref+
An OpenFlight external reference (XRef) node is used to refer to another OpenFlight file. The reference is made by specifying the filename and its path (absolute or relative). The CDB Standard requires that all references SHALL be made using a relative path. |
The XRef node (and its External Reference record) supports a number of options: Override flags, View-As-Bounding-Box flag, and Target Node Name. The CDB standard supports none of these options.
Here are two cases to illustrate the use of XRef nodes.
Models Straddling Multiple Files
In the case of GTModels, GSModels, and MModels, the OpenFlight geometry can straddle multiple files. It could be seen in a moving model (e.g., a helicopter) whose pilot could be stored in a separate file. In that case, the file containing the pilot resides in the same directory as the file containing the helicopter itself. The helicopter would be stored in file 1:
\CDB\MModel\600_MModelGeometry\1_Platform\2_Air\225_United_States\21_Utility_Helo\1_2_225_21_x_x_x\D600_S001_T001_1_2_225_21_x_x_x.flt
The pilot would be stored in file 2:
\CDB\MModel\600_MModelGeometry\1_Platform\2_Air\225_United_States\21_Utility_Helo\1_2_225_21_x_x_x\D600_S001_T002_1_2_225_21_x_x_x.flt
The XRef node in file 1 would contain the following string:
.\D600_S001_T002_1_2_225_21_x_x_x.flt
where 1_2_225_21_x_x_x is the complete DIS code of the helicopter.
Models with Multiple Model-LODs
This is the case of the master file of a geotypical model. The master file (known as the GTModelGeometry Entry File) refers to all levels of details of the geometry files that reside in different sub-directories. Assuming a geotypical model representing a gothic church, the master file itself would reside in a directory such as this one:
\CDB\GTModel\500_GTModelGeometry\A_Culture\L_Misc_Feature\015_Building\D500_S001_T001_AL015_050_Church-Gothic.flt
The targets of the XRef nodes would all reside in directories such as these:
\CDB\GTModel\500_GTModelGeometry\A_Culture\L_Misc_Feature\015_Building\Lnn\D510_S001_T001_Lnn_AL015_050_Church-Gothic.flt
The resulting strings to use in the XRef nodes in the master file would resemble this:
.\Lnn\D510_S001_T001_Lnn_AL015_050_Church-Gothic.flt
where Lnn corresponds to the LOD the XRef file resides in.
6.3. Modeling Conventions
Requirements Class – Modeling Conventions |
|
/req/model-conventions |
|
Target type |
Operations |
Dependency |
OpenFlight Specification |
Requirement 7 |
/req/openflight/crs-models |
Requirement 8 |
/req/openflight/model-origin |
Requirement 9 |
/req/openflight/t2-model-coordinates |
Requirement 10 |
/req/openflight/roll-pitch-yaw |
Requirement 11 |
/req/openflight/geometry |
Requirement 12 |
/req/openflight/geometry-layer-constraint |
6.3.1. Model Coordinate Systems
Requirement 7 |
req/openflight/crs-models CDB Models SHALL use the same coordinate system convention as OpenFlight[8]. The X-axis traverses the model from left to right, the Y-axis goes from the back to the front and the Z-axis extends from the bottom to the top of the model. |
Figure 6- 5: Model Coordinate System is a screenshot [9] of Creator [10] showing a CAD view of a semi-transparent cube.
Figure 6-5. Model Coordinate System
Origin
The location of the model origin is defined in the following manner:
Requirement 8 |
req/openflight/model-origin In the XY plane, the origin SHALL be located at the center of the bounding rectangle. Along the Z axis, the origin SHALL be selected to allow the model to be correctly positioned on ground for ground-related models, or on a water plan for surface and subsurface platforms. |
The following examples will illustrate the above two rules.
Fixed wing aircraft – A KC-130 Hercules is illustrated below with its landing gears fully extended.
Figure 6-6. Coordinate System - Aircraft
Helicopter – An AH-1W Super Cobra is shown below. Note that no equipment is mounted on its winglets.
Figure 6-7. Coordinate System - Helicopter
Surface ship – Shown below is the Arleigh Burke DDG-51 guided missile destroyer. Note how the XY plane defines the waterline.
Figure 6-8. Coordinate System - Ship
Land Platform – The M1A2 Abrams is a main battle tank shown here with its desert skin.
Figure 6-9. Coordinate System - Ground Based Model
Lifeform – A human lifeform (a soldier) is presented here.
Figure 6-10. Coordiante System - Lifeform
Cultural Feature – When a Model represents a cultural feature, the origin is the point of insertion of the model into the ground. In general, the XY plane (at Z = 0) delimits the basement from the first floor.
Figure 6-11. Coordinate System Cultural Feature
Power Pylon – In the case of an electricity pylon, the front (and back) of the model is aligned with the general direction of the attached wires.
Figure 6-12. Coordinate System - Power Pylon
Local Coordinate Systems
Most OpenFlight nodes can have a local transformation used to create a local coordinate system. The origin and orientation of this coordinate system are expressed by a single transformation matrix.
When a transformation is specified for a node’s primary record, only the matrix record (opcode 49) is considered by CDB client-devices. All other transformation records (opcode 76, 78, 79, 80, 81, 82 and 94) are discarded [11].
Units
GSModels and GTModels
The MODL attribute of the GSFeature and GTFeature datasets are used to reference GSModels and GTModels. In turn, the position of GSModels and GTModels are obtained from the coordinates of each point of the associated vector data set; these coordinates are interpreted as the latitude (y), longitude (x), and elevation (z) coordinates that position the model within the CDB [12].
GSModels and GTModels are drawn to real-world dimensions using meters as their unit of measurement.
MModels
MModels are usually internally activated and positioned by the client-devices in response to a running simulation.
In the case of Moving Model location features, the MMDC attribute of the GTFeature dataset is used to reference a MModel. Otherwise, the MModel behaves exactly as a GTModel as described in section 6.3.1.3.1 above.
MModels are drawn to real-world dimensions using meters as their unit of measurement.
T2DModels
Requirement 9 |
req/openflight/t2-model-coordinates Vertex latitude (y) and longitude (x) coordinates SHALL be expressed in decimal degrees. The values SHALL be relative to the file’s (implicit) origin which is the south-west corner of the tile. |
Note however, that the file’s origin and size are implicitly defined by the tile position and the tile level-of-detail. The absolute position of each vertex is obtained by adding the vertex relative value to the tile origin.
T2DModels are used to model features that have no significant height with respect to the neighboring terrain; they are generally conformed to the terrain using the “Surface Conformal Mode” as explained in section 6.7, Model Conforming. Note that the vertices of T2DModels need not have Z-coordinate values that are always zero. For example, it is permissible to model a road lineal that is modestly elevated with respect to the neighboring terrain. Client-devices must be capable of handling T2DModels that are either perfectly surface-conformed to the terrain (all vertices have Z=0) or modestly elevated (vertices with Z>0) with respect to the terrain. Note that surface-conformed models with vertices with Z-coordinate values less than zero are, by definition, below the terrain.
6.3.2. Geometry
Requirement 11 |
req/openflight/geometry Implementers of the CDB standard SHALL adhere to the following set of constraints, rules and guidelines when creating the geometry of Models. • Create convex polygons. All lines joining any two points in the interior of the polygon also lie in the interior. • Create coplanar vertices. All of the vertices defining a polygon should lie in the same plane (required by virtually all rendering engines). • A polygon’s front face SHALL be defined by a counter-clockwise ordering of its vertices. • Avoid T vertices. T-vertices occur when two or more adjacent polygons share an edge, and the polygons do not share a common vertex on that edge. • Avoid coplanar faces. A coplanar face is a polygon that lies directly on top of another polygon. Z-buffer fighting can occur when a Z-buffer system cannot resolve which polygon to display on top. The CDB standard strongly recommends changing one of the coplanar faces to be a subface of the other in the hierarchy so that the client device such as an Image Generator can draw the faces in the correct order. An alternative is to use the Relative Priority field to implement layering (see section 6.3.4 below). • Favor mesh over individual polygons. The OpenFlight Mesh record allows the creation of triangle fans, triangle strips, quadrilateral strips, and indexed face sets. This construct is by far preferable to individual polygons built using the OpenFlight Face record. • Make use of instancing. Avoid repeating identical pieces of geometry. Create one object and repeat it by having multiple instances in different locations.. |
6.3.3. Roof Tagging
OpenFlight has a provision for tagging polygons that are part of a roof. The Roofline flag can be found in both the Face and Mesh records. This flag is useful to apply a geospecific texture to the roof. When the flag is set, the client-device can discard the texture referenced by the polygon and use instead the geospecific texture that appears on the terrain.
More generally, the Roofline flag is used to tag any polygon whose texture can be replaced with a geospecific texture.
6.3.4. Relative Priority
The Relative Priority field appears in four OpenFlight primary records:
Face Record
Mesh Record
Object Record
Group Record
The field is required to implement layering, a method to handle coplanar geometry. By using the Relative Priority field, the modeler can construct more complex coplanar geometry than what is possible with sub-faces.
Here is the definition of the field according to OpenFlight 16.0:
Relative priority specifies a fixed ordering of the node relative to its sibling nodes. Ordering is from left (lesser values) to right (higher values). Nodes of equal priority may be arbitrarily ordered. All nodes have an implicit (default) relative priority value of zero.
The CDB standard further restricts the use of the Relative Priority field for complex coplanar geometry as follows. Using relative priorities, the modeler defines 'n' layers of coplanar geometry. Layers are numbered from 0 to 'n-1'.
Requirement 12 |
req/openflight/geometry-layer-constraint Layer 0, the base layer, SHALL contain geometry that completely encompasses the geometry of subsequent layers. Other layers SHALL be processed in order, one after the other. A layer is made of one or more nodes; all nodes of a given layer SHALL have the same relative priority. |
6.4. Model Identifiers
6.4.1. GSModel and GTModel Identifier
Although the name of the global zone of a GS or GT model is arbitrary, it is strongly suggested to use the value of their MODL attribute to name the global zone.
For instance, a GTModel stored in a file called
D500_S001_T001_AL015_004_Castle.flt
Would have its global zone identified like this:
<CDB:Zone name="Castle"/>
6.4.2. MModel Identifier
The MModel identifier is the common name of the moving model or the name of its part. The actual name is not covered by the standard. An example of a MModel identifier is “M1A2” for the M1 Abrams tank whose DIS Entity Type is 1_1_225_1_1_3_0.
For instance, a moving model stored in a file called
D600_S001_T001_1_1_225_1_1_3_0.flt
Would have its global zone identified like this:
<CDB:Zone name="M1A2"/>
6.4.3. 2DModel Identifier
A T2DModel itself does not need to be identified per se. However, it is required to identify individual 2DModels inside a T2DModel. This is done by assigning a unique zone name to each 2DModel. In addition, a 2DModel must have the same zone name across LODs and across tiles. Note that when a 2DModel is clipped by tile boundaries, each of the clipped model fragments will appear in distinct OpenFlight files of the T2DModel Dataset. When clipped, the 2DModel Identifier must appear once, in each of the T2DModel Tile-LODs. This is necessary to identify the parts of a 2DModel that straddle multiple Tile-LODs.
6.5. Model Zones
Requirements Class – Model Zones |
|
/req/core/model-zones |
|
Target type |
Operations |
Dependency |
OpenFlight Specification |
Requirement 13 |
/req/openflight/model-zone-bounding-box |
Requirement 14 |
/req/openflight/zone-name |
Requirement 15 |
/req/openflight/global-zone |
Requirement 16 |
/req/openflight/hot-spot-temperature |
Requirement 17 |
/req/openflight/model-footprint-zones |
Requirement 18 |
/req/openflight/model-footprint-hierarchy |
Requirement 19 |
/req/openflight/model-cutout-zones |
Requirement 20 |
/req/openflight/model-cutout-geometry |
Requirement 21 |
/req/openflight/model-pseudo-interior-zone |
Requirement 22 |
/req/openflight/model-interior-zone |
The concept of a model zone is of the utmost importance when creating models, particularly those used in military simulation applications.
A model zone represents a component [13] of interest on the Model. A model zone (as well as the component it represents) occupies a certain volume and is delimited by a bounding box. At least one simulator subsystem must be interested in a specific component to justify the creation of a corresponding zone. Examples of zones are a turret on a tank, or an engine on a platform, or an entrance door on a building, etc.
Since the model itself is of interest to the simulation, it will have at least one zone, the global zone. That will be the case for most Models used as cultural features; they will have a single zone. However, Models used as moving models will typically be subdivided into several zones.
To implement the concept of model zones, the CDB standard uses the OpenFlight Group Node. Firstly, a Group Node can have child nodes to represent its own geometry as well as other zones. Secondly, a Group Node can have a bounding volume encompassing its child nodes and that can be used to represent the volume corresponding to the zone.
6.5.1. Definition
A Model Zone is an OpenFlight Group Node with a mandatory Bounding Box and the following XML tags in the comment field.
Requirement 13 |
req/openflight/model-zone-bounding-box+
To be a OpenFlight Group Node a Model Zone SHALL have mandatory Bounding Box. |
Table 6-2: XML Tags for Zones
<CDB:Zone name="name" volume="closed|open">
... zone attributes
</CDB:Zone>
Requirement 14 |
req/openflight/zone-name The Zone Name is mandatory. |
Remember that if the zone exists, it is because it has its importance for at least one client device. In general, all client devices interested in a zone will use its name to identify and control it.
The volume attribute is optional and specifies whether the zone represents a closed or open volume. By default, a zone represents a closed volume.
Table 6-3 lists the OpenFlight records required to represent a zone.
Table 6-3: OpenFlight Records for a Zone
GROUP |
MATRIX (optional) |
BOUNDING BOX (mandatory) |
COMMENT (mandatory) |
Note the use of the MATRIX record. It is necessary when the zone has a different position or orientation than its parent node. A zone can be thought of as a separate Model in itself. A zone has a natural orientation and its local coordinate system must indicate where their front, right, and back sides are. A zone is subject to the same convention as the model itself regarding the orientation of its coordinate system.
6.5.2. Global Zones
Requirement 15 |
req/openflight/global-zone A CDB-compliant Model SHALL have at least one zone that encompasses the whole model and that is called the model global zone. The global zone is mandatory. |
Figure 6‑13 illustrates the location of the global zone in the graph hierarchy.
Figure 6-13. Model Global Zone
The global zone contains the name of the Model contained in the OpenFlight file.
6.5.3. Zone Attributes
A Model Zone can have any number of attributes using the general mechanism described later in section 6.12, Model Attributes. However, two specific attributes are described here because of their particular relevance to the concept of Model Zone.
Material
The Material attribute provides an indication of the principal material the zone is made of. Since the majority of man-made models are made of one principal material as well as several less important materials, it is strongly suggested to use the Material attribute in the model global zone to specify what that principal material is.
The Material attribute is an index into the Composite Material Table located within the Model Descriptor file described in section 6.14. The value of the Material attribute is a strictly positive integer. The syntax of the XML tag is:
<CDB:Zone>
<Material> index </Material>
</CDB:Zone>
The Material attribute can also be assigned to OpenFlight Object, Face, and Mesh nodes. The preferred syntax would be the following:
<CDB:Object>
<Material> index </Material>
</CDB:Object>
<CDB:Face>
<Material> index </Material>
</CDB:Face>
<CDB:Mesh>
<Material> index </Material>
</CDB:Mesh>
However, for compatibility with version 3.1 and 3.0 of the CDB standard, a simplified (but deprecated) syntax is still supported for Object, Face, and Mesh nodes when the Material is the only attribute.
index
</CDB:Material>
Temperature
When the zone has a heat source, such as an engine, it is known as a Hot Spot. The maximum temperature the zone can reach is specified using the Temperature attribute as shown here:
Table 6-4: XML Tags for Hot Spots
<CDB:Zone>
<Temperature> maximum temperature </Temperature>
</CDB:Zone>
Requirement 17 |
req/openflight/hot-spot-temperature+
The temperature SHALL be expressed in Celsius degrees. Only integer values are permitted. |
\CDB\Metadata\Model_Components.xml supplies a comprehensive list of zones that are candidates for hot spots. Typical hot spot names are Engine and Chimney to name only these two. Other zones that are of interest for hot spots simulation are wings leading edge and other surfaces subjected to friction.
6.5.4. Implementation Guidelines
This section provides a set of guidelines to implement the concept of model zones. The guidelines provided here are also applicable to Model Points described in section 6.6.
A zone is made of at least one Group Node.
Figure 6-14. Simple Zone
A zone may have an optional articulation by adding a DOF node.
Figure 6-15. Articulated Zone
To simplify the following diagrams, we will use a single circle to represent a zone, whether the zone is a single Group Node, or a pair of group and DOF nodes.
In general, a zone has a graphical representation as well as other child zones.
Figure 6-16. Zone Hierarchy
The graphical representation of a zone is itself subject to several possible implementations using various OpenFlight nodes.
The simplest way to associate a graphical representation to a zone is to use an Object node with a combination of graphic primitives available in OpenFlight: polygons, triangles, quads, and meshes.
Figure 6-17. Simple Zone Graphical Representation
The modeler is also free to use a combination of LOD and Switch nodes to control the graphical representation of a zone.
For instance, an LOD node inserted before the object node is useful to inform the client device on how significant the graphical representation is.
Figure 6-18. Additive LOD to Control the Graphical Representation
If the modeler wants to provide two (or more) graphical representations for a zone, he should use two (or more) LOD nodes.
Figure 6-19. Exchange LODs to Select the Graphical Representation
Levels of details are discussed in length in Section 6.8, Model Levels-of-Detail.
If the modeler has several distinct graphical representations for the zone, he is also free to use a switch node to select between these representations.
Figure 6-20. Switch Node to Select the Graphical Representation
CDB Switches are discussed in depth in Sections 6.9, Model Switch Nodes.
6.5.5. Model Zone Naming
A Model Zone Node is uniquely and unambiguously identified by concatenating with backslashes (‘\’) the names of all Model Zones traversed to reach it. When sibling CDB nodes have identical names, their name is appended with a sequence number in square brackets. Nodes are numbered starting with 1. Siblings are sorted in ascending order according to their X, Y, and Z coordinates. The leftmost sibling has the smallest XYZ coordinate while the rightmost sibling node has the largest XYZ coordinate. As a result, identical sibling CDB nodes are sorted from left to right (X-axis), then back to front (Y-axis), then bottom to top (Z-axis).
The following example provides a sample of Model Zone and Model Point names that would be used for a tactical fighter aircraft; the fighter has two pylons per wing, each pylon having 3 attach points. The resulting paths to each Model Zones and Model Points are as follows:
\Fighter
\Fighter\Wing[1]
\Fighter\Wing[1]\Pylon[1]
\Fighter\Wing[1]\Pylon[1]\Attach_Point[1]
\Fighter\Wing[1]\Pylon[1]\Attach_Point[2]
\Fighter\Wing[1]\Pylon[1]\Attach_Point[3]
\Fighter\Wing[1]\Pylon[2]
\Fighter\Wing[1]\Pylon[2]\Attach_Point[1]
\Fighter\Wing[1]\Pylon[2]\Attach_Point[2]
\Fighter\Wing[1]\Pylon[2]\Attach_Point[3]
\Fighter\Fuselage
\Fighter\Fuselage\Attach_Point
\Fighter\Wing[2]
\Fighter\Wing[2]\Pylon[1]
\Fighter\Wing[2]\Pylon[1]\Attach_Point[1]
\Fighter\Wing[2]\Pylon[1]\Attach_Point[2]
\Fighter\Wing[2]\Pylon[1]\Attach_Point[3]
\Fighter\Wing[2]\Pylon[2]
\Fighter\Wing[2]\Pylon[2]\Attach_Point[1]
\Fighter\Wing[2]\Pylon[2]\Attach_Point[2]
\Fighter\Wing[2]\Pylon[2]\Attach_Point[3]
Here is how to interpret some of these paths:
The global zone is identified as \Fighter
The left wing is \Fighter\Wing[1]
The leftmost attach point is \Fighter\Wing[1]\Pylon[1]\Attach_Point[1]
The rightmost attach point is \Fighter\Wing[2]\Pylon[2]\Attach_Point[3]
There is a single attach point on the fuselage, \Fighter\Fuselage\Attach_Point
The inner pylon on the left wing is \Fighter\Wing[1]\Pylon[2]
The inner pylon on the right wing is \Fighter\Wing[2]\Pylon[1]
6.5.6. Usages
Model Landing Zones
Landing zones are used primarily by the Computed Generated Forces (CGF) sub-system of the simulator. The landing zone information can be used during the set-up of mission scenarios since it provides CGF the location of known landing zones. Typically, landing zones are used to specify the location and dimension of helipads, aircraft carrier decks, etc. \CDB\Metadata\Model_Components.xml lists several CDB Components that can act as landing zones.
Landing zones must have a bounding box that tightly fits the landing area. If required by the geometry of the landing zone, the modeler should create a local coordinate system that is axially oriented with the landing zone. Inserting a MATRIX record after the GROUP record does this.
The width and the length of the landing zone can be extracted by the client-device from the bounding box associated with the Group Node representing the zone. The landing zone geometry must be located under the Group Node to obtain meaningful dimensions.
Model Footprint Zones
A Model Footprint [14] conceptually represents the footprint (i.e., the terrain surface outline) of a model on the ground. The Model Footprint is modeled as a set of OpenFlight Face or Mesh records.
Requirement 17 |
req/openflight/model-footprint-zones Client-devices SHALL assume that the geometry that is associated with a Model Footprint Zone is hidden, regardless of the value of the OpenFlight Hidden flag of associated geometry. However, CDB content creation tools SHALL set the Hidden flag of the associated geometry [15]. |
The footprint geometry should be terrain conformed using the “Surface Conformal Mode” as explained in section 6.7, Model Conforming. This instructs client-devices to conform this footprint to the underlying terrain altimetry, regardless of its level-of-detail.
The Model Footprint is the set of polygons or meshes that result from the intersection of the model geometry with its XY plane [16].
A polygon that is tagged as Model Footprint can be used by client-devices to identify the portion of the terrain that is covered by a model. The Cultural Footprint can be used by client-devices such as:
-
Map generators that may not be interested in the full 3D geometry of a Model.
-
Procedural SE generation software that may use model footprints to automatically extrude such footprints into 3D models.
-
Simulation of ground-based SAF entities that would use model footprints to avoid collisions with features such as buildings and trees.
Requirement 18 |
req/openflight/model-footprint-hierarchy The CDB standard requires that the Model Footprint SHALL be placed under a CDB Footprint Zone node. |
This CDB node facilitates the identification and discovering of footprints by client-devices. The subgraph representing the Footprint is presented here.
Figure 6-21. Footprint Zone Structure
The Footprint zone is followed by an OpenFlight Object node with the necessary OpenFlight Face or Mesh nodes containing the footprint itself. All Face/Mesh nodes must have their Terrain Culture Cutout flag set. A Footprint zone is defined by the following XML tags.
Table 6-5: Footprint Zone XML Tags
<CDB:Zone name = "Footprint"/>
Model Cutout Zones
A Model Cutout Zone conceptually represents clipping geometry that is used to cut out the terrain from a 2DModel or a 3DModel. Cutouts are typically used in conjunction with model interiors and tunnels. The Model Cutout geometry defines a simple 3D convex volume (open or closed). A typical implementation of a Model Cutout Zone for a modeled building would consist of a simple cube. Similarly, the Model Cutout Zone for a tunnel entrance would consist of a simple cylinder or a partially-open cube (see Figure 5‑9: Modeling of Wells, Overhanging Cliffs and Tunnels).
Requirement 19 |
req/openflight/model-cutout-zones+
The Model Cutout is modeled as a set of OpenFlight Face or Mesh records. Client-devices SHALL assume that the geometry that is associated with a Model Cut-Out Zone is hidden and cut-out. |
The Model Cutout is modeled as a set of OpenFlight Face or Mesh records. Client-devices are required to assume that the geometry that is associated with a Model Cut-Out Zone is hidden and cut-out. Client-devices should ignore the value of the OpenFlight Hidden and Terrain Culture Cutout flags of associated geometry. However, CDB content creation tools are required to set the Hidden and Terrain Culture CutOut flags of the associated geometry [17].
The Model Cutout geometry should be terrain conformed using the “Surface Conformal Mode” as explained in the 6.7, Model Conforming. This instructs the client-device to conform the Model Cutout to the underlying terrain altimetry, regardless of its level-of-detail.
It is specified using the following XML syntax:
Table 6-6: XML Tags for Landing Zones
<CDB:Zone name="Cutout">
Polygons or meshes that are tagged as Model Cutout can be used by client-devices to identify the portion of the terrain that needs to be removed in order to reveal the interior of the model (say a building interior or a tunnel interior). The Model Cutout is necessary for models straddling the terrain surface and whose interior is modeled and viewed from within. The reason for this is that when the model is altitude-conformed onto the terrain, a hole must be cut into the terrain-LOD, so that the terrain itself does not visually interfere with the modeled building or tunnel interior.
Requirement 20 |
req/openflight/model-cutout-geometry The CDB standard requires that the Cutout geometry SHALL be placed under a CDB Model Cutout Zone node. |
This CDB node facilitates the identification and discovery of model cutouts by client-devices. The subgraph representing the cutout is presented here.
Figure 6-22. Cutout Zone Structure
Model Interior Zones
This section focuses on how to represent the interior of Models for an intelligent use by client-devices.
A Model is composed of 2 parts: a shell, and an optional interior. The shell contains both the exterior and the pseudo-interior. Client-devices need only access the shell if they do not need to penetrate and interact with the interior of the models; otherwise, they require both the shell and the interior. The shell of a Model is stored in five (5) datasets:
-
ModelGeometry
-
ModelTexture
-
ModelSignature
-
ModelDescriptor
-
ModelMaterial
The optional model interior is stored in four (4) datasets:
-
ModelInteriorGeometry
-
ModelInteriorTexture
-
ModelInteriorDescriptor
-
ModelInteriorMaterial
Refer to CDB Standard Volume 7 OGC CDB Data Model Guidance section 6.5 for guidelines on Handling of Model Interiors.
Model Pseudo-Interior Zone
The pseudo-interior is the portion of the shell that contains geometry also represented in the interior dataset. This geometry represents what is visible from the outside and is necessary to ensure the integrity and completeness of the shell.
Requirement 21 |
req/openflight/model-pseudo-interior-zone Since the pseudo-interior is a placeholder for the real interior, it SHALL be placed under its own subgraph and identified by a CDB zone whose name is “Interior”. |
Figure 6-23. Model Shell Structure
The name “Interior” is a reserved component name allowing a client-device to identify the node that is to be replaced by an entire dataset, namely the ModelInteriorGeometry dataset. The pseudo interior is mutually exclusive with the real interior defined in section 6.5.6.4.2, Model Interior Zone, below.
Figure 6‑23 also illustrates how to structure the shell of a Model that has a real interior. The model is divided in three components: the footprint of its exterior, the geometry of its exterior, and the geometry of its pseudo-interior. Therefore the names of these three components are “Footprint”, “Exterior”, and “Interior” as illustrated by the following XML tags.
Table 6-7: Shell Zones XML Tags
<CDB:Zone name = "Footprint"/>
<CDB:Zone name = "Exterior"/>
<CDB:Zone name = "Interior"/>
Footprints were discussed earlier in section 6.5.6.2, Model Footprint Zones.
Model Interior Zone
Requirement 22 |
req/openflight/model-interior-zone+
The Model interior itself SHALL have a global zone whose name is “Interior”. |
The Model interior itself must have a global zone whose name is “Interior”. Accordingly, the graph of the interior of the model will present the following structure. Note that real interior must not include the modeled representation of the shell.
Figure 6-24. Model Interior Structure
The Interior zone contains one or more floors as well as the partitions separating these floors. An Interior zone is defined by the following XML tags.
Table 6-8: Interior Zone XML Tags
<CDB:Zone name = "Interior">
<Ground_Floor> index </Ground_Floor>
</CDB:Zone>
The <Ground_Floor> is optional. It contains the index of the Floor that represents the ground floor of the model interior. By default, the ground floor is floor number 1.
The subgraph representing the Interior zone has the following structure.
Figure 6-25. Interior Zone Structure
The Interior zone has two (2) kinds of child nodes: Floor and Partition. The Interior has at least one Floor. When the Interior has several Floors, the separating Partitions appear as siblings of the Floor nodes. These Partitions contain external Apertures that connect two Rooms on different Floors. These external Apertures are later referenced by Rooms.
Model Interior Topology
To navigate through the interior of Models, simulator client-devices need to know the connections between the elements composing the interior, such as floors, rooms, doors, or fixtures. In addition, these elements must be identified and attributed for use by computer generated forces (CGF) client-devices. For this reason, the CDB Standard has opted for reuse and adoption of version 2 of the UHRB specification [18].
The CDB standard maps the UHRB Object Model to the OpenFlight Scene Graph using the concept of CDB nodes.
The UHRB object model proposes twelve (12) classes. Of these, four (4) are abstract base classes and one (1) is a provision for future expansion of the UHRB specification. The remaining seven (7) concrete classes are mapped to CDB Zone nodes. The UHRB Class Names and their corresponding CDB Zone Names are:
Table 6-9: UHRB Class Names and corresponding CDB Zone Names
| UHRB Class Name | CDB Zone Name |
|---|---|
UHRB_TEMPLATE |
Interior |
UHRB_FLOOR_LEVEL_COMPONENT |
Floor |
UHRB_SURFACE_COMPONENT |
Surface |
UHRB_ROOM_COMPONENT |
Room |
UHRB_FIXTURE_COMPONENT |
Fixture |
UHRB_APERTURE_COMPONENT |
Aperture |
UHRB_FIXED_PARTITION_COMPONENT |
Partition |
The above CDB nodes are treated the same way as any other CDB nodes. In particular, Floor, Room, Partition, Aperture, Fixture, and Surface nodes are numbered following the conventions established in section 6.5.5, Model Zone Naming; they also have zone attributes such as the Material Index.
Model Interior Topology Attributes
This section describes the CDB mechanism that expresses the possible connections between compartments and apertures. The definition of a CDB Zone is extended with the addition of one XML tag indicating which other components are connected to this one.
The following table presents the revised syntax of the XML tags defining a CDB Zone. The addition is highlighted in yellow.
Table 6-10: XML Tags for Zone Connections
<CDB:Zone name="name" volume="closed|open">
<Material> _index_ </Material>
<Temperature> _value_ </Temperature>
<ConnectTo> _path_ </ConnectTo>
...
</CDB:Zone>
The <ConnectTo> tag may appear zero or more times, allowing for the definition of any number of connections to other components. The other tags (Material and Temperature) retain their current definition. In particular, the use of the <Material> tag is encouraged to define the material the components are made of.
The presence of the <ConnectTo> tag is restricted to a set of three (3) components: global zone, compartments and apertures. A connection is unidirectional; it goes from the zone that contains the <ConnectTo> tag to the zone referenced by the path. The path is either relative or absolute. When a relative path is used, it identifies a sibling of the current zone. Here are some path examples.
Table 6-11: Examples of Absolute and Relative Paths
Example 1:
<CDB:Zone name="Interior">
<ConnectTo> \Interior\Section[1]\Level[1]\Aperture[5] </ConnectTo>
</CDB:Zone>
Example 2:
<CDB:Zone name="Aperture[5]">
<ConnectTo> \Interior\Section[1]\Level[2]\Compartment[3] </ConnectTo>
</CDB:Zone>
Example 3:
<CDB:Zone name="Compartment[3]">
<ConnectTo> Aperture[1] </ConnectTo>
<ConnectTo> \Interior\Section[1]\Level[1]\Aperture[5] </ConnectTo>
</CDB:Zone>
Example 1 is an absolute path, expressed as a directory name, starting with the topmost zone, the global zone. It tells us that there is one entrance into the model interior through the fifth aperture (Aperture[5]) on the first level (Level[1]) of the first section (Section[1]) of the model interior (\Interior).
Example 2 is also an absolute path. It tells us that the fifth aperture (Aperture[5]) has a single connection to the third compartment (Compartment[3]) of the second level (Level[2]) of the first section (Section[1]) of the model interior (\Interior).
Example 3 illustrates how to use a relative path. It tells us that the third compartment (Compartment[3]) has two exits. The first exit is through the first aperture (Aperture[1]) of the current level. The second exit is through the fifth aperture (Aperture[5]) on the first level (Level[1]) of the first section (Section[1]) of the model interior (\Interior).
Example 1 tells us to use Aperture 5 to enter into the model interior. Example 2 further informs us that Aperture 5 brings us into Compartment 3. Example 3 says that we can exit Compartment 3 through either Aperture 1 or 5.
The global zone (the top level node) node provides the list of apertures representing entrances into the model. If the global zone does not provide at least one aperture to enter the model, then the model interior is unreachable. To exit a compartment, it must connect to at least one aperture; if not, you may be able to enter the compartment, but you will not be able to exit. Finally, an aperture allows entrance into compartments. An aperture without connection is an exit point; in that case, a compartment must connect to the aperture.
The CDB Standard Schema Package provides the XML schema governing the construction of a valid CDB Zone. The schema includes provision for the <ConnectTo> tag.
Floor Zone
A Floor zone contains one or more Rooms, and all Partitions shared by these Rooms. A Floor is defined by the following XML tags.
Table 6-12: Floor Zone XML Tags
<CDB:Zone name = "Floor">
<Label> floor name </Label>
</CDB:Zone>
The <Label> is optional. It can be used to give the Floor a meaningful name such as “Ground Floor”, “Basement”, “Mezzanine”, or “Penthouse”.
The subgraph representing a Floor has the following structure.
Figure 6-26. Floor Zone Structure
The Footprint of a Floor is the minimum enclosing polygon containing all of the footprints of all of the Rooms on the Floor as well as the footprints of all of the Partitions associated with those Rooms. The Footprint is defined as per section 6.5.6.2, Model Footprint Zones. The Partitions contain the Apertures that connect two Rooms together. These Apertures are later referenced by Rooms.
Room Zone
A Room zone owns all its Surfaces and may contain Fixtures. A Room is defined by the following XML tags.
Table 6-13: Room Zone XML Tags
<CDB:Zone name = "Room">
<Label> _room name_ </Label>
<Aperture> _path to aperture 1_ </Aperture>
... other apertures as needed
<Partition> _path to partition 1_ </Partition>
... other partitions as needed
</CDB:Zone>
The <Label> is optional. It can be used to better identify the Room by its usual name. Examples are cubicle, toilet, conference room, atrium, office, electrical room, janitor room, etc.
The <Aperture> is optional but is likely to appear at least once, unless the Room is permanently closed and cannot be accessed. It points to one Aperture that connects this Room with another Room on this Floor or on another Floor. Two Rooms on the same Floor are connected through an Aperture in a Partition on the current Floor. Two Rooms on two different Floors are connected through an external Aperture in a Partition from the Interior zone. The path to an Aperture is built as specified in section 6.5.5, Model Zone Naming.
The <Partition> is also optional, but again, is likely to appear several times since a typical Room has a floor, a set of walls, and a ceiling.
The subgraph representing a Room has the following structure.
Figure 6-27. Room Zone Structure
The footprint is the smallest polygon containing all of the bottom surfaces when projected onto the XY plane [19]. There can be zero or more Fixtures in a Room. The Surfaces making up the volume of the Room are separated in three (3) groups (Bottom, Side, and Top) as defined by the UHRB specification.
Fixture Zone
A Fixture zone is defined in the same manner as a Room; it is made of a number of Surfaces defining a closed volume. The Fixture is defined by the following XML tags.
Table 6-14: Fixture Zone XML Tags
<CDB:Zone name = "Fixture">
<Label> _fixture name_ </Label>
<Moveable> _true/false_ </Moveable>
</CDB:Zone>
The <Label> is optional. It allows the modeler to describe what this fixture represents.
The <Moveable> flag is optional. It indicates whether or not the Fixture can move or if it is fixed. By default, the fixture does not move; if it does, the flag is set to true. A piece of furnitures is an example of moveable fixture while a column is an example of a fixed one.
The subgraph representing a Fixture is similar to that of a Room, except for the need to differentiate between the kinds of Surfaces. Its structure is presented here.
Figure 6-28. Fixture Zone Structure
The Footprint is the smallest polygon containing all of the Surfaces when projected onto the XY plane. The Surfaces form a closed volume, meaning there is no hole in the Fixture.
Alternately, to permit reuse of common fixtures stored in the GTModel Library, the Fixture may reference an existing model through the use of an XRef node. In that case, the following subgraph is to be used.
Figure 6-29. Fixture Zone Structure (XRef Subgraph)
Partition Zone
A Partition zone has Apertures, makes reference to all Surfaces composing it, and refers to its adjacent Rooms. The Partition is defined by the following XML tags.
Table 6-15: Partition Zone XML Tags
<CDB:Zone name = "Partition">
<Label> _partition name_ </Label>
<Room> path to adjacent room 1 </Room>
<Room> path to adjacent room 2 </Room>
<Surface> _path to surface 1_ </Surface>
... other surfaces as needed
</CDB:Zone>
The <Label> is optional. It allows the modeler to better identify the type of Partition: wall, floor, ceiling, etc.
The <Room> tag is mandatory and is used to identify the two Rooms adjacent to the Partition [20]. For this reason, there must be exactly two <Room> tags. The path to an adjacent Room is as specified in section 6.5.5, Model Zone Naming. Note that UHRB defines the concept of an “outside” room when the partition defines a building outside wall. In CDB, the path of this outside room is \Shell\Exterior as illustrated in 6.5.6.4.1, Model Pseudo-Interior.
The <Surface> tag appears as many times as necessary to refer to all Surfaces making up this Partition. A path similar to the one used to refer to a Room is used to refer to a Surface. Note that a Partition does not refer to the Surfaces that belong to its Aperture; that will be taken care of by the Apertures themselves.
The subgraph representing a Partition has the following structure.
Figure 6-30. Partition Zone Structure
The Footprint is the smallest polygon containing all of the referenced Surfaces when projected onto the XY plane. A Partition can have zero or more Apertures in it.
Aperture Zone
An Aperture zone provides a mean by which one can enter or exit a Room. The Aperture zone is defined by the following XML tags.
Table 6-16: Aperture Zone XML Tags
<CDB:Zone name = "Aperture">
<Label> _aperture name_ </Label>
<Is_Open> _true/false_ </Is_Open>
<Is_Fixed> _true/false_ </Is_Fixed>
<Damage_Level> _percentage of damage_ </Damage_Level>
<Room> _path to room 1_ </Room>
<Room> _path to room 2_ </Room>
<Surface> _path to surface 1_ </Surface>
... other surfaces as needed
</CDB:Zone>
The <Label> is optional. It allows the modeler to better identify the type of Aperture: door, window, trap, etc.
The <Is_Open> and <Is_Fixed> flags are both optional; they are considered false when not provided.
The <Damage_Level> tag is also optional and provides a mean to indicate the level of damage of the Aperture. The value is expressed as a percentage using an integer in the range 0 (no damage) to 100 (destroyed).
The <Room> tag appears exactly two times and points to the two Rooms connected by this Aperture. Sometimes one of these two rooms may be an “outside” room - a concept defined in UHRB. In CDB, the path of this outside room is \Shell\Exterior as illustrated in 6.5.6.4.1, Model Pseudo-Interior.
The <Surface> tag appears as many times as necessary to refer to all Surfaces making up this Aperture.
The subgraph representing an Aperture has the following structure.
Figure 6-31. Aperture Structure
The Footprint is the smallest polygon containing all of the referenced surfaces when projected onto the XY plane.
Surface Zone
A Surface zone contains useful geometry. That’s all it does. The Surface zone is a plain CDB zone. Its subgraph is presented here.
Figure 6-32. Surface Zone Structure
A Surface is composed of one or more OpenFlight Object nodes holding the geometry defining the surface: face or mesh records.
6.6. Model Points
A model point is similar to a model zone; it identifies a location on the model that is of interest to at least one simulation client device. A point defines a local coordinate system on the model. Hence, a point has a position and an orientation.
In some respect, a point and a zone are similar and can be used interchangeably. A zone is used when the component of interest is physically modeled and has a graphical representation. When the zone is not modeled but still represents a component of interest, a point is used to indicate its presence.
Again, the OpenFlight Group Node mechanism provides a convenient means of implementing the concept of a point because a transformation can be added to the node.
Requirements Class – Model Points |
|
/req/openflight/model-points |
|
Target type |
Operations |
Dependency |
Openflight Specification |
Requirement 23 |
/req/openflight/model-point-damage=states |
Requirement 24 |
/req/openflight/model-dis-origin |
Requirement 25 |
/req/openflight/model-viewpoint |
6.6.1. Definition
Table 6-17 below presents the syntax of the XML tags stored in the node’s comment record.
Table 6-17: XML Tags for Points
<CDB:Point name = "name">
... point attributes
</CDB:Point>
The point name is mandatory while the point attributes are optional. In general, a point can have the same name as a zone. Table 6-18 lists the OpenFlight records required to represent a point.
Table 6-18: OpenFlight Records for a Point
GROUP |
MATRIX (mandatory) |
COMMENT (mandatory) |
A model point is used in several occasions such as defining the attach point where another Model can anchor itself.
6.6.2. Usages
Model DIS Origin
A Model that is intended as a DIS entity requires a point that defines the origin of the entity’s coordinate system. This point is the center of the entity’s bounding volume excluding its articulated and attached parts [21].]. On a DIS network, the location of an entity is expressed relative to this point.
Requirement 23 |
req/openflight/model-point-damage=states There SHALL be a single definition of this point for all damage states and all levels of details for a given model. If the DIS origin is not defined, it SHALL defaults to the model origin. |
The following XML tag identifies the point.
Table 6-19: XML Tags for the DIS Origin
<CDB:Point
name = "DIS_Origin"
/>
Requirement 24 |
req/openflight/model-dis-origin The CDB Point representing the DIS Origin SHALL be positioned and oriented according the definition provided by the DIS Standard. This definition says that the DIS Origin is at the center of the bounding box of the entity, without articulated and attached parts. The standard also says what the orientation must be. The X-axis points forward, the Y-axis points to the right, and the Z-axis points down. All axes are aligned with the bounding box defined above. |
The intent of the DIS Standard is to have its axis system aligned with the body of the entity. When it comes to air platform, the body is associated with the fuselage of the entity. To illustrate the difference in orientation between the DIS entity’s bounding box and the CDB Model’s bounding box, consider the Chinook helicopter shown below.
Figure 6-33. Orientation of the Chinook Helicopter
The fuselage of this helicopter has a pitch angle of approximately 1.6 degrees when resting on its wheels. Below is a snapshot of its fuselage, without rotors and landing wheels.
Figure 6-34. The Body of the Chinook Helicopter
From the snapshots above, it is clear that the orientation of the DIS origin must be such that its XY plane makes an angle of 1.6 degrees with respect to the XY plane of the CDB axis system.
Here is a recommended way of defining the DIS Origin:
-
Create the Group Node and tag it as a CDB Point whose name is DIS_Origin.
-
Make the CDB Point a child of the zone that best represents the entity’s bounding volume without any articulated and attached parts.
-
Ensure the zone is properly oriented with respect to the CDB axis system.
-
Add a translation to position the origin at the center of the above bounding volume.
-
Add a rotation to align the X-axis to the front of this bounding volume.
-
Add another rotation to align the Z-axis with the bottom of the bounding volume.
-
By doing so, the Y-axis should already point correctly to the right side of the box.
Example
The snapshot below shows the proper location and orientation of the DIS origin on the Chinook. The DIS origin is represented by a set of 3 orthogonal Blue-Red-Green arrows. The blue arrow indicates the X axis; the green arrow points down and represents the Z axis.
Figure 6-35. The DIS Origon of the Chinook Helicopter
If you watch carefully, you will notice that the DIS axis system is aligned with the fuselage and makes an angle with the CDB XY plane.
Model Viewpoint
To generate the correct view of the outside world from a model’s viewpoint, a client device needs an indication of where is the viewpoint located with respect to the model’s origin. The viewpoint corresponds to the pilot’s seat in an aircraft, the driver’s seat in a ground vehicle, the navigation post on a ship bridge, the periscope on a submarine, or the eyes of a soldier.
Requirement 25 |
req/openflight/model-viewpoint The viewpoint’s local coordinate system SHALL be oriented such that the Y-axis indicates the viewing direction and the Z-axis points up. |
The viewpoint has optional attributes to define the field of view available from this position. The field of view is defined by a frustum aligned along the local Y-axis. The horizontal field of view lies in the local XY plane while the vertical field of view is in the YZ plane.
Table 6-20: XML Tags for a Viewpoint
<CDB:Point name="Viewpoint">
<FOV>
<Horizontal>min max</Horizontal>
<Vertical>min max</Vertical>
</FOV>
</CDB:Point>
All values are expressed in degrees using decimal numbers. The default values are ±30.0° in both directions for a total of 60.0° of horizontal and vertical fields of view.
Model Attach Point
A Model can be attached to another Model by mean of an attach point.
An attach point defines the position to which other (subordinate) models can attach themselves. For instance, a fighter has a number of attach points defined to receive missiles or external fuel tanks.
Table 6-21: XML Tags for Attach Point
<CDB:Point
name = "Attach_Point"
/>
The orientation of the attach point is used to indicate how the two models connect together. A connection occurs by superimposing the coordinate system of the subordinate model with the coordinate of the attach point.
Model Anchor Point
The anchor point defines the location where a subordinate Model attaches to a parent Model. The anchor point is the counterpart to the attach point. Both can be seen as the male/female part of a connector and its receptacle.
Table 6-22: XML Tags for Anchor Point
<CDB:Point
name = "Anchor_Point"
/>
The orientation of the anchor point is used to indicate how the subordinate model connects to the parent model. A connection occurs by superimposing the anchor point (of the subordinate model) with the attach point (of the parent model).
The default anchor point of a subordinate model is its origin.
6.7. Model Conforming
Historically, the integration of models onto the terrain has been performed during the database compilation process. These offline approaches varied considerably from vendor to vendor because there were no standardized approaches related to terrain meshing structures, varying visual priority and hidden-surface removal mechanisms, runtime LOD mechanisms, number of LODs, etc.
This section describes a series of model conformal modes that instruct client-devices on how they should conform models to the underlying terrain.
All of the conformal modes rely on the conforming of the model origin and/or model vertices onto the terrain mesh directly beneath the model. Note that the Z-component of the model’s vertices is with respect to model’s XY plane (as shown in Figure 6‑36).
Figure 6-36. Conforming Vertices to Terrain
Note that by definition, all portions of the model below its XY plane represent some form of under ground basement. The conforming of models on steep or rough terrain may yield unusual results because portions of the basement may be visible. This may require the modelers to level the terrain in the immediate vicinity or adjust the model.
A modeler can specify a model’s conformal mode by adding the following XML tags to the zone representing the model.
<CDB:Zone>
<Conformal mode="..."/>
</CDB:Zone>
The conformal modes are listed in Table 1 below.
Table 6-24: Conformal Modes
| Conformal Mode |
|---|
Absolute |
Point |
Vertex |
Line |
Plane |
Surface |
6.7.1. Non Conformal (Absolute) Mode
When attributed as a Non Conformal model, none of the model vertices are conformed to the underlying terrain. Instead the model’s Z-values are used as-is, as elevation values. As a result the model is absolutely positioned and behaves independently of the terrain. The shape and orientation of the model is preserved. This conformal mode is typically used for the modeled representation of point-features. Typical use-cases include buildings, trees, and poles.
6.7.2. Point Conformal Mode
The Point Conformal mode conforms a single point of the model (its origin) onto the underlying terrain. All of the other model vertices are translated along the Z-axis; as a result, the shape of the model is preserved by this conformal operation. In effect, the Point Conformal mode dynamically positions a model on the underlying terrain so as to preserve the model’s relative altitude over the terrain. Point-conforming is the default conformal mode for the modeled representation of point-features. Typical use-cases include buildings, trees, and poles.
Figure 6-37. Origon Conformal Mode
6.7.3. Vertex Conformal Mode
The Vertex Conformal mode conforms each of the vertices of a model on the underlying terrain. The shape of the model is not preserved by this conformal operation. The model’s XY plane defines a reference plane used by client-devices to adjust the elevation of each of the model’s vertices. This conformal mode is used for 3D models that represent typically long 3D lineal features or large 3D areal features that need to follow the terrain profile. Typical uses include fences, walls, trenches, and forest canopies.
Figure 6-38. Vertex Conformal Mode Example
6.7.4. Line Conformal Mode
The Line Conformal mode conforms each of the two reference vertices of the “linear” model on the underlying terrain. All of the other model vertices are sheared along this axis; as a result, the shape of the model is not preserved by this conformal operation. The model’s XY plane defines a reference plane used by client-devices to adjust the elevation of the two reference vertices. This conformal mode is used for models that represent lineal features such as powerlines and monorails.
Figure 6-39. Line Conformal Mode
The line that is used to specify the conforming is defined by a Face node with the following XML tags:
<CDB:Face>
<Conformal_Line/>
</CDB:Face>
This Face node defines a single line with two vertices, the first one, Vs, being the start and the second, Ve, the end of the line.
6.7.5. Plane Conformal Mode
The Plane Conformal mode conforms each of the three reference vertices of the “planar” model on the underlying terrain. The resulting three vertices define a model transformation matrix that can then be applied to the vertices of the model. As a result, the shape of the model is preserved by this conformal operation, but the model undergoes a change in pitch and roll angles. Given this property, there are relatively few cases where this conformal mode can be used [22]. However, as shown in Figure 6‑41, this conformal mode is required when conforming the curved segments of 3D (raised profiled) modeled road features.
Figure 6-40. Plane Conformal Mode
Figure 6-41. Application of Line and Plane Conformal Modes on 3d Roads
The plane that is used to specify the conforming is defined by a Face node with the following XML tags:
<CDB:Face>
<Conformal_Face/>
</CDB:Face>
The Face node has exactly 3 vertices defining the plane used for the conforming. The only restriction on these 3 vertices is that they must not be collinear.
6.7.6. Surface Conformal Mode
This conformal mode is used for models whose points, edges and surfaces must all conform exactly to the underlying terrain. The Surface Conformal mode requires that the model’s edges and surfaces be clipped to the underlying terrain. The original vertices and the added vertices resulting from the clipping operation are conformed to the underlying terrain. As a result, the shape of the model is not preserved by this conformal operation. This conformal mode is primarily used for the modeled representation of 2D surface-feature such as paint markings and other terrain overlays. In addition, it can be used for 3D models that represent typically long or large 3D lineal and 3D areal features that need to perfectly follow the terrain profile. Note that in most cases, the vertex conformal mode provides an adequate solution for 3D models and is more economical to use than the surface conformal mode.
Figure 6-42. Surface Conformal Mode
6.8. Model Levels-of-Detail
Requirements Class – Model Levels of Detail |
|
/req/openflight/model-lod |
|
Target type |
Operations |
Dependency |
Openflight Specification |
Requirement 26 |
/req/openflight/significant-sizes |
A levels-of-detail model structure is essential when the intent is to use a model in a real-time application such as flight simulation. The level-of-detail mechanism provides client-devices with the essential structure for deterministic operation. Deterministic operation can be achieved only if a client-device can:
-
control the paging bandwidth from the CDB main storage device
-
control client-device processing load
-
control client-device memory footprint
-
control run-time publishing processing load and
-
control run-time publishing memory footprint
For this reason, it is recommended to create LODs, especially for complex Models, and for models that are used extensively, in great density in the CDB data store. This is most critical for geospecific cultural models (especially in densely modeled geospecific areas of the synthetic environment) since they can consume a significant portion of the paging bandwidth and memory footprint of the client-devices. As a corollary, simple Models should not be made more complex by adding unnecessary level of details. The CDB standard provides rules for determining model complexity, and selecting the appropriate LOD, as defined in Chapter 3 of Volume 1: OGC CDB Core Standard:Model and Physical Database Structure.
OpenFlight LOD nodes now support two methods of specifying the criteria to determine if a level of detail is active, that is if the user application should traverse the node and its children. The first method, the classic one, is to specify the switch in and switch out distances in real world units. Using this method, a level of detail is active when the distance from the viewpoint to the center of the LOD is within the switch-in and switch-out distances. The second method uses the Significant Size associated with the LOD node to determine when to activate the node.
Requirement 26 |
req/openflight/significant-size The CDB Standard SHALL: • Use the Significant Size associated with the LOD node to determine when to activate the node • The Significant Size of LOD node 2 SHALL be less than the Significant Size of LOD node 1. • Features whose Significant Size is larger than 110 km (the dimension of a geocell) SHALL be clipped (if a continuous surface) or ungrouped (if multiple discontinuous surfaces) until the maximum size criteria is met. • LOD nodes SHALL be sorted in decreasing order of their Significant Size attribute. • Sibling LOD nodes SHALL be mutually exclusive. |
There are several problems associated with the classic, range-based method. In a visual system for instance, the switching distance should be based on both range and the system resolution of the entire visual system; a database designed to rely solely on a range-based switching criteria is not truly portable, especially if the intent is to use it on systems with wildly different visual resolution. Furthermore, the blending or morphing of models solely based on range criteria can lead to undesirable effects. When the viewpoint moves quickly, the distance over which the model is LOD-transitioning should be large enough to avoid the “popping-in” of the higher LOD version. On the other hand, if the viewpoint is moving very slowly, the distance over which the model is LOD-transitioning should be reduced to avoid the “LOD-ghosting” of the higher LOD version. These two constraints make implicit assumptions on the model’s speed. In applications where the aircraft’s flight regime varies considerably (V22 for example), it is impossible to find a single set of LOD start and end points that simultaneously cater to all flight modes (hover versus cruise). Here again, a database design that directly encodes the start and end points of a model’s LOD transition is not truly portable, because it makes implicit assumptions on the speed it will be used for. Thus, in a tactical fighter application, the start and end points of a model’s LOD transition need to be widely spaced apart to prevent a popping effect at the onset of the LOD transition. Conversely, in a tank application, the start and end points of a model’s LOD transition need to be much more closely spaced to prevent a ghosting effect as the higher LOD model is blended-in. If the client device wants to implement some form of transition between LODs, the criteria should be based on a user-defined duration. Transitions between LODs can involve fading in the next LOD while fading out the current one. That fading operation should not last forever. It should be accomplished in a relative short period of time. The second method to transition from one LOD to the next is to use morphing. In the case of morphing, the transition period is less critical because the client-device (typically an Image Generator) does not blend-in two models together.
The consequences of such implicit assumptions result in a database that is highly client-device, and application-specific.
For all these reasons, the CDB standard has selected the second method to control the LOD mechanism.
Two methods exist to implement LODs, exchange or addition. The two methods can be used simultaneously and are not mutually exclusive.
In the first method, details are progressively added to the model, as the viewpoint gets closer. With the second method, different representations of the same model are substituted for one another based on the viewing distance. Figure 6‑43: Exchange and Additive LOD Nodes, illustrates the general organization of Models with both types of LOD nodes.
6.8.1. Exchange LODs
In the exchange LOD method, different representations of the same model are substituted for one another based on the model’s Significant Size. It is up to the client-devices to derive appropriate LOD transition viewing distance from the model’s Significant Size and the client-device’s field-of-view and resolution parameters.
6.8.2. Additive LODs
Additive LOD is just a special case of the more general Exchange LOD paradigm. When a LOD node has no sibling LOD, it becomes an Additive LOD node. That does not change the fact that at most one LOD node gets selected when its Significant Size justifies it.
Figure 6-43. Exchange and Additive LOD Nodes
The LOD nodes in light brown represent Exchange LODs and are mutually exclusive. The two dark brown shaded LOD nodes are considered Additive LODs because they do not have another sibling node of type LOD.
Note that to make sense, the Significant Size of LOD node 2 must be less than the Significant Size of LOD node 1 (Requirement 26). The same is true for the Significant Size of LOD node 3 with respect to LOD node 2. Also, LOD node 3 has an additional constraint, its Significant Size must be greater than the one assigned to LOD node 4. If these constraints are not followed, LOD node 4 will be selected before LOD nodes 2 or 3 have a chance of being displayed.
6.8.3. Significant Size
The concept of a Significant Size is a recent improvement of the OpenFlight Specification. When a finer model LOD is created, the modeler typically adds additional geometric detail, additional features (such as markings), or refines the shape of curved surfaces (such as engines, wheels), etc. When assigning a Significant Size to a model LOD, the modeler needs to answer the following question: When I created a new model LOD, I did so to create additional detail in my model. What is the largest dimensional change in geometry for this new model LOD? In other words, what is the largest dimensional difference of a surface between this LOD and the next coarser LOD? In effect, the value of Significant Size corresponds to the “modeling difference” between the LOD and the next coarser LOD. At runtime, a client-device converts this modeling difference value from its real-world dimensional value into a viewing error value (typically measured in pixels or degrees). The client-device can then activate the appropriate model LOD because it knows that the modeler’s intent in creating the LOD was to show features, eliminate all modeling discrepancies whose dimension equaled that of the Significant Size dimension associated with that model’s LOD. This contribution of the LOD to the scene is based on the LOD’s Significant Size as well as other parameters (such as system resolution) relevant to the simulation model used by the client device.
Version 16.0 of the OpenFlight Specification introduces the concept of Visual Significance that is different from the concept of Significant Size. The concept of Visual Significance translates in two fields called Significance and they are found in the Group Record and Object Records [23]. Here is the definition of this field as found in reference [11]:
“Significance can be used to assist real-time culling and load balancing
mechanisms, by defining the visual significance of this group with respect to other groups in the database. Normally the value of this attribute is zero”.
The CDB standard mandates a value of zero for Visual Significance; the value zero indicates the object or the group has no particular significance and is not more or less important than any other objects or groups. Any other values, whether negative or positive, are reserved for future use by this Specification.
Definition of Significant Size
The Significant Size is defined as the “size” of the model, expressed in meters. By extension, it applies equally well to a submodel represented by an Additive LOD. In the case of an Exchange LOD, the Significant Size is the difference between two representations of the model or submodel.
Estimating the Size of the Model
Many models have shapes that resemble a cube (with roughly equal length, width, and height), and thus their significant size can be simply estimated by the length of the diagonal of their bounding box. As the shape of a model departs from that of a simple cube, either with respect to aspect ratio, or with respect to the amount of negative space within its bounding box, the model’s significant size should be decreased proportional to the amount of departure.
How to use the Significant Size
The Significant Size is used to distribute models into appropriate CDB LODs. Once a value is assigned to the coarsest LOD of a model, subsequent LODs of the same model can be distributed to subsequent CDB LODs. Use Table 3-1 and the model Significant Size to identify the CDB LOD it belongs to.
For instance, if the size of a building is estimated to 75 meters, then its coarsest LOD will be stored in CDB LOD 0, according to Table 3-1. On the other hand, a 2-meter park bench will appear in CDB LOD 5.
6.8.4. LOD Limits
The number of vertices per LOD is limited to ensure a smooth progression between all representations of the same model. Table 6-25 below gives the maximum number of vertices allowed for each Model-LOD.
Table 6-25: Maximum Number of Vertices per Model-LOD
Model LOD |
Maximum Number of Vertices |
CDB LOD |
0 |
128 |
CDB LODc + 0 |
1 |
512 |
CDB LODc + 1 |
2 |
2048 |
CDB LODc + 2 |
3 |
8192 |
CDB LODc + 3 |
4 |
32768 |
CDB LODc + 4 |
5 |
131072 |
CDB LODc + 5 |
6 |
524288 |
CDB LODc + 6 |
7 |
2097152 |
CDB LODc + 7 |
The table above shows that a model is allowed up to 8 levels of details, numbered from 0 to 7. Model-LOD 0 is the coarsest level of detail of the model and may count up to 128 vertices. As the complexity of subsequent Model-LODs augments, a higher vertex count is permitted. The CDB LOD that is associated with a Model-LOD is expressed relative to the CDB LOD assigned to its coarsest representation, designated by CDB LODs.
How to Assign CDB LODs
To illustrate the use of Table 6-25, take a 3D model representing a building with three representations:
-
Coarsest LOD:
-
8 vertices
-
Significant Size estimated to 25 meters
-
-
Medium LOD:
-
2244 vertices
-
Significant Size estimated to 4 meters
-
-
Finest LOD:
-
10320 vertices
-
Significant Size estimated to 10 cm
-
The CDB LODs are first established by looking up the Significant Sizes of the three representations in Table 3-1:
-
Coarsest LOD:
-
25 m is CDB LOD 2
-
This is CDB LODc
-
-
Medium LOD:
-
4 m is CDB LOD 4
-
-
Finest LOD:
-
10 cm is CDB LOD 10
-
We then use the vertex count to identify the Model-LOD in Table 6-25:
-
Coarsest LOD:
-
28 vertices is Model-LOD 0
-
-
Medium LOD:
-
2244 vertices is Model LOD 3
-
Should be assigned to CDB LODc (2) + 3 = 5
-
-
Finest LOD:
-
10320 vertices is Model LOD 4
-
Should be assigned to CDB LODc (2) + 4 = 6
-
Since all representations of the model must meet both the constraints associated with the Significan Size and the Vertex Count, the final CDB LODs are the maximum ones identified above.
-
Coarsest LOD:
-
CDB LOD 2
-
-
Medium LOD:
-
CDB LOD 5
-
-
Finest LOD:
-
CDB LOD 10
-
6.8.5. LOD Generation Guidelines
The following guidelines should help modelers produce efficient CDB models for use in real-time environments. There are two way of proceeding; one way is to create the finest representation of the model and then simplify it until the coarsest representation is obtained. The other way consists in creating the coarsest representation first and then refining it until the desired representation is obtained. In general:
-
The coarsest Model-LOD is the simplest possible geometric representation of the model using at most 128 vertices.
-
A coarser Model-LOD is created by removing details from a finer Model-LOD.
-
Alternately, a finer Model-LOD is created by adding details to a coarser Model-LOD.
-
In both cases, the size of the details that are removed or added to a Model-LOD should be consistent with its Significant Size.
-
Model-LOD 0 is mandatory; the others are optional and exist only if Model-LOD 0 isn’t sufficient to represent the model with a proper level of detail.
-
Multiple Model-LODs do not need to be consecutive.
6.9. Model Switch Nodes
A Switch Node allows the selection of zero or more children by invoking a selector mask. Any combination of children can be selected per masks and the number of definable masks is unlimited. The CDB standard makes use of OpenFlight Switch Nodes to control the state of Model Components (zones and points).
Requirements Class – Model Switch Nodes |
|
/req/openflight/model-switch-nodes |
|
Target type |
Operations |
Dependency |
Openflight Specification |
Requirement 27 |
/req/openflight/switch-mask |
Requirement 28 |
req/openflight/switch-mask-name |
6.9.1. Definition
XML tags in the comment record are added to the switch’s primary record to identity it as a CDB Switch.
Table 6-25b: XML Tags to Create a CDB Switch
<CDB:Switch name = "switch name">
... switch attributes
</CDB:Switch>
Requirement 27 |
req/openflight/switch-mask+
The switch SHALL contain one mask per state. Note that the first mask, mask index 0, is the default mask. This means that the value of the Current Mask field in the Switch record SHALL be 0. |
As an example, if the switch has 3 children, each representing a separate state of the parent zone, then the switch needs 3 masks, each selecting one child.
Requirement 28 |
req/openflight/switch-mask-name In addition to defining a mask for each switch state, each mask SHALL be named. The name of the mask SHALL be representative of the state selected by that mask. |
The actual name is at the discretion of the modeler.
The corresponding OpenFlight records are as follow:
Table 6-26: OpenFlight Records to Create a CDB Switch
SWITCH |
COMMENT (mandatory) |
INDEXED STRING |
6.9.2. Usage
Articulations
Switch nodes provide an alternative to DOF nodes when an articulated part is implemented for only a few positions. An example of this use of switches is the control of undercarriage or control surfaces on aircraft. Suppose the modeler wants to represent the flaps in two distinct positions: flaps up and flaps down. A switch is the simplest way to implement these two flaps positions. In this example, the switch name could be “Flap Control” and the two mask names could be “Flap Up” and “Flap Down”.
Suppose the modeler wants to provide two positions for the door on a hangar: open and close. In addition, when the door is open, the modeler provides a representation for the interior of the hangar, which is not the case when the door is closed. Again, the use of a switch is appropriate to provide the control over the door position. A proper name for the switch would be “Door Position” and the appropriate names for the two masks would be “Door Closed” and “Door Open”.
Damage States
Switch nodes can be used to select one of many modeled representations of damages. A zone has at least a normal (usually undamaged) state. When other states exist, an OpenFlight switch node is used to select which state is active. A single damage state can be active at any time.
Requirements Class – Damage Status |
|
/req/openflight/damage-status |
|
Target type |
Operations |
Dependency |
Openflight Specification |
Requirement 29 |
/req/openflight/damage-transition |
Requirement 30 |
req/openflight/damage-order |
Figure 6‑45: General Damage State Tree Structure shows the general organization of a zone with several states.
Figure 6-45. General Damage State Tree Structure
Each damage state represents the zone with a certain level of damage. This level of damage is expressed as a percentage from 0 to 100%. A level of damage of 0 % means the zone is not damaged at all. At the opposite end, a percentage of damage of 100 % indicates the zone is completely destroyed.
To identify a damage state switch, use the following XML tags in the switch comment record.
Table 6-27: XML Tags for Damage State Switch
<CDB:Switch name = "Damage_State">
<Damage_Level>...</Damage_Level>
</CDB:Switch>
The XML element <Damage_Level> is a list of percentages representing the transitions between child nodes of the switch. The list counts ‘n-1’ entries where ‘n’ is the number of states.
Requirement 29 |
req/openflight/damage-transition The percentages representing the transitions SHALL be limited to the range [0, 99]. The value 100 is not allowed because the level of damage SHALL exceed the transition value in order to select the correct state. |
To illustrate the concept of level of damage, assume a damage state switch has 3 child nodes representing the zone in normal, damaged, and destroyed states. Also, assume that the modeler’s intent is to switch to the damaged state when the level of damage exceeds 25 %, and to switch to the destroyed state when the level of damage exceeds 75 %. Here, the XML tag associated with the switch should look like this.
Table 6-28: Example of a Damage State Switch with Two Transitions
<CDB:Switch name = "Damage_State">
<Damage_Level>25 75</Damage_Level>
</CDB:Switch>
Requirement 30 |
req/openflight/damage-order The ordering of damage states SHALL be from left (normal state) to right (destroyed state). All intermediate states must represent increasingly damaged states from a slightly damaged state to an almost destroyed state. The number of states is left to the discretion of the modeler. |
Figure 6-46. Damage States Ordering
While the number of damage states is left to the discretion of the modeler, some choices are better than others. Since a Model is meant to be used in a simulator and since many simulators are DIS-compliant, it is suggested to create the same number of CDB damage states as there are DIS damage states for the corresponding entity.
For instance, if the Model represents a DIS land platform such as the M1A2 tank, the modeler could create four damage states to match the four corresponding DIS damage states labeled No Damage, Slight Damage, Moderate Damage and Destroyed.
The DIS and the HLA standards are relatively vague regarding the definition of damage states. In the case of the DIS standard, the damage state is a field that belongs to a structure called the Entity Appearance. The field has only 2 bits and, accordingly, accommodates four different values. For HLA, version 2 of the RPR-FOM defines the damaged appearance as a 32-bit enumeration for which only 4 values have been defined so far – the same values as the one defined by DIS, that is No Damage, Slight Damage, Moderate Damage and Destroyed.
For both DIS and HLA, it is obvious that the damage state is meant to be a visual damage state.
The question to answer is the following: “What should the universally accepted visual appearance be for a slightly (or moderately) damaged state?”
In the DIS world, a platform is often qualified in terms of Mobility and Fire Power [24]. Using these two criteria, it is possible to define the following guidelines.
-
A slightly damaged model should represent a platform with limited mobility. However, its firepower is intact and it should be apparent that the entity is still capable of firing its weapons.
-
A moderately damaged model should represent a platform for which both mobility and firepower are reduced without being completely out of service.
As a corollary, here are the definitions of normal and destroyed states.
-
An undamaged model should represent a platform for which both mobility and fire power are completely operational.
A destroyed model should represent a platform for which both mobility and firepower are completely out of service.
Temporal Anti-aliasing
Temporal anti-aliasing may be achieved with the use of special textures. These textures are often required to aid IG client-devices to eliminate strobing effects on model rotating objects such as helicopter rotors, aircraft propellers, or vehicle wheels.
Figure 6‑47: Example of a Texture Representing a Rotor, is an example of a semi-transparent texture used to simulate a rotating helicopter rotor.
Figure 6-47. Example of a Texture Representing a Rotor
Motion blur textures are general base textures with a Texture Kind of S001. The Texture Index (Tnn) is used to sequentially number several motion blur textures representing the same object.
The use of motion blur textures can be combined with DOF and Switch nodes to produce efficient switching between several versions of a single rotating part.
The following subtree illustrates how four versions of the above rotor could be modeled using one solid version and three blurred versions.
Figure 6-48. Multiple Versions of Rotating Parts
In this example, three textures are used to represent an increasingly blurred rotor.
In order to detect the presence of the above construct, the following XML comment must be added to the switch node.
Table 6-29: XML Tags for Motion Blur Switch
<CDB:Switch name = "Motion_Blur">
<Blurriness>...</Blurriness>
</CDB:Switch>
The children of the switch node could be any OpenFlight nodes. Most likely, the nodes that contain the geometry will be OpenFlight Object nodes.
When modeling solid and blurred objects in this manner, the CDB Standard requires that the leftmost child node contains the solid version of the object while the sibling nodes to the right contain increasingly blurred version of the same object.
The XML element <Blurriness> is a list of percentages representing the transitions between child nodes of the switch. The list counts ‘n-1’ entries where ‘n’ is the number of child nodes.
Requirement 31 |
req/openflight/blurring-transition The percentages representing the transitions SHALL be limited to the range [0, 99]. The value 100 is not allowed because the level of blurriness SHALL exceed the transition value in order to select the correct child node. |
To illustrate the concept of level of blurriness, assume a motion blur switch has two child nodes. Also, assume that the modeler’s intent is to switch to the second node when the level of blurriness exceeds 10 %. Here, the XML tag associated with the switch should look like this.
Table 6-30: Example of a Motion Blur Switch with One Transition
<CDB:Switch name = "Motion_Blur">
<Blurriness>10</Blurriness>
</CDB:Switch>
6.10. Model Articulations
Requirements Class – Model Articulations |
|
/req/openflight/model-articulations |
|
Target type |
Operations |
Dependency |
Openflight Specification |
Requirement 32 |
req/openflight/articulation-node-rotation |
Requirement 33 |
/req/openflight/gimbal-limits |
Requirement 34 |
req/openflight/articulation-flags |
6.10.1. Definition
An OpenFlight DOF node is used to implement the concept of a CDB Articulation. The node gives the modeler controls over all 9 degrees of freedom, translation, rotation and scaling on all 3 axes. Generally, only one degree of freedom is allowed at a time and most often, that single degree of freedom is a rotation about a single axis. However, the modeler is free to allow any translation, rotation and, even scaling; even though stretching an articulation does not usually produce a realistic effect.
Since only one articulation is allowed per zone, the zone name is sufficient to identify and control the DOF node.
A CDB Articulation node is an OpenFlight DOF node with attributes in the form of XML tags. Table 6-31 below presents the syntax of the XML tags stored in the DOF node’s comment record.
Table 6-31: XML Tags for DOF
<CDB:Articulation name="name" id="id">
<Translation>
<X rate="value" />
<Y rate="value" />
<Z rate="value" />
</Translation>
<Rotation>
<X rate="value" />
<Y rate="value" />
<Z rate="value" />
</Rotation>
<Scaling>
<X rate="value" />
<Y rate="value" />
<Z rate="value" />
</Scaling>
</CDB:Articulation>
The above XML tag is necessary in two circumstances:
-
The articulation represents a DIS Articulated Part.
-
The articulation is to be animated automatically.
A CDB Articulation node has an optional name that is used to self-document the articulation. The optional identifier provides the corresponding DIS Articulated Part. It is suggested to use a name inspired from the DIS Articulated Part ID, when the identifier is supplied. For instance, DIS identifies as Primary Gun 1 the articulated part whose ID is 4416. That example would generate the following XML tags:
<CDB:Articulation name="Primary Gun 1" id="4416" />
Section 4.7.3 in reference [4] provides a list of DIS Articulated Part IDs.
It is possible to specify an optional Rate-of-Change for each Degree of Freedom along their X, Y, and Z axes for Translation, Rotation, and Scaling. The translation rate is expressed in meters per second. The rotation rate is expressed in degrees per second. Finally, the scaling rate is in units per second. When not specified, a default rate of zero is assumed.
Requirement 32 |
req/openflight/articulation-node-rotation The translation rate SHALL be expressed in meters per second. The rotation rate SHALL be expressed in degrees per second. Finally, the scaling rate SHALL be expressesd in units per second. When not specified, a default rate of zero SHALL be used. |
For instance, a primary radar antenna that rotates at a rate of 10 degrees per second about its Z-axis would require the following XML tags:
<CDB:Articulation name="Primary Radar 1" id="5376">
<Rotation>
<Z rate="10"/>
</Rotation>
</CDB:Articulation>
Another example, to illustrate how to attribute a rotating wind mill; assuming the mill rotates about the Y-axis at a rate of 5 degrees per second:
<CDB:Articulation>
<Rotation>
<Y rate="5"/>
</Rotation>
</CDB:Articulation>
Requirement 33 |
req/openflight/gimbal-limits Gimbal limits are mandatory on DOF nodes and the appropriate flags SHALL be set to specify which degrees of freedom are controlled by a particular articulation. |
Requirement 34 |
req/openflight/articulation-flags+
The Flags field is located at offset 376 in the OpenFlight DOF record and its value cannot be zero because the articulation SHALL control at least one degree of freedom. |
6.10.2. Usage
Rotating Parts
A common problem in simulation is to correlate the linear speed of a model with the angular speed of its wheels. More generally, the client device simulation models often require the dimension of rotating parts. This information can be obtained from the zone extent; the bounding box surrounding a zone provides the dimension of rotating parts.
6.11. Model Light Points
The CDB standard does not make a distinction between light points and light sources. Both represent real lights that emit light and that can illuminate neighboring objects. In most current visual systems, a light point is a simple representation of a point source of light when viewed from a distance; it has no observable lighting effect on its immediate surroundings. In real-life however, as an observer moves closer to the light, its lighting or illuminating effect on the surrounding objects becomes increasingly observable; furthermore, the actual shape of the light also becomes more distinct.
In a typical simulator, client-devices may choose to limit the representation of the light to a single point and neglect the illuminating effect of the light on neighboring objects and terrain. For this reason, it is up to the client (and its RTP) to determine whether a light can illuminate its surroundings or not; the decision is based on the type of light and the inherent capabilities/capacity of the client.
Another point to consider is the fact that a light may have a very different representation depending on the client device. For instance, consider the visual representation of a light by an IG compared with the representation required by a radar system, NVG device or a FLIR device.
For all of these considerations, the CDB standard has adopted the following approach in defining lights. The OpenFlight file defines only the position, direction and the name of the light type; no other attributes are specified. The CDB standard provides a very elaborate light type naming convention. This convention permits clients to internally derive all of the properties and parameters needed to render the light. The approach is entirely device-independent. Modelers need not concern themselves with hundreds of parameters, many of which are often specific to underlying algorithms within the client. The naming convention ensures that the client has all of the information needed to capture the modeler’s intent. Because the approach is device-independent, the rendering is limited only by the client’s capabilities, not by the database itself.
As a result, lights in OpenFlight are defined by inserting an Indexed Light Point record into the OpenFlight scene graph. A vertex and a normal are stored in a Vertex List record that defines the position and direction of the light. The name of the light type is stored in the Light Point Appearance Palette record.
The light type’s name fully defines the appearance, animation and other characteristic relevant to the field of simulation. It is the responsibility of the client to supply the internal parameters that correspond to each of the light types supported by the CDB standard.
Light type naming conventions are defined in Section 2.3 of the Volume 1: OGC CDB Core Standard:Model and Physical Database Structure, CDB Core Model, Light Naming, and the list of names is presented in Annex J, Volume 2: OGC CDB Core: Model and Physical Structure: Annexes (formerly CDB Best Practice Volume 2 Appendix E).
Requirement 35 |
req/openflight/light-vertex-list A Vertex List record SHALL follow the OpenFlight Indexed Light Point record. |
The list of vertices contains one vertex if a single light point is defined. The list contains several vertices when multiple independent light points are defined. An optional matrix and replication count permits the definition of a light string.
Table 6-32: OpenFlight Records for a Light Point
INDEXED LIGHT POINT |
MATRIX (optional) |
REPLICATE (optional) |
PUSH LEVEL |
VERTEX LIST |
POP LEVEL |
6.12. Model Attributes
This section defines a general attribution mechanism to add CDB and Vendor-specific attributes to any OpenFlight nodes. These attributes follows the rules of inheritance; they are automatically propagated from higher levels through lower levels of the OpenFlight graph. A child node inherits the attribution of its parent node.
6.12.1. Definition
Model attributes are added to OpenFlight nodes through a Comment record containing XML tags. The general format is as follows:
<CDB:node name="...">
<ns:Attribute name="..." value="..."/>
... other attributes
</CDB:node>
<CDB:node> identifies the node to which the attributes are added. The node token can take the following values:
-
Zone
-
Point
-
Group
-
Object
-
Switch
-
Face
-
Mesh
-
Articulation
-
Light
-
XRef
-
LOD
The XML namespace (ns) of the attribute is optional; when present it identifies the owner of the attribute. When not specified, the default namespace is CDB.
Any CDB Attributes that are listed in section 5.7.1.3 can be used as node attributes. The name of the attribute is the key to search for the matching symbol into the metadata file named CDB_Attributes.xml; this file is described in section 5.1.7 and provides the means to interpret the value of the attribute.
6.12.2. Vendor Attributes
A vendor attribute is identified by its XML namespace. The standard uses the CDB namespace; a vendor may use any other string to identify itself.
Requirement 36 |
req/openflight/model-vendor-attributes The definition of vendor attributes SHALL be stored in Vendor_Attributes.xml |
It is understood that vendor attributes are not interpreted by any other client-devices other than those supported by the vendor. Reliance by a vendor on Vendor Attributes can reduce the interoperability of the CDB with other vendors.
6.12.3. Examples
To add the LPH attribute to a CDB Light node, use the following comment:
<CDB:Light>
<Attribute name="LPH" value="300"/>
</CDB:Light>
Assume a T2DModel contains the Los Angeles International Airport as one of its 2DModels; the zone associated with the airport could use the APID attribute in the following manner:
<CDB:Zone name="Los Angeles International Airport">
<Attribute name="APID" value="KLAX"/>
</CDB:Zone>
A company named “Acme Inc.” uses the string “Acme” as the namespace qualifying its vendor-specific attributes. If the company wants to add the MyAttr attribute to a CDB Articulation, it could do so by using the following XML tags:
<CDB:Articulation name="Primary Gun 1" id="4416">
<Acme:Attribute name="MyAttr" value="-1.23"/>
</CDB:Articulation>
To interpret the attribute, a client application searches the file Vendor_Attributes.xml for an attribute whose symbol is MyAttr. When found, the application knows how to parse and interpret the attribute’s value. Furthermore, if the client application recognizes the identification of the vendor (Acme:), it knows what to do with MyAttr.
6.13. Model Textures
Requirements Class – Model Textures |
|
/req/openflight/model-textures |
|
Target type |
Operations |
Dependency |
Openflight Specification |
Requirement 37 |
req/openflight/texture-file-loading |
Requirement 38 |
req/openflight/quarterly-textures |
Requirement 39 |
req/openflight/monthly-textures |
Requirement 40 |
req/openflight/texture-mipmap |
Requirement 41 |
req/openflight/texture-palette-path |
Requirement 42 |
req/openflight/texture-shadow-geometry |
Requirement 43 |
req/openflight/model-skin-textures |
Requirement 44 |
req/openflight/model-night-maps |
Requirement 45 |
req/openflight/night-map-generation |
To achieve a certain degree of realism, models require the use of textures. Furthermore, textures add details to a model without increasing its polygon count. This is excellent to reduce the complexity of the geometry but at the same time, it creates a load management issue for client devices that are interested in these textures.
Requirement 37 |
req/openflight/texture-file-loading+
In the case of GTModels and MModels, textures are separate files that SHALL be loaded after the model geometry files are read and loaded by client devices; in the case of GSModels and T2DModels, the textures can be loaded concurrently with the model geometry files. |
A client device discovers the existence of textures while loading the model.
One of the goals of the CDB standard is to allow client devices to implement efficient load management mechanisms. For this reason, the Specification decouples as much as possible the texture aspect of a model from its geometry aspect. This is done by storing all textures related to Models in separate directories.
Recall that the texture filenames itself are constructed from the dataset number, the texture type (selectors 1 and 2), and the texture LOD and these are then concatenated to a modeler-specific texture name. Section 6.13, Model Textures, provides a description and usage of all of the CDB texture types for Models. The values of component selectors 1 and 2 convey a semantic meaning to the texture (time-of-year, paint scheme, night map, light map, normal map, etc) and determine whether the texture is to be used as base texture or as a subordinate texture and whether the texture is switchable (described in the next section).
6.13.1. Handling of Multi-textures
In OpenFlight, several types of textures can be applied in various combinations. Textures fall in two broad categories: Base and Subordinate.
Base Texture Layer
Base textures [25] are set of mutually exclusive model textures that provide texture color/intensity modulation for the model. While a model can have many base textures, only one base texture can be referenced and applied to model geometry at a time.
The CDB standard supports the following type of Base Textures.
-
Year-Round Texture: A year-round texture used with GTModels, MModels, GSModels, T2DModels and T3DModels. In the case of MModels, base-textures are often replaced with an appropriate Paint Scheme texture (Uniform, Camouflage or Airline).
-
Quarterly Textures: A set of 4 textures, each representative of a quarter within the calendar year used with GTModels, GSModels, T2DModels and T3DModels.
Requirement 38 |
req/openflight/quarterly-textures The textures SHALL be provided as a complete set, i.e., it is assumed that all 4 textures of the same kind (i.e., all four textures have their component selector 1 set to 003) and are all present in the model’s texture directory. |
The presence of a quarterly texture reference in model geometry tells the client-device that a quarterly texture set is available. This allows the client-device to select any one of the available 4 textures at rendering time. Only one of the textures need be referenced by the OpenFlight scenegraph geometry, preferably the third quarter texture. It is also assumed that all 4 textures share the same UV mapping.
-
Monthly Textures: A set of 12 textures, each representative of a month within the calendar year used with GTModels, GSModels, T2DModels and T3DModels.
Requirement 39 |
req/openflight/monthly-textures The textures SHALL be provided as a complete set, i.e., it is assumed that all the 12 textures are of the same kind (i.e., all twelve textures have their component selector CS1 = 002) and are all present in the model’s texture directory. |
The presence of a monthly texture reference in model geometry tells the client-device that a monthly texture set is available. This allows the client-device to select any one of the available 12 textures at rendering time. Only one of the textures need be referenced by the OpenFlight scenegraph geometry, preferably the June texture. It is also assumed that all 12 textures share the same UVmapping.
-
Camouflage Paint Scheme Textures: Used on MModels with camouflage paint schemes should make use of this texture kind. Camouflages are listed in Annex O (Volume 2: OGC CDB Core: Model and Physical Structure Annexes). It is also assumed that all textures share the same UVmapping.
-
Airline Paint Scheme Textures: Used on MModels that represent commercial aviation airliners should make use of this texture kind to implement the airlines paint scheme and logos. This base texture addresses the need for multiple skins painted on identical aircraft type. For instance, the B767-300ER is operated by more than 60 airlines throughout the world. Annex O Volume 2: OGC CDB Core: Model and Physical Structure Annexes provides a complete list of Airliners. It is also assumed that all textures share the same UVmapping.
-
Shadow Map Textures: Used on MModels as pre-computed orthographic projections of the MModel. These textures are base textures used to accelerate the rendering of MModel shadows. Shadow map usage conventions are described in section 6.13.5.1, Model Shadow Textures.
-
Motion Blur: Used on MModels as pre-computed motion blurred textures of rotating parts (e.g., rotor disks). These textures are base textures used to aid client-devices in eliminating temporal aliasing artifacts. Motion blur textures conventions are described in section 6.9.2.3, Temporal Anti-aliasing.
Subordinate Texture Layer
Base textures can be supplemented with one or more [26] subordinate textures. Subordinate textures form a set of model textures that can be used to provide additional color/intensity modulation or illumination modulation detail to the Base texture.
The CDB standard supports the following types of subordinate textures.
-
Night Map: This subordinate texture is used to represent changes to models in their night configuration, typically as a result of lighting effects emanating from inside the model through windows. Night map textures conventions are described in greater detail in section 6.13.5.3, Model Night Maps.
-
Detail Texture (Micro/Macro): This subordinate texture is used to add details to a base texture that lacks the necessary resolution to provide the correct depth perception. Detail textures conventions are described in greater detail in section 6.13.5.6, Model Detail Texture Maps.
-
Contaminants: These textures are used to simulate thin layers of matter that accumulate on surface top. Contaminant textures conventions are described in greater detail in section 6.13.5.7, Model Contaminant and Skid Mark Textures.
-
Normal Map: Normal mapping is a technique used for faking the lighting of bumps and dents; when used in conjunction with a render’s light sources, it can add surface detail without using more polygons. This subordinate texture is a 3-component texture that encodes the normals at each texel. Tangent-space normal maps conventions are described in greater detail in section 6.13.5.5, Model Tangent-space Normal Maps.
-
Reflection Map: Conventions are described in detail in section 6.13.5.8, Model Cubic Reflection Maps.
-
Light Map: This subordinate texture is used to represent the effect of external light sources onto a model. Light map textures conventions are described in greater detail in section 6.13.5.4, Model Light Maps.
-
Gloss Map: A texture that describes whether a surface is matte or gloss; described in section 6.13.5.9, Model Gloss Maps.
-
Material Texture: To specify the composite materials at the level of a single texel; described in section 6.13.5.10, Model Material Textures.
Client-devices are required to use the modeler supplied layer number to determine the order in which the subordinate textures are to be rendered. The base layer is always rendered first, followed by subordinate layer 1, 2, 3, etc. Gaps within the layer sequence are permitted.
Note that layer numbers are not assigned nor reserved to specific subordinate textures.
Texture Mapping Conventions
The following table provides the texture mapping for use with each kind of textures.
| Base Texture |
Subordinate Texture |
Kind | Mapping | |
|---|---|---|---|---|
Kind |
Mapping |
001 |
Modulate |
|
051 |
Decal |
002 |
Modulate |
|
052 |
N/A |
004 |
Modulate |
|
053 |
Modulate |
005 |
Modulate |
|
054 |
Modulate |
006 |
Modulate |
|
055 |
Modulate |
007 |
Modulate |
|
056 |
Add |
008 |
Modulate |
|
057 |
N/A |
009 |
Modulate |
6.13.2. Default Gamma Corrections
The default gamma corrections of 3D model texture datasets are defined by the following set of parameters found in the Defaults.xml metadata file.
-
Default_GSModelTexture_Gamma
-
Default_GSModelInteriorTexture_Gamma
-
Default_GTModelTexture_Gamma
-
Default_GTModelInteriorTexture_Gamma
-
Default_MModelTexture_Gamma
If a parameter is not found in Defaults.xml, or if Defaults.xml is not found in the metadata directory, assume a default gamma correction of 1.0.
See Annex S Volume 2: OGC CDB Core: Model and Physical Structure Annexes for the complete list of default parameters.
6.13.3. Texture Dimension
It is generally accepted by the modeling community to limit texture dimensions to a power of 2. The CDB standard goes a step further and enforces this practice.
To preserve the original texture resolution as much as possible, it is suggested to resize the source texture to the nearest [27] power of 2. For instance, if a source texture measures 72 pixels wide by 13 pixels high, it is recommended to resize it to 64 by 16 pixels.
\[Texture\ Dimension = \ 2^{n}\ \times \ 2^{m}\]
Where n and m are positive integers (n, m ≥ 1).
Texture Mipmap
Requirement 40 |
req/openflight/texture-mipmap mipmaps associated with a given texture SHALL be present in the texture directory. Furthermore, the standard requires that mipmaps SHALL be stored in individual files. |
\[Number\ of\ Mipmaps = \max\left( n,m \right) + 1\]
For instance, a texture whose dimension is 23 × 24 has a total of 5 mipmaps.
Texture Size
The naming conventions of all model textures are described in Chapter 3 Volume 1: OGC CDB Core Standard: Model and Physical Data Store Structure. For texture file whose name uses the W field, the value of the field is a power of 2 representing the largest dimension of a (possibly rectangular) texture.
\[Texture\ Size = 2^{W}\ \]
Where W is a non-negative integer (W ≥ 0).
6.13.4. Texture Palette
The OpenFlight Texture Palette record stores the names of all textures that are possibly referenced by the model; that includes all base and subordinate textures (i.e., all skins and all interchangeable textures). Each palette entry contains the path and filename of one texture.
Requirement 41 |
req/openflight/texture-palette-path The path SHALL be relative to the OpenFlight file. |
Below are examples of entries in the texture palette.
MModel Example
In the case of a moving model, the OpenFlight file resides in the MModelGeometry directory; for instance, the M1A2 resides in
\CDB\MModel\600_MModelGeometry\1_Platform\1_Land\225_United_States\1_Tank\1_1_225_1_1_3_0\
Its main texture is called M1A2 and resides in
\CDB\MModel\601_MModelTexture\M\1\M1A2\
The corresponding palette entry would be
..\..\..\..\..\..\601_MModelTexture\M\1\M1A2\D601_S005_T001_W11_M1A2.rgb
GTModel Example
In the case of a geotypical power pylon model, the OpenFlight file resides in the GTModel directory
\CDB\GTModel\510_GTModelGeometry\A_Culture\T_Comm\040_Power_Pylon\Lxx\
Assuming its texture is called Pylon, it resides in
\CDB\GTModel\511_GTModelTexture\P\Y\Pylon\
The corresponding palette entry would be
..\..\..\..\..\..\511_GTModelTexture\P\Y\Pylon\D511_Sxxx_Txxx_Lxx_Pylon.rgb
GSModel Example
In the case of a geospecific model, its OpenFlight file resides in the GSModelGeometry directory. An example is
\CDB\Tiles\_lat_\_lon_\300_GSModelGeometry\Lxx\Ux\
If the model refers to a geospecific texture, it resides in
\CDB\Tiles\_lat_\_lon_\301_GSModelTexture\Lxx\Ux\
The corresponding palette entry would be
..\..\..\..\301_GSModelTexture\Lxx\Ux__\latlon___D301_Sxxx_Txxx_Lxx_Ux_Rx_TNAM.rgb
If the model refers to a geotypical texture, it resides in
\CDB\GTModel\511_GTModelTexture\_T_\_N_\_TNAM_
And the corresponding palette entry would be
..\..\..\..\..\..\..\GTModel\511_GTModelTexture\_T_\_N_\TNAM\D511_Sxxx_Txxx_Lxx_TNAM.rgb
T2DModel Example
In the case of a tiled 2D model, its OpenFlight file resides in the T2DModelGeometry directory. An example is
\CDB\Tiles\_lat_\_lon_\310_T2DModelGeometry\Lxx\Ux\
If the model refers to a geospecific texture, it resides in
\CDB\Tiles\_lat_\_lon_\301_GSModelTexture\Lxx\Ux\
The corresponding palette entry would be
..\..\..\..\301_GSModelTexture\Lxx\Ux__\latlon___D301_Sxxx_Txxx_Lxx_Ux_Rx_TNAM.rgb
If the model refers to a geotypical texture, it resides in
\CDB\GTModel\501_GTModelTexture\_T_\_N_\_TNAM_
And the corresponding palette entry would be
..\..\..\..\..\..\..\GTModel\501_GTModelTexture\_T_\_N_\_TNAM_\D511_Sxxx_Txxx_Lxx_TNAM.rgb
6.13.5. Usages
Model Shadow Textures
Ideally, Model shadows should be generated at runtime by the client-device from the model’s actual geometry. However, depending on the technique used by the client device, special textures called projected shadow maps may be used to cast shadows from Models.
When the projected shadow map technique is used, special object nodes are used to store the shadow polygons.
Shadow Geometry
Requirement 42 |
req/openflight/texture-shadow-geometry When geometry exists for the purpose of casting shadows, it SHALL be located under an object node whose Shadow flag is set. |
Figure 6-49. Using Shadow Polygons
Several object nodes can be used to store several polygons all textured with projected shadow maps. It may be desirable to also create separate shadow maps for major articulated parts and locate these shadow objects just under their corresponding DOF nodes.
Shadow Maps
Projected shadow maps are created by applying one, two or three orthographic projections on the model (or optionally on major articulated parts of the model). Figure 6‑50: Example of a Shadow Map in the XY Plane shows one example of a shadow map of an aircraft in the XY plane. Similar maps can also be produced for the YZ and ZX planes.
Figure 6-50. Example of a Shadow Map in the XY Plane
A projected shadow map is a monochrome (single-component) texture without transparency. It represents the mask to cut out the contour of the model. In theory, a black and white texture would be enough; however, shades of gray are permitted to represent semi-transparent surfaces that could be present on the model. In any case, a value of 0 (black) means the model does not block the passage of lights. The opposite value, 1 (white), indicates the model completely obstruct the light.
Because the shape of the model may change with damage states, each model state should have its own set of projected shadow maps. Section 6.9.2.2 describes damage states.
Shadow maps are general base textures. Their Texture Kind is 007 and their Texture Index is a sequence number when several shadow maps exist for the same Model.
To illustrate the naming convention, assume the shadow map from Figure 6‑50: Example of a Shadow Map in the XY Plane, is called “aircraft”. According to Section 3.5.2.1, MModelTexture Naming Convention, and Section 5.5, MModel Library Datasets, the resulting file name would be:
D601_S007_T001_Wnn_aircraft.rgb
The value Wnn represents the texture size, 2nn, and is explained in Section 6.13.3.2, Texture Size.
Note that if a client-device generates shadows on its own, without the support of pre-computed projected shadow maps, it can ignore all OpenFlight object nodes whose Shadow flags are set as well as all textures associated with these nodes.
Model Skin Textures
Models skins are base textures that correspond to one or more moving models paint schemes or one or more time-of-year representations of the cultural feature.
For instance, the same tank can be painted with several different colors to match various areas of operation. Below are two examples of the same tank, the M1A2 Abrams, painted for operation in a desert area (Figure 6‑51) or in a forest area (Figure 6‑52).
Figure 6-51. The M1A2 Abrams with Desert Camouflage
Figure 6-52. The M1A2 Abrams with a Forest Camouflage
The two different textures for this tank qualify for use as skins since they have been designed in such a way that they can be exchanged for one another without affecting their mapping on the affected polygons.
Requirement 43 |
req/openflight/model-skin-textures The mapping of textures for a given model or cultural features SHALL be identical since only the texture is changed, not the UV mapping. |
OpenFlight itself does not provide an explicit mechanism to change the base texture assigned to faces. In fact, OpenFlight supports a single base texture per face record. The other textures that can be added to a face are called layers and none of them is a replacement for the base texture.
In order to have several skins for a single model, the CDB standard provides the mechanism defined in 6.14.5.2, Texture Switch. The enumeration values for each skin can be found in Annex O, Volume 2: OGC CDB Core: Model and Physical Structure Annexes.
The M1A2 used in the above examples has two skins. Each skin is made of a single texture that happens to be a mosaic of all the individual textures used by the model. Figure 6‑53: M1A2 Desert Skin Mosaic below shows one of the M1A2 skins.
Figure 6-53. M1A2 Desert Skin Mosaic
The following texture kinds implement the concept of model skins:
-
Kind 002 – Monthly Representation
-
Kind 009 – Quarterly Representation
-
Kind 004 – Uniform Paint Scheme
-
Kind 005 – Camouflage Paint Scheme
-
Kind 006 – Airline Paint Scheme
Paint schemes apply to moving models only. Annex O lists available paint schemes (Volume 2: OGC CDB Core: Model and Physical Structure Annexes).
Time-Of-Year representations are appropriate for cultural features. A good example is the case of leafy trees. Depending on the hemisphere and the latitude, several textures represent leafy trees at different stages during the year.
All texture kinds listed above are mutually exclusive; also, all instances of textures of a kind are mutually exclusive. Since all texture kinds above are base textures, and because only one base texture can be active at any one time on a face of a model, it follows that only one skin can be active at a time.
Model Night Maps
Night maps fall under the category of subordinate textures. Night and light maps (see next section) are both used at night to represent how interior and exterior light sources change the appearance of a Model. It is possible for a Model to have both a night and a light map, or just a light map. However, it is not possible to have a night map alone.
Simulator client-devices invoke a night map when the (simulated) light sources located inside the model need to change its appearance at night. This is the case when the interior light sources shine through openings like windows and portholes. To simulate the effect of lights emitted through these openings, a night map is created; it adds these bright window details normally missing from the base day texture.
The creation of a night map for models is left to the discretion of the modeler. Creating additional geometry for the windows and changing the material associated with the polygons to incorporate an emissive component can also produce a lighting effect similar to night maps. However, this approach requires additional (unnecessary) model geometry that adds additional computational load in the client-devices. For this reason, the use of night maps is recommended.
Light maps differ from night maps in that they combine the effect of exterior lighting with interior lights. A light map acts as a (colored) filter to mask portions of the model that are no longer visible at night when no ambient light exists.
A Model may have a relatively different aspect at night. This difference comes from two changes in the environment. The ambient illumination provided by sunlight is totally absent at night; only the moon and man-made light sources affect the appearance of objects. When present, the moon provides only a modest level of illumination when compared to the sun. In addition, the model itself might have internal lights turned on that are not modeled in day version of the texture but that do affect its appearance at night.
To illustrate these differences, imagine a building as seen during the day. No light seems to come out of its windows because the average daytime sunlight overwhelms any man-made lighting (internal to the building and coming out of the windows). At night, the outside walls of the building have not changed but light is now emanating from the windows. This is an important change that requires a modification to the texture used to represent the walls.
Another example of the use of a night map is the case of an aircraft flying at night. During daytime, the aircraft windows look dark while at night, light comes from the inside and the windows appear white.
Night maps are used to add details to base textures; details that are not visible during the day and that become visible at night. Therefore, a night map is not a replacement for the base texture. It is used in conjunction with the base texture.
The next figures illustrate the purpose of night maps.
Figure 6‑54: Base Texture is the base texture used in modeling a commercial aircraft, the Airbus 330, during the day. Notice that portholes are represented by dark rounded rectangles because the lights in the cabin are off. The same is true for the cockpit windows located in the bottom right of the texture.
Figure 6-54. BaseTexture
Figure 6‑55: Night Map, is the model’s corresponding night map and shows the same portholes but this time brighter to reflect the fact that cabin lights are on. This time, notice the appearance of the cockpit windows as well as the presence of colors in them. Remember that this texture is used to add details that may be missing from the base texture.
Figure 6-55. Night Map
Requirement 44 |
req/openflight/model-night-maps There are constraints imposed on night maps: • A night map SHALL have the same size as its base texture. • A night map SHALL use the same UV mapping as its base texture. • A night map has a similar format as its base texture (RGB or Intensity) plus an alpha channel. |
Night Map Generation
A night map is mapped on top of its base texture using a Decal texture environment. Since a night map is a subordinate texture, it is mapped on polygons using an OpenFlight multitexture record.
Requirement 45 |
req/openflight/night-map-generation The Effect field of this multitexture record SHALL contain the value 0 indicating to use the Texture Environment mapping defined in the Texture Attribute file. The Environment Type field found in the Texture Attribute file SHALL contain the value 2 indicating a Decal environment mapping. |
The night map alpha channel is in fact a mask identifying which portions of the base texture are replaced by the night map. Accordingly, the alpha channel contains a value of 0 when the corresponding texel of the base texture is left intact. However, the alpha channel will contain the value 1 when the corresponding texel of the base texture is replaced by the equivalent night map texel. Overall, the Decal environment mapping applies the following transformation to the base texture.
\[C = C_b \cdot (1-A_n)+C_n \cdot A_n\]
where…
Cb is the color component (or intensity) of the base texture
Cn is the color component (or intensity) of the night map
An is the alpha component of the night map
Since the values found in the night map alpha channel are limited to 0 and 1, the resulting color will either be the one found in the base texture when An is 0 or the one found in the night map when An is 1.
Model Light Maps
Light maps also fall under the category of subordinate textures. Night maps and light maps are both used at night to represent how interior and exterior light sources change the appearance of a Model. It is possible for a Model to have both a night map and a light map, or just a light map. However, it is not possible to have a night map alone.
Light maps differ from night maps in that they combine the effect of exterior lighting with interior lights. A light map acts as a (colored) filter to mask portions of the model that are no longer visible at night when no ambient light exists.
A light map is used when active light sources are located on the outside of the model. This technique is used to simulate the appearance of a model when lit by local spotlights. For instance, spotlights may be used to illuminate a building at night. The light map provides the illumination pattern that represents the spotlight illumination on the building. The technique provides a convenient mean to produce interesting and entirely predictable lighting effects without resorting to computationally intensive local light sources. Their effects are already incorporated into special textures called light maps.
A light map also contains a mask related to the night map when present. Remember that a light map is a filter (a mask) to retain the detail associated with the base texture and its optional night map.
As opposed to a night map, a light map does not have constraints. More specifically:
A light map does not need to be of the same size as its base texture.
A light map has its own UV mapping.
A light map can be an intensity map or an RGB image.
Note that when light sources are modeled with light maps, they only affect the model onto which they are applied.
The next set of figures illustrates how light maps contribute to the lighting of a model. Note that a light map is not applied directly to the model base texture. The light map is first modified to take into account the ambient lighting, and then the resulting lighting is applied to the model.
Figure 6‑56: Light Map, is the light map matching the base texture in Figure 6‑54: Base Texture. Notice that it combines light lobes representing external light spots with the mask associated with internal light sources from the night map. This mask is used to key in details that stay visible at night.
Figure 6-56. Light Map
Figure 6‑57: Combined Effect of Base Textures and Light Maps, shows on the actual aircraft the result of applying the light map from Figure 6‑56: Light Map to the base texture from Figure 6‑54: Base Texture. Notice that portholes and cockpit windows are still dark since the base texture has not been modified by the night map yet.
Figure 6-57. Combined Effect of Base Textures and Light Maps
Figure 6‑58: Combined Effect of Night and Light Maps, shows the result of adding the night map to the base texture and then applying the light map. This time, we can clearly see the lights coming through portholes and cockpit windows.
Figure 6-58. Combined Effect of Night and Light Maps
How and When to Use Night Maps and Light Maps
The CDB standard recommends the use of night maps to represent lights that are internal to the model; this permits the client device to control the appearance of the model with internal lights on or off. This condition is usually true at night, hence the name of the texture.
Similarly, the CDB standard recommends the use of light maps to represent the effect of lights that are external to the model; this permits the client-device to control the appearance of the model with external spotlights on or off.
Note that night and light maps can be applied to any of the skins since skins are base textures.
How and When Not to Use Light Maps
A client device may discard light maps if the effect of external lights is internally generated by its GPU. It can be envisioned that future development of specialized hardware – such as graphics processor unit – will allow more of the lighting effects to be generated in real-time. When this time comes, artificial textures generated off-line such as light maps will become obsolete.
Model Tangent-space Normal Maps
A normal map is an RGB texture (without an alpha channel) where the normal to the surface is encoded in the Red, Green, and Blue channels. The normal (i, j, k) values are encoded in the following manner into the 8-bit value of each channel:
R [0, 255] = i [-1.0, +1.0]
G [0, 255] = j [-1.0, +1.0]
B [0, 255] = k [-1.0, +1.0]
The mapping is identical on all channels; the range of all possible 8-bit values (0, 255) is mapped linearly to the range of floating point values -1.0 to +1.0. This mapping provides a resolution of 2/255 or 0.0078.
In addition, the reader should note that the floating-point value 0.0 has no exact integer equivalent [28]. Here, the closest value to 0.0 is approximately ±0.0039 and is obtained when the channel contains 127 or 128.
Besides this particular encoding of the normal into the RGB channels, a normal map has all the other attributes of a standard RGB texture whose format is defined in in the SGI Image File Format [29].
In the industry, there are at least two types of Normal Map: object-space normal map, and tangent-space normal map. Both types have their pros and cons. The CDB standard opts for tangent-space normal map. A sample is shown here.
Figure 6-59. Normal Map Sample
Typically, the normal points away from the surface, and not toward the underlying surface. For this reason, the value of the k-component of the normal is positive, most of the time, resulting in a bluish tint of the map. A negative k-component could indicate the presence of a cliff with an overhang, for instance.
Model Detail Texture Maps
A detail texture map is 1- or 3-component (aka channel) texture where each texel is represented as an 8-bit unsigned integer. A detail texture exhibits two important properties; it has a neutral luminance (intensity) and chrominance (color). This is achieved by applying the following constraints:
The 8-bit unsigned value of each texel is scaled to a floating point value in the range -1.0 to 1.0
The average value of an individual component is always 0.0
The Detail texture is mapped on the underlying surface through a simple addition operation
The net effect of applying a Detail Texture Map is to highlight (> 0) or darken (< 0) fragment details on the underlying surface. When using a single component detail texture map, only the intensity of the resulting image is affected; when using a 3-component detail texture map, the color is also varied.
Figure 6-60. Detail Texture Map Sample
Recall that a detail texture map is a mean of adding high-frequency (spatial) details to a rather low-frequency image.
Model Contaminant and Skid Mark Textures
Historically, Image Generators of civil aviation simulators provided the means for flight instructors to control the appearance of airport runways, taxiways, and roads with various surface contaminants. To this end, the CDB provides a set of standardized Model Contaminant and Skid Mark Textures that are commonly used in flight simulators and listed in Annex O, Volume 1.1: OGC CDB Core: Model and Physical Structure: Informative Annexes. These textures are typically four-component (R, G, B, alpha) textures that act as an overlay to airport surfaces.
Model Cubic Reflection Maps
Reflection mapping (aka environment mapping) is an efficient image-based lighting technique for approximating the appearance of a reflective surface by means of a precomputed texture image. The texture is used to store the image of the distant environment surrounding the rendered object.