Keywords: maps, materials, holes
Summary
This demo provides a slightly more advanced example of a material map, which is a tool that employs a raster image to map different materials to different locations on an object. This demo specifically highlights the setup of a material maps to map camouflage patterns onto geometry and how to use material maps to cut holes in geometry.
Details
A "material map" is a special material attributing mechanism in DIRSIG that allows a raster image to map materials across the surface of an object. In contrast to polygon level material assignments, the material map lets materials be assigned across and within polygon boundaries. The material map mechanism involves the creation of a look-up table (LUT) that relates raster image pixel values (digital counts) to DIRSIG material IDs. Typically, a material map source image comes from a classification of the materials in a real image and that classification typically identifies a limited set of material classes. This discrete set of material classes are represented by a discrete set of digital counts (DCs) used in the raster image map. The look-up table maps these discrete DCs to DIRSIG material IDs. This demo also shows how one of those discrete DCs can be remapped to a "null" material, which effectively removes the original geometry in those locations.
Important Files
This section highlights key files important to the simulation.
Scene Geometry
The scene contains a flat background onto which a HMMWV ("Humvee")
and a camouflage net supported by spreader poles is placed. The
geometry of the HMMWV (see geometry/hmmwv.obj
) and net (see
geometry/camo_net.obj
) objects are shown below:
Both objects are primarily attributed using material IDs that will be remapped by unique material maps associated with each object. There are two material maps used in this simulation: one to map the camouflage paint scheme across the HMMWV vehicle and one to map the material and hole pattern scheme across the net.
Scene Materials
The scene contains 11 materials, which are all defined in the
materials/demo.mat
file:
-
Material ID #1 → the ground, with a spectrally flat gray reflectance.
-
Material ID #2 → the camo net support poles
-
Material ID #10 → the HMMWV base material (remapped to 11, 12 and 13)
-
Material ID #11 → the HMMWV black paint
-
Material ID #12 → the HMMWV brown paint
-
Material ID #13 → the HMMWV green paint
-
Material ID #15 → the HMMWV glass
-
Material ID #16 → the HMMWV tire
-
Material ID #20 → the net base material (remapped to 0, 21 and 22)
-
Material ID #21 → the net lighter green material
-
Material ID #22 → the net darker green material
Material IDs #10 and #20 can have minimal configurations because they are never observed directly (the material map will always remap geometry with this ID to another ID).
MATERIAL_ENTRY {
ID = 10
NAME = HMMWV, Base (remapped)
EDITOR_COLOR = 0.3000, 0.3000, 0.3000
}
...
MATERIAL_ENTRY {
ID = 20
NAME = Camo Net, Base (remapped)
EDITOR_COLOR = 0.3000, 0.3000, 0.3000
}
The remaining materials have full material descriptions and largely use the Classic Radiometry Solver and Classic Emissivity optical property models.
Material Maps
A material map is configured in the .scene
file. This section will
outline the key components of that configuration.
HMMWV Paint Mapping
The raster image (below) used in this demo was created by hand. The image contains uses 3 shades of gray: light gray (DC = 75), medium gray (DC = 123) and light gray (DC = 157).

Below is the look-up table that maps the 3 raster DCs to 3 DIRSIG material IDs.
Raster Image DC | DIRSIG Material ID |
---|---|
75 |
11 |
123 |
12 |
157 |
13 |
The image is mapped onto the HMMWV vehicle using the Drape Projection method, which uses a simple XY mapping method. Since the projection is based on the scene coordinates and the HMMWV vehicle is placed at the scene origin (0,0), the XY insert point of the map was offset (3,3) to avoid mirroring the raster image pattern on the vehicle.
Net Pattern Mapping
The raster image (below) used in this demo was also created by hand. The image contains uses 3 shades of gray: black (DC = 0), dark gray (DC = 100) and light gray (DC = 200).

Below is the look-up table that maps the 3 raster DCs to 3 DIRSIG material IDs. The key feature of this LUT is that the 0 DC value is mapped to material ID 0, which is a special ID. Users are not allowed to use material ID #0 because it is reserved to indicate a non-existent material. Any geometric intersection in the scene that is associated with this special material ID is ignored, which effectively filters out these intersections. In this application, this feature allows us to cut holes in the net geometry by mapping some locations on the net polygon mesh to this special ID.
Raster Image DC | DIRSIG Material ID |
---|---|
0 |
0 (null) |
100 |
21 |
200 |
22 |
The image is mapped onto the net geometry using the Drape Projection method, which uses a simple XY mapping method. Since the projection is based on the scene coordinates and the net object is placed at the scene origin (0,0), the XY insert point of the map was offset (3,3) to avoid mirroring the raster image pattern on the vehicle.
Sensor
The sensor for the simulation uses a simple, RGB channel QVGA (320x240) format camera using 3x3 sub-pixel sampling.
Setup
This section includes any step-by-step instructions for running and visualizing the simulation.
-
Run the
demo.sim
file -
Load and observe the output image (see
demo.img
)
Results
The RGB output of the simulation is shown below. Note that the spreader poles and the vehicle beneath the camouflage net can be seen due to the geometric holes cut by the "null" material feature in the net material map. These holes can also be observed in the shadow being cast by the net onto itself and the ground. Careful observation will also show that the HMMWV vehicle under the net features the unique camouflage paint pattern we defined.

The holes are also manifested in the Z intersection truth (below), which shows how the average height in many pixels on the net are the height of the underlying ground or vehicle.
