Model Attributes Best Practices | OGC

382 © 2015 Open Geospatial Consortium The CDB Specification supports the following types of subordinate textures: 1 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. 2 Detail Texture MicroMacro: 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. 3 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. 4 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. 5 Reflection Map: Conventions are described in detail in section 6.13.5.8, Model Cubic Reflection Maps. 6 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. 7 Gloss Map: A texture that describes whether a surface is matte or gloss; described in section 6.13.5.9, Model Gloss Maps. 8 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. 6.13.1.3 Texture Mapping Conventions The following table provides the texture mapping for use with each kind of textures. 383 © 2015 Open Geospatial Consortium Base Texture Subordinate Texture Kind Mapping Kind Mapping 001 Modulate 051 Decal 002 Modulate 052 NA 004 Modulate 053 Modulate 005 Modulate 054 Modulate 006 Modulate 055 Modulate 007 Modulate 056 Add 008 Modulate 057 NA 009 Modulate 058 NA

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 Appendix S 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 Specification 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 67 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. ������� ������ �� = 2 × 2 Where n and m are positive integers n, m ≥ 1. 6.13.3.1 Texture Mipmap The CDB Specification demands that mipmaps associated with a given texture be present in the texture directory. Furthermore, the Specification requires that mipmaps be stored in individual files. 67 Note here that we do not recommend resizing to the next power of 2; instead, resize to the nearest power of 2. 384 © 2015 Open Geospatial Consortium ������ �� ������ = max �, � + 1 For instance, a texture whose dimension is 2 3 × 2 4 has a total of 5 mipmaps. 6.13.3.2 Texture Size The naming conventions of all model textures are described in Chapter 3. 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. ������� ���� = 2 Where W is a non-negative integer W ≥ 0. 6.13.3.3 Texel Size For texture file whose name uses the L field, the value of the field is related to the size of the texels in accordance to Table 3-1: CDB LOD vs. Model Resolution.

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. The CDB Specification demands that the path be relative to the OpenFlight file. Below are examples of entries in the texture palette. 6.13.4.1 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 6.13.4.2 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\