shade appears to not be correctly adding shadows (ISIS v3.2.1)
Based on this discussion thread, it appears "shade" is not calculating correct shadows. The image grows brighter but shadows do not grow.
See attached images which I ran making sure to use a topo DEM not radius.
shade10.cub : z=10
shade30.cub : z=30
gshade10.tif : z=10
shade from=LOLA_npolar.cub to=shade10.cub zenith=10 azimuth=315
shade from=LOLA_npolar.cub to=shade30.cub zenith=30 azimuth=315
shade from=LOLA_npolar.cub to=shade50.cub zenith=50 azimuth=315
shade from=LOLA_npolar.cub to=shade70.cub zenith=70 azimuth=315
shade from=LOLA_npolar.cub to=shade90.cub zenith=89 azimuth=315
gdaldem hillshade LOLA_npolar.cub gshade10.tif -alt 10
gdaldem hillshade LOLA_npolar.cub gshade30.tif -alt 30
gdaldem hillshade LOLA_npolar.cub gshade50.tif -alt 50
gdaldem hillshade LOLA_npolar.cub gshade70.tif -alt 70
gdaldem hillshade LOLA_npolar.cub gshade90.tif -alt 90
Steps to reproduce:
run shade at various zeniths (shadows should grow).
Also a zenith=90 does not work. Seems to just stall - no errors.
Here is the code from GRASS/GDAL:
#4 Updated by Randolph Kirk over 6 years ago
I agree with Trent's assessment that this is essentially a feature of the current implementation. As you increase the zenith angle you should see areas of shadow (zero output) appear where the local slope faces away from the Sun, but there will be no cast shadows.
It would be possible to modify the program to also compute cast shadows, and might be worth considering if there is enough interest and especially if there is funding. The new algorithm would be vastly more complex because what shade does now is a strictly local computation, but cast shadows are global.
My opinion is that modifying shade in this way is not especially useful and should not be a high priority. Shade is meant to make shaded relief maps as a way of visualizing DTM data, NOT to simulate images realistically. Cast shadows make the result more photo-realistic but they also hide parts of the data set.
Where I would like to see the effort expended is to compute cast shadows in photomet, which IS intended to simulate images realistically, so the inclusion of such shadows here has real scientific value as opposed to just aesthetic plusses and minuses.
Another alternative development that could be useful is to add a new mode to shade so that the light source can be from a fixed compass direction (e.g., west) at each point, in addition to the current option of a fixed direction on the map raster. This would let us make shaded relief maps in polar projection and for globes. (The third option, light coming from a consistent direction in relation to the bumpy ellipsoidal planet, is what photomet does already so it's not needed in shade. This also means that getting a sun vector from a Level 1 image--Jeff's second suggestion--does not make much sense for shade.)
#9 Updated by Trent Hare about 1 year ago
- Status changed from Acknowledged to Closed
- Assignee set to Trent Hare
hillshading is typically a local effect and has been fixed (ticket #4326). True shadow casting was not originally needed here and thus this ticket can be closed. As Randy implies true shadow casting is better in a photometry application.