18.4. Tutorials

18.4.1. Available Demonstrations

Example files and demonstrations of the polarization capabilities can be found on the DIRSIG website in the "Demonstrations" directory: http://www.dirsig.org/demos

18.4.2. Creating a Polarized Scene

This tutorial walks through the complete process of constructing a polarized scene. The "Priest-Germer" model is used for metals in the scene, while the "Shell Background" model is used for the grass.

The first step is putting together the scene geometry files. We will use the chunky_bar.gdb Geometric Database File included with the DIRSIG4 distribution. Create a directory and copy this file there. Next, create an Object Database File and place the chunky bar at the origin of the scene and specifying that the UNITS dimension to be in METERS.

Now that the geometry is in place, the Material Database File must be assembled. The format of the material sections is described in the Polarization How-To section. The following material sections should be added:

    MATERIAL_ENTRY {
        NAME = Aluminum 0.15
        ID = 1
    
        SURFACE_PROPERTIES {
            REFLECTANCE_PROP_NAME = PriestGermer
            REFLECTANCE_PROP {
                PARAMETER_FILE = al-crc-015.TS.brdf
                ENABLE_DHR = TRUE
                ENABLE_SHADOWING_FUNCTION = TRUE
            }
        }
    
        RAD_SOLVER_NAME = Generic
        RAD_SOLVER {
            INITIAL_SAMPLE_COUNT = 5
            MAX_BOUNCES = 2
            SAMPLE_DECAY_RATE = 1
        }
    }

    MATERIAL_ENTRY {
        NAME = Aluminum 0.2
        ID = 2
    
        SURFACE_PROPERTIES {
            REFLECTANCE_PROP_NAME = PriestGermer
            REFLECTANCE_PROP {
                PARAMETER_FILE = al-crc-02.TS.brdf
                ENABLE_DHR = TRUE
                ENABLE_SHADOWING_FUNCTION = TRUE
            }
        }
    
        RAD_SOLVER_NAME = Generic
        RAD_SOLVER {
            INITIAL_SAMPLE_COUNT = 5
            MAX_BOUNCES = 2
            SAMPLE_DECAY_RATE = 1
        }
    }

    ... Repeats for Aluminum 0.25 and 0.3, 
        with same NAME and PARAMETER_FILE changes 
        using IDs 3 and 4 ...

    MATERIAL_ENTRY {
        NAME = grass
        ID = 5
    
        SURFACE_PROPERTIES {
            REFLECTANCE_PROP_NAME = ShellBackground
            REFLECTANCE_PROP {
                BRDF_FIT_FILE = ./grass.fit
                REFLECTANCE_FILE = ./grass.ems
            }
        }
    
        RAD_SOLVER_NAME = Generic
        RAD_SOLVER {
            INITIAL_SAMPLE_COUNT = 5
            MAX_BOUNCES = 2
            SAMPLE_DECAY_RATE = 1
        }
    }
  

For now, simply copy all the PARAMETER_FILEs (.brdf) and BRDF_FIT_FILEs (.fit) to the tutorial's working directory. Normally, the PATHS section can be configured to indicate from where DIRSIG4 will pull these files.

With the geometry and material database complete, the Input Configuration File must be constructed. Set up a simple framing array covering 0.5-0.8 microns with a 0.1 micron delta. The RESPONSE_FILENAME should be set to SPECTRAL-P. The target location for the platform should be the scene origin. For now, place the sensor looking straight down from 100 meters; the PLATFORM_LOCATION should read 0.0, 0.0, 100.0. For analysis, it may be helpful to enable POLARIZATION_MAPS in the TRUTH_IMAGES section of the Input Configuration File.

Next comes running make_adb with MODTRAN-P to build a polarized atmosphere. Note that the configuration changes specified in the Polarization How-To section are needed before make_adb will run in polarized mode. Invoke the following command:

    make_adb -polarized chunky.cfg
  

DIRSIG4 may now be invoked to generate radiance and truth images for the scene. The model is invoked in the usual manner, with no additional flags needed. The model output can be viewed using a program such as ENVI. Note that a strange speckling effect may appear on the side of the chunky bars. This comes from a sampling artifact and can be removed by incrementing the INITIAL_SAMPLE_COUNT for each material. The price of increasing this value is longer run time.