I have tried to understand what's going on inside the falsecolor script from the Radiance tool set, probably once a year since I dabble with Radiance. Until recently I had no success with changing even a minor detail without messing up the output completely. But recently I got more involved in the Radiance scripting voodoo and after years of trial and failure I finally have mastered enough of this dark art to modify the falsecolor tool to do what I always wanted it to do: show the values I am interested in and not those in between. Along with this I have also added a masking option to get rid of the pinkish background in the default output. If you want to try this version out scroll down to the bottom of the page where you can find the csh script as an attachment. There is no documentation apart from the source code. I added the .csh extension to the file name so you can't accidentally use the wrong script. If you did it wouldn't do any harm though. If you don't use any of the new options falsecolor2 behaves just like the old falsecolor. Zero based legendOne thing I always found irritating about contour plots created by falsecolor is that the highlighted values are at the center of the value ranges specified with the -n and -s option. I am used to legends and contours that highlight the boundaries. This is particularly annoying when you want to show the outline of 200 and 300 lux areas or a daylight factor of 2% and 5%. I don't know of a way to do this with the existing falsecolor tool.Instead of changing the behaviour of the existing contour line function I decided to create a new option that produces a modified legend and contours. After all, the current legend values make more sense with the -cb option and the fully coloured output so I didn't want to loose this format. Therefore I implemented a new -cz option to create zero based contour lines. (If someone can come up with a better name I'm open to suggestions.) falsecolor2.csh -cl -l lux -lw 62 -s 4000 -n 8 -i plane_crop.hdr > cl_orig.hdr falsecolor2.csh -cz -l lux -lw 62 -s 4000 -n 8 -i plane_crop.hdr > cz_myfc.hdr The two command lines above show that the new option is used just like the -cl switch. I tested it also in combination with the -log option but then the legend will not start at 0 which looks a bit odd. Below are the two output images side by side. If you look closely you will see that the contour lines of one plot will fit nicely between the lines of the other. Background maskingI usually try to avoid the fully coloured output but recently I found that with some post processing it can produce convincing visuals (see my explanation of the stencil method). One of the less appealing aspects is the colouring of an empty (or dark) background in purple-pink. Although this could be done in just two steps on the command line if it was required, I decided that it would be a nice extra to have in falsecolor.The new -mask option has one argument which defines the level below which you want the image to be clipped. Primarily this allows you to adjust the threshold value if you have a picture with particularly high background "noise". Usually a small value of 0.1 of 0.01 should be sufficient but that obviously depends on the range of your desired values. With large values you can also suppress the output of lower values in the plot. In the example below a -mask 1500 would chip off a bit of the green corner. I haven't done a lot of testing with this option and I assume that there are problems if you use it in combination with a background image ( -p option). I couldn't test this because I had no suitable image with naturally dark parts. Feel free to experiment.falsecolor2.csh -l lux -lw 62 -s 4000 -n 8 -i plane_crop.hdr > fc_orig.hdr falsecolor2.csh -l lux -lw 62 -s 4000 -n 8 -mask 0.1 -i plane_crop.hdr > fc_mask.hdr |

