Mapping Shield Lands Part 7: Masks, the unsung workhorse

2021-04-02
,

Almost every aspect of terrain creation is involves masks, the feature that either hides or reveals things. Mask are a familiar feature to all Photoshop users as that greyscale add-on to layers, and in it comes in many variants in World Machine, GAEA, Blender, Vue and every other 3D tool I know of.  It is a simple greyscale bitmap that uses its brightness value to reveal things and lack of it to hide whatever it is associated with.  This is a very powerful feature that can be used in a surprising number of ways.

Bit depth are the key feature of masks, they normally come in 1-bit (black and white), 8-bit, 16-bit and the whopper 32-bit. In most programs like Photoshop for example, you get the bit depth defined in the settings for the file you are working on, but in terrain generating tools you might be required to assign a bit depth to masks either at creation or export. Size difference is the main reason to go low, or the fact that you don't need nuances, at times a clear cut boundary is what you need so even a low value works. Some uses of masks requires very high precision so even a 16-bit mask might not be enough, this is especially true when it comes to heightmaps. 8-bit heightmaps comes with a "Minecraft warning", the low precision creates unnatural terracing across the landscape. 16-bit heightmaps are good enough for most use cases, but if you want to be able to zoom in and create detail maps in the future, or cover large differences in terrain elevation 32-bits are a good precaution. For my Greyhawk project both the ability to create more detailed local maps and cover big elevation differences are vital so a 32-bit height map is needed.

More is not always better, and Photoshop can balk at 32-bit mode due to the sheer size of files and when it comes to color edits the human eye have a hard time seeing the difference between even 8-bit and 16-bit color. Few computer monitors offer more than 10-bit color depth anyway so for texture editing 8-bit masks usually do the job well enough. Inside 3D applications and for terrain creation things are another matter, and selection tools in these mask use the internal bit depth of the application which is usually 32-bit so no need to change things. Exporting masks and heightmaps (which is technically just another mask) is when you have to decide on bit depth.

World Machine and GAEA comes with a large number of Selection Tools, they are the standard way you create masks. You can Select for Elevation, Direction, Roughness, Convexity, Slope, Wetness, Color, Hue, Brightness, Saturation. The last ones are color related and are a nifty way to place trees or tufts of grass in wetlands for example.

Most Selection tools comes with a Falloff  setting that lets you tweak the edge of a selection, sharp and abrupt or smooth  and diffuse.  Enough falloff is critical to have with you, especially when you export for use in Photoshop editing later. You can always sharpen a mask afterwards in Photoshop, but blurring sharp edges usually work less well, and re-renders take lots of times, and can also give you different outcomes, making results not matching.

Selections often need to be done in combinations like slope of a certain degree above a certain elevation, and the result of that selection can be refined by erosion masks to only show within the erosion flow areas. This is how I defined areas of boulders accumulating beneath certain slopes, areas they would have naturally have done so in the real world. The number of possible combinations are literary endless, an Erosion Device creates 4 new masks as part of the process and with secondary selections like Roughness and Convexity you can create all the mask data needed for a truly natural looking terrain with an endless amount of incredible detail.

Masks are also a key part of every step of the process from the mixing of fractals and erosion impact, in biome allocation, texturing relies heavily on the use of masks as do the touch up editing afterwards. Getting used to and mastering the "grey side" of digital imaging is a vital part of digital terrain creation which makes us Greyhawk fans well prepared!

Next part of this series will be a deep dive back into the world of color with texturing.