Well as usual I start with the most optimistic ideas and then work my way back to what is actually practical/feasible. The results so far:
Image size/formatUsing RGB images was a bit of a silly idea as it's really trying to do too much. The main reason is that TG's limits with loading images seem to relate more to Mb than pixels. You can therefore load a lager greyscale image than a RGB image i.e. higher resolution masks. Using different greyscale values within a single image for different masks is still a good idea though. The image I added to this project covers the south island and is 7500 x 8600 pixels. The equivalent blue marble texture is only 2700 x 3100 (full resolution).
[sidetrack] For those trying to push the limits of loading large RGB textures for planetary renders, you might try separating the channels to greyscale images and then reconstructing the colour in TG2 using a build colour node. It my be possible to get a 70% increase in image width unless you reach a memory limit before this. [/sidetrack]
Masking RegionsOK, so which masks to combine. Once again, I got too ambitious and tried to mask two non-adjacent areas. I was already concerned that it might not work as expected due to anti-aliasing creating a range of greyscale values at the border of two pixel values in the image. This concern was well founded as this render shows, but at this stage it's good to see when things don't work.
What did work, though is a substantial increase in resolution of the surfacing. You can see part of the lake from the blue marble texture protruding from the lake on the left... and of course you can make out portions of where a wide river bed would flow betweent the pink masked areas.The trick to using this successfully then is going to be in carefully choosing which adjacent features to include in a single mask. e.g. water, beach, rocks, all grass, green grass. In my TG0.9 Grampians project I had these equivalent masks as separate images and didn't have enough RAM to have them all as high res. Some of the masks were at lower res, with careful surface order selection compensating for the lack of resolution (e.g. low resolution beach overlayed at edges by hig res lakes and grass)
There will still be some edge effects, so selecting features that will not look out of place when in close proximity in these areas will also help, as well as some additional mask adjustments to provide some extra breakup of the edges.
Tonal maskingWhile anti-aliasing creates some minor complications at the edges of these masks it also has many benefits. The first is that it greatly increases the apparent resolution of the mask (at the cost of some fine detail). It also increases the apparent tonal range, with an 8 bit greyscale image behaving more like a 16-bit image when you make adjustments to it in TG. It would therefore be reasonably practical to combine "hard" masks with tonal masks in the on image. e.g. all grass (hard mask, pixel value 128) and green grass (tonal mask, pixel value range 32-96). The base grass texture is for dead grass, overlayed with a texture for green grass blended by the green grass mask... Using conditional nodes and colour adjust nodes to extract the tonal range from the mask image and then adjusting it back to the full tonal range. The smoothing from anti-aliasing will add in the intermediate tones.
While this approach my not be as good as using full tonal images, it is all part of a balancing act. It's a compromise between resolution and the number of masks required. By reducing the number of masks required you can increase their resolution which in my experience is usually more beneficial than accurate tonal values.
Conditional nodes.Had to have a play with htese
A few things didn't go quite to plan. To get the conditional node to work I had to convert the colour to a scalar first which wasn't expected. The output of the conditional node was somewhat pixellated but that was because of the way I had set it up (outputs of 1 or 0). To smooth it I could have set a colour adjusted image as the true output, but by the time you set that up for additional masks it would be easier to use colour adjust nodes in conjunction with add/sutract/multiply scalar nodes to construct the separate masks.
The Boolean conditional mask didn't seem to work at all???
Conditional: Image = 1, true = 1, else = 0 worked
Boolean conditional: Image > 0.9 didn't work
In situations where some pixellation is not an issue (distributions of large objects), using an image without anti-aliasing and conditional nodes could provide a quick method of setting up masks.
Very promising so far.... definitely worth some more experimentation.