Working with Digital Vegetation

Originally published in 3D World issue 130

This post is under construction – better images and video are being added:

These days, vegetation and landscape generators generally have full texturing capabilities, population functionality, and the option to randomly generate and texture vegetation. This makes it a lot easier to generate and populate your digital landscapes within a single application, but it also makes it easy to just let the application do the work, particularly for vegetation texturing.
While it certainly helps to invest in an extensive toolkit to do all sorts of little jobs for you, the fact remains that most of the time you don’t really need most of it. Save yourself some money instead and retain more control over a texturing outcome, by honing your techniques in an image editor. Learning how to produce similar results to basic or advanced plug-in functions can save money and enable you to maintain more control in the creative process. It also gives you a better base of understanding as to what these various applications actually do – which in turn will help you create better vegetation:
Some of the most common mistakes I’ve seen made by novices and experts alike, stem from not planning and preparing before starting to texture, resulting in problems such as incorrect Bump and Normal maps, Halos, colour bleed often caused by a poor extraction, and unauthentic vegetation in a scene. These topics and more, such as plug-in free masking and moss-generation, will be tackled with some tried and tested texturing tips aimed at the budding digital gardener.

Tip 1: Affordable texture sourcing

If you’re just in need of some simple background or fill textures for painting over, or  just want to record something to see how it moves, consider using your cell-phone camera. To get yourself the best possible image, set the camera to the largest resolution it can handle, and avoid using the .jpg format, if possible. A common mistake when using your phone’s camera is to use the zoom extensively, which is a bad idea for texturing shots: A cellphone zoom will greatly reduce the quality of an already low-resolution image by pixellation, making it difficult to work with. Hold the phone rock-steady, and step in as close as you can, or your camera can handle without distortion. Avoid using a flash to reduce shine on the texture. After uploading, adjust the white-balance in your image editor, and if needed, sharpen it with an Unsharp Mask at a low Radius and Threshold.

Even a grainy and badly lit snapshot like this can generate a good base for overpaint and detailing

Tip 2: Extracting complex vegetation

When extracting complex vegetation, such as a leafy tree from a background, you can usually generate a good alpha through copying the blue channel and darkening it until the image shows the Transparency map you want. However, a frequent problem is colour spill which becomes more visible the darker your background gets. It usually consists of remnants of colour from the image surrounding your extracted vegetation. To remedy this, select the extracted plant, duplicate it, select the colours spilling out, and on the duplicated layer generate a border mask from the selection, and lock pixel transparency if desired. Then clone from non-bleeding parts of the plant. This fixes the spill and can also make a tree’s foliage look denser. Duplicate the layer with the fixed colour spill below your current one, and blur it. Then update the alpha to match the tightened extraction to avoid halos

I usually have 3 backgrounds on an extracting image: Black, white and a sky gradient, so I can check it will look ok in all three

Tip 3: Clean your maps

When you scan a leaf, a common problem is over lighting on parts, manifesting as white or bright areas in the texture. Desaturating a scanned texture like this into a Bump map will give you unwanted and inaccurate light in the Bump map showing up as white or light grey areas. This will falsely render as a raised area in most renderers when the Bump map is applied to geometry. Using such a map as a basis for a Normal map in a Normal map generator like CrazyBump, Shadermap or Nvidia’s Normal Map plugin will make it worse, as apps like these put out what they’re programmed to process, which isn’t necessarily the same as you see. Avoid this situation by cleaning up and flattening incorrect overlighting before making your Bump map (and then your Normal Map) by using a High Pass filter and mixing it with some manual processing, like a desaturated overlay to maintain detail. Painting in details by hand will produce even better organic results such as stalks and veins which will be raised and cracks or even cells which will be lowered by the maps.

 

Tip 4: Detailing vegetation surfaces

