A small fern in soil beside a gray pebble

CryEngine Terrain and Foliage Creation

Add a single plant type to an existing CryEngine terrain, tune its spacing until you can see it, and walk through it in game mode.

This is a different slice from our earlier CryEngine terrain post: that one built the hill, the path, and the light, while this one assumes the terrain is finished and covers only one foliage layer on top of it.

You will not sculpt anything here. You will not repaint ground materials or move the sun. If your level does not have terrain yet, build that first and come back.

The goal is small on purpose. One plant mesh, one group, one painted area, and one walk through the result. When the plant sits on the ground, sways a little, and reads clearly from eye height, you are done.

The steps follow the Vegetation Editor page in the CryEngine 5 manual. Labels and panel layouts shift between releases, so keep the manual for your installed version open while you work. If a control below does not match what you see, the manual wins.

Pick one plant and one place

Choose one plant type. A grass clump, a fern, or a low flowering shrub all work. Avoid trees for this pass. Trees bring breakage, collision, and shadow questions that belong in their own session.

The manual says nearly any mesh with a .cgf extension can go into the Vegetation Editor. If you are using an asset pack, find the plant’s .cgf file before you open the editor so you are not hunting for it mid-step.

Then pick one place on your terrain. A meadow beside the path, the bank of a stream, or the base of a slope is enough. Write it down in one sentence, such as “ferns along the shady side of the stream.” That sentence tells you where to paint and where to stop.

Open the editor and make a group

Open the editor from the Tools menu. The manual lists it as Tools, then Vegetation Editor.

Create a group with Add Group. The manual describes a group as a logical batch of similar objects, and the group is where the shared settings live: density, size, alignment, slope, and height limits. Rename the group after your plant so you can find it later.

With the group selected, use Add Object and pick your .cgf file. The manual notes that if no group exists, Add Object creates one for you. Making the group yourself keeps the name clean.

Click the new object in the overview list so it is selected. Painting acts on what is selected there.

Set the parameters before your first stroke

The parameter list appears when Paint is active. Many of these settings only apply to the next stroke, so set them first. Painting and then tuning means erasing and painting again.

Work through these in order:

  • Size. The manual gives a range of 0 to 3, where 1 is the mesh’s original scale. Start at 1. Change it only if the plant looks wrong next to your player.
  • SizeVar. This varies the size of each instance in a stroke. The manual suggests keeping it low, in the 0.1 to 0.3 range. A little variation hides repetition. Too much makes the patch look random.
  • Random Rotation. Turn it on. Identical plants all facing the same way are the fastest way to make a patch look placed by hand.
  • Align To Terrain Normals. This runs from 0, fully upright, to 100, fully tilted to match the slope. Grass on a hillside usually looks better somewhere in between. Try the middle and adjust by eye.
  • Use Terrain Color. When checked, the plant takes color from the ground under it. This helps it blend into your existing ground material.
  • Slope Min and Slope Max. These limit which angles the plant will grow on. Lower the max if you do not want plants on cliff faces. Keep the min at 0 unless you want plants only on slopes, since the manual warns a min above 0 keeps them off flat ground.

Leave the rest at their defaults for now. Shadows, LOD ratios, and merged-mesh physics are tuning for a later pass.

Get a density you can see

Density is the setting that trips people up. In the manual’s wording, higher values place objects further apart. The range is 0 to 100, and the value represents the distance between each plant.

That means the number reads backward from what you might expect. A high density value gives you a sparse patch.

The brush has one parameter, Radius. The manual warns that a small radius with a high density can stop anything from being painted. If you click and nothing appears, make the radius bigger or the density value smaller before you assume something is broken.

You can also hold Alt and drag the left mouse button up or down in the viewport to change the radius, according to the manual. Check that shortcut in your version.

Start with a medium radius and a modest density value. Paint one stroke. Look at it from the editor camera, then from close to the ground. You want to see clear individual plants with ground between them, not a solid green mat and not three lonely clumps.

Adjust density and paint a second stroke beside the first. Compare the two. Keep the one you like and erase the other.

Paint the patch

With Paint active, the brush shows as a green circle in the viewport. Click and drag across the terrain with the left mouse button to place plants.

Paint the place you wrote down and nothing else. Follow the natural reason for the plant being there. Ferns along a shaded bank, grass thicker in low ground, thinner near rock.

Leave the walking route mostly open. A few plants at the edges of the path help it read as worn ground. Plants across the middle of it hide the route.

If you need one plant in an exact spot, the manual says holding Ctrl while clicking paints a single instance.

To remove plants, switch to Erase and drag across them. Erase works on the selected object, so check the selection first.

To check how many you placed, right-click the header of the overview list. The manual describes a Count column you can turn on there. It is a quick way to see whether one stroke placed far more than you intended.

Turn on a little wind

The manual explains that plants placed through the Vegetation Editor can respond to wind, unlike static objects placed by hand. The Bending parameter controls how much each plant sways, with 0 meaning no sway.

The strength of that sway also depends on the level’s wind settings in the Environment Editor. Look up the wind setting for your version in the current docs rather than guessing at the panel.

Set a small bending value first. Plants that thrash in a light breeze look worse than plants that stand still.

Walk through it

Enter game mode and walk your route from start to finish. Do not edit during this pass.

Then walk through the patch itself. Note three things:

  1. Plants floating above the ground or sunk into it, usually on steep spots.
  2. Places where the patch hides the path.
  3. Any spot where the plants all look the same size and angle.

Fix one note at a time. Floating plants usually mean the alignment value needs a change or the slope limit should exclude that angle. Repetition usually means SizeVar or rotation needs another look. Remember that some of these settings only affect new strokes, so you may need to erase and repaint that area.

Walk it again after each fix.

Save and stop

Save the level and back up the project folder. The manual describes exporting vegetation objects with their settings as a .veg file, which you can import into other levels. If you plan to reuse this plant, export it now while the settings are fresh.

Then stop. One plant type that sits right, sways gently, and leaves your path readable is the finished slice. A second plant type, trees, or merged-mesh grass can come later, one at a time, with the current CryEngine docs open beside you.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *