ISIS Application Documentation
shadow | Standard View | TOC | Home |
Create a high accuracy hillshade with shadow casting
Description
Categories
Groups
Examples
History
Name | Description |
---|---|
FROM | Input DEM to shade and shadow |
TO | Shaded and shadowed DEM |
PCK | PCK to use for calculating the sun position |
SPK | SPK to use for calculating the sun position |
Name | Description |
---|---|
SUNPOSITIONSOURCE | How to compute the sun's center position |
SUNEDGE | Draw light ray to the edge of the sun |
SOLARRADIUS | Sun radius (in solar radii) |
Name | Description |
---|---|
MATCH | Get sun position from this cube |
TIME | Time to use to compute the sun's position |
Name | Description |
---|---|
PRESET | Preset optimization settings |
SHADOWMAP | Consider pixels below a shadowed ray in shadow |
BASESHADOWCACHESIZE | The number of items in the shadow map after shrinking |
LIGHTCURTAIN | Use the light curtain optimization |
LOWERLIGHTCURTAIN | Adjust light curtain values to their theoretical minimum |
BASELIGHTCACHESIZE | Number of elements to restrain the light cache to |
PRECISION | Number of pixels to step on the input DEM per ray-DEM intersection check |
CACHEINTERPOLATEDVALUES | Interpolate cache entries between actual ray-DEM intersection checks |
SKIPOVERSHADOW | Try to avoid intersecting shadowed areas |
MAXSKIPOVERSHADOWSTEPS | Distance to consider SKIPOVERSHADOW valid |
This should be a DEM with the same target as MATCH, if MATCH was entered. To create a DEM, you must create a projected cube with radii as DN values that has been run through the program demprep.
Type | cube |
---|---|
File Mode | input |
Type | cube |
---|---|
File Mode | output |
Pixel Type | real |
This is the PCK to use for calculating the sun position relative to the DEM's target at the specified TIME.
Type | filename |
---|---|
File Mode | input |
Internal Default | Automatic |
This is the SPK to use for calculating the sun position relative to the DEM's target at the specified TIME.
Type | filename |
---|---|
File Mode | input |
Internal Default | Automatic |
The sun's position is essential for drawing shadows. This specifies how the sun's position should be computed.
Type | string | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Default | MATCH | |||||||||
Option List: |
|
Attempt to draw light ray to the highest point of the sun on the horizon, instead of to the center.
Type | boolean |
---|---|
Default | TRUE |
Inclusions |
|
This is the estimated radius of the sun in solar radii. Since the unit "solar radius" is not our best guess of the sun's radius, the default is slightly different than 1. A larger number has the end effect of lessening shadows; a smaller number increases shadows. The sun's radius is only used for shadow computations. Hillshade always uses the sun's center.
Type | double |
---|---|
Default | 1.001211 |
Minimum | 0.0 (exclusive) |
Type | cube |
---|---|
File Mode | input |
This should be the time of the observer to use for the sun's position. The entered time will be adjusted for light-time between the sun and the observer. The format should be "YYYY-MM-DDTHH:MM:SS.SSS"; for example, "2012-01-01T14:25:15.36"
Type | string |
---|
This is a list of quick settings for the other parameters in the Optimizations group. This also includes the ability to disable the shadow computations entirely. These options are provided for those who do not need a lot of customization or do not want to calculate shadow positions.
Type | string | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Default | BALANCED | |||||||||||||||
Option List: |
|
When a ray is determined to be in shadow, every DEM pixel between the original position and the point at which the DEM intersected the ray will be marked as in shadow. We then perform no significant work when processing a pixel that we previously determined was in shadow. This also helps avoid unnecessary ray-DEM intersection checks (because surfaces are not shadowed by surfaces already in shadow).
Type | boolean |
---|---|
Default | TRUE |
Inclusions |
|
The shadow cache is allowed to grow to an unlimited size while the shadowing algorithm is processing. This is the approximate number of elements to shrink the shadow cache to, as periodically the caches are shrunk. The shrinking is optimized in a way that is mostly respected, but not guaranteed.
Type | integer |
---|---|
Default | 1000000 |
Minimum | 0 (inclusive) |
With this option enabled, when a ray goes above the light curtain, without interesting the elevation model first, the pixel is considered to be in light. The light curtain is derived from previous rays that were found to be in light.
Type | boolean |
---|---|
Default | TRUE |
Inclusions |
|
This adjusts light curtain elevation values to their theoretical minimum (the lowest elevation the ray could have been and still been in light) instead of using the actual ray elevation values in the light cache. This is done by subtracting the minimum difference found between the ray and DEM when doing ray-DEM intersection tests. Please see the program description for more information.
Type | boolean |
---|---|
Default | true |
The light curtain cache is allowed to grow to an unlimited size while the shadowing algorithm is processing. This is the approximate number of elements to shrink the light caches to, as periodically the caches are shrunk. The shrinking is optimized in a way that this is mostly respected, but not guaranteed.
Type | integer |
---|---|
Default | 1000000 |
Minimum | 0 (inclusive) |
Type | double |
---|---|
Default | 1.0 |
Add interpolated cache entries between actual ray-DEM intersection checks. This will not have any significant effect if your precision is 1 or less. Please see the program description for more information.
Type | boolean |
---|---|
Default | false |
This is a means to lessen the number of ray-DEM intersection checks by guessing the next ray-DEM intersection location and checking if it is in shadow. If it is, the ray is stepped farther before the next intersection test (up to MAXSKIPOVERSHADOWSTEPS farther).
Type | boolean |
---|---|
Default | true |
Inclusions |
|
Since the ray will not make a perfectly straight line across the DEM (DEMs are projected onto a flat surface) a linear guess as to the next intersection point degrades in accuracy (depending on a number of factors, such as ray elevation, projection type, and DEM accuracy). This controls how far the algorithm can guess the next intersection point for SKIPOVERSHADOW using linear extrapolations.
Type | integer |
---|---|
Default | 5 |
Minimum | 0 (exclusive) |
Run with MATCH File
spiceinit from=ab102401.cub fx from=ab102401.cub to=ab102401.radii.cub equation="radius(f1)" cam2map from=ab102401.radii.cub to=ab102401.radii.lev2.cub demprep from=ab102401.radii.lev2.cub to=localdem.cub
Example of parameters in the graphical interface Run this program using the high resolution DEM 'localdem.cub' and the lighting characteristics from 'ab102401.cub' to create the 'shadowed.cub' |
FROM DEM to do shaded relief and shadow calculations on This is the elevation model for which the shaded relief and shadow positions are to be computed. This is the FROM cube. |
|
MATCH image for computing the sun position We gather the sun position from this image. In other words, we are trying to make the DEM look like this image. |
|
MATCH cube projected for comparison with results This is the MATCH cube projected into the same projection as the DEM. This is helpful for comparing to the results of this program. |
Output shaded relief with shadows This is the result of the shadow program. This is the TO cube. The shadows are not as big as the shadows we see in the projected MATCH image because we have computed the fully shadowed areas in this program. Areas of the image that are getting less light, but not fully shadowed, still appear in the shadow, but show more detail in them. To extend the shadow computations to encompass the visible shadow completely you can turn off SUNEDGE. |
|
Equivalent shaded relief from shade This is the result of the shade program with roughly equivalent input angles. This shows how significant of a difference the shadow computations make. |
Run with TIME
Example's parameters in the graphical interface Run this program given the DEM 'dem.cub' and the lighting characteristics from midnight March 1st, 2012 to create 'shadowed_dem.cub'. |
FROM DEM to do shaded relief and shadow calculations on This is the elevation model for which the shaded relief and shadow positions are to be computed. This is the FROM cube. |
Output shaded relief with shadows This is the result of the shadow program. This is the TO cube. This is what a mosaic of the entire moon would look like, approximately, if all images were taken at one time. |
Steven Lambright | 2013-02-28 | Original version. |
Kristin Berry | 2015-07-22 | Added NaifStatus::CheckErrors() to see if any NAIF errors were signaled. References #2248. |
Kaitlyn Lee | 2018-02-17 | Added the PixelType attribute to the output cube and set it to real. Documentation updated by editor. Fixes #5187. |