Adding features and details to the surface of your plants will add richness and realism to your renders. When detailing bark, for instance,  remember there is a difference between moss and lichen. A plant, moss likes it shady and damp.  Lichen, a fungus, grows on anything and comes in many shapes and colours, ranging from grey, to ochre, to teal.  Unlike moss, lichen also thrives in extreme environments, which is why you’ll often find rocks and stones covered in in as far north as Bear Island.You can add either to your bark by rendering a fractalbased texture in a landscape generator like i.e. Terragen: Rendered bump and displacement maps in a texture can sometimes give you better results to work with than i.e phototextures alone, as it’s much easier to control and vary the details. Pointing your camera straight down from about an average male’s height, on a flat, white terrain (for easier blending), with flat light, add fractal layers in various ranges of coverage, using hues of green, grey, ochre or teal, adding grades of noise and displacement. When you’re done with the buildup, render it out, and add to your bark through an overlay or a blend layer  I did a quick walkthrough for how to fake moss or lichen on bark, using Terragen’s freebie classic version (even though 2.0 will work perfectly too, as will Vue) and Photoshop – After you’ve rendered out your moss; you can add it to your plant or tree surface texture using an Overlay or a Blend Layer.

This is basically one of the easiest ways to generate lichen around - and probably my favourite homebaked tip :-)

Tip 5: Asset library

Save yourself a lot of time by creating a texture library of vegetation and foliage. Use it to create basic, recyclable vegetation textures such as barks, grass, leaves and petals in various shapes and colours with Transparency Maps. As you build up the collection it will become faster and easier to mix and match textures for greater variety and then plug them into alphas for implementation. Especially if you build up layers with subtle differences of tone and detailing, allowing you to save out only what you need as textures for your shaders by turning layers on or off. Overlays from scans or photos on basic textures can add even more fine detail, with the added bonus of softening potential colour and shine issues and decreasing the need for retouching. Avoid seams or tiling issues in the overlays by sending them through an offset or tiling filter like the offset filter in Photoshop or TextureMaker when you add them.

One layered grass texture, one layered set of petals and alphas, - one scene

Tip 6: Age before beauty

And make sure you age gracefully; In addition to increasing scaling on a mature tree bark-texture, adding moss, lichen and some trunk conks, age it further, or make it  appear diseased by muting the colours in the texture, and adding in some loose bark, deformed growths, and a few larvae and beetles.

Tip 7: I can see your Halo

One of the easiest things to forget is keeping an eye on your Transparency Map. If you get halos in your render, which are those white edges outlining your texture, remove them by adding a similar colour layer under your texture, and crisping up your alpha by using Levels and Curves.  If you’re using a plant generator to render billboards, set the background colour in your rendering program to the average colour in the vegetation. This makes tweaking a lot easier, with the added bonus of painless tweaking of edge density in the alpha. This works especially well for coniferous vegetation

Make sure your billboards don't display halos by rendering them over a similarly coloured background

Tip 8: Rendering digital vegetation

Also – if you’re  rendering  billboards, in addition to setting the background colour to the average colour in the vegetation, remember to keep your light flat. You’re rendering billboards, not art (even though the billboard itself may be) so keep your light flat – use a skylight rather than a sun or set of spotlights if you want to be able to recycle it. It’s annoying  having to tweak light that’s not present in the scene out of the vegetation.

Tip 9: Blend options

Finesse your textures with Layer Blend Options. In Photoshop a Blend IF is perfect for blending barks, cracks, and moss, in addition to image tuning and will also give you great results for sharpening. Use black and white to set Transparency and Opacity on the layers, and use grey to fine tune your blends.

Tip 10: Texturing frost

Don’t set everything to white when you’re texturing frost, as frost tends to form on the surface first, and then into cracks. When texturing leaves, overlay a frost layer covering the entire leaf, and then add a further overlay of stem and veins for the most realistic result.


Download Conditions and terms of use

By downloading the file you agree to not sell, re-distribute or republish any of the content contained in the file or the tutorial. Using the content to add textures to your own (commercial) images is perfectly fine, though :-)
Download petal-files for the GIMP here!

No exceptions without written permission. Files are copyright Cirstyn Bech-Yagher. Feel free to contact me regarding this:-)

Leave a Reply