33.3. Scene

Generating a complete description for a DIRSIG scene entity requires integrating information that includes the geographic location on the planet surface, the material properties to be modeled during the simulation, the altitude offset of the scene, the simulation of spatial and spectral variation and texture for targets, the scene's 3D facetized geometric objects, and a collection of landmark data which defines the navigational waypoints. The following diagram depicts the layout of the <scene> element:

Figure 33-1. Scene Element

33.3.1. Geolocation

The <geolocation> element is a simple placeholder for the scene's geographic location. It stores the latitude and longitude values:

      <geolocation type="latitudelongitude" >
	<latitude>43</latitude>
	<longitude>78</longitude>
      </geolocation>
      
For the time being, only the "latitudelongitude" <type> attribute is permitted.

33.3.2. Materials

The <materials> element holds a reference to an external file which forms the database that stores the optical and thermodynamic properties for a scene surface in the simulation environment:

      <materials type="classic" >
	<filename type="mat" >foxbat.mat</filename>
      </materials>
      
For the time being, only the "classic" <type> attribute is permitted. This supports the DIRSIG Version 3 technique of tile projection for the material maps.

33.3.3. Ground Altitude

The <groundaltitude> element stores the offset of the local scene coordinate system. It is used to vertically translate the scene into a real-world coordinate system. For example, a building may be specified at an altitude of 0.0 meter in an ODB file, however this altitude is really only a local altitude that may correspond to a different one in the real world. In the following sample, our real world altitude is 0.5 kilometers:

      <groundaltitude spatialunits="kilometers" >0.5</groundaltitude>
      
The <spatialunits> attribute specifies the unit for the ground altitude value.

33.3.4. Maps

The <maps> element is the central storage location for all mapping functions in DIRSIG. Property Mapping Techniques discusses the various methods for applying materials to scene objects and introducing variability within a material (i.e. "texture"). The following example shows an XML markup for the <maps> element:

      <maps enabled="1" >
	  <map type="texture" >
	      <idlist>
		  <id>10</id>
	      </idlist>
	      <projector type="tile" spatialunits="meters" >
		  <affinetransform>
		      <xscale>0.508</xscale>
		      <yscale>0.508</yscale>
		      <xtranslate>0</xtranslate>
		      <ytranslate>0</ytranslate>
		  </affinetransform>
	      </projector>
	      <band>
		  <bandpass>
		      <min>0.4</min>
		      <max>0.7</max>
		  </bandpass>
		  <image format="pgm" >
		      <filename>./maps/grass_field.pgm</filename>
		  </image>
	      </band>
	  </map>
      </maps>
      

33.3.5. Object Geometry

The <object> element forms a hierarchical description of unique object geometry and its instances. An instance is a virtual copy of the object with a unique 3-dimensional affine transformation applied to it. Instances are used to help populate scenes that have high occurences of objects that are all very similar. For example, a forest may have thousands of trees in it, but the forest might be accurately represented by a smaller subset of trees that are repeated with slightly different rotations and scales. The following example shows a simple scene geometry description:

    <object type="list" name="object list" >
        <object enabled="1" type="facet" name="background" >
	    <filename type="gdb" spatialunits="inches" >background.gdb</filename>
	    <instancelist>
		<instance enabled="1" type="static" name="" >
		    <affinetransform angularunits="degrees" >
			<xscale>1</xscale>
			<yscale>1</yscale>
			<zscale>1</zscale>
			<xrotate>0</xrotate>
			<yrotate>0</yrotate>
			<zrotate>0</zrotate>
			<xtranslate>0</xtranslate>
			<ytranslate>0</ytranslate>
			<ztranslate>0</ztranslate>
		    </affinetransform>
		</instance>
	    </instancelist>
	</object>
	<object enabled="1" type="facet" name="aircraft" >
	    <filename type="gdb" spatialunits="inches" >aircraft.gdb</filename>
	    <instancelist>
		<instance enabled="1" type="static" name="" >
		    <affinetransform angularunits="degrees" >
			<xscale>1</xscale>
			<yscale>1</yscale>
			<zscale>1</zscale>
			<xrotate>0</xrotate>
			<yrotate>0</yrotate>
			<zrotate>115</zrotate>
			<xtranslate>3080</xtranslate>
			<ytranslate>9100</ytranslate>
			<ztranslate>15.24</ztranslate>
		    </affinetransform>
		</instance>
		<instance enabled="1" type="static" name="" >
		    <affinetransform angularunits="degrees" >
			<xscale>1</xscale>
			<yscale>1</yscale>
			<zscale>1</zscale>
			<xrotate>0</xrotate>
			<yrotate>0</yrotate>
			<zrotate>-90</zrotate>
			<xtranslate>3600</xtranslate>
			<ytranslate>3610</ytranslate>
			<ztranslate>15.24</ztranslate>
		    </affinetransform>
		</instance>
	    </instancelist>
	</object>
    </object>
      
In the context of object instancing, the affine transform is restricted to a specific order: scale, rotation and translate.

33.3.6. Landmarks

The <landmarks> element describes navigational waypoints within a DIRSIG scene. The location coordinates are defined in DIRSIG scene units (i.e. meters, inches). The following example shows the content of <landmarks>:

    <landmarks>
        <entry>
	    <description>Aircraft hangar</description>
	    <location>
	        <x>9600.0</x>
	        <y>9600.0</y>
	        <z>0.0</z>
	    </location>
        </entry>
    </landmarks>