Skip to end of metadata
Go to start of metadata

Overview

The Vegetation Editor is used to control all the vegetation in your level, for example trees, grass and flowers. This doesn't mean you're limited to only placing plants; you can also add rocks, dead trees, logs etc. Technically any *.cgf item can be assigned within the vegetation tool.

Adding items to the vegetation tool means that they can benefit from the interconnected systems such as instancing, physics etc. to tie in the Global Wind to get them to react under different environmental conditions.

The main benefit of using the vegetation tool is that it allows you to "paint" down vegetation with a brush. Depending on the size of that brush's radius it will automatically flood that area with your selected items. But if you place down vegetation by adding them as a brush, this can only be done 1 item at a time and you would have to copy-paste that item over and over to build up the scene.

The main concept behind the vegetation tools is that you configure categories or groups and within each item inside these categories you define rules such as density, size, alignment, slope, min/max height etc. When using the Paint feature, this will place down the vegetation in that area, but abide by the rules defined within each item. This simple technique allows the user to quickly populate a forest scene in seconds.

You can add vegetation in two ways: via the painting technique mentioned above, or by placing each item individually to "fine tune" their position/rotation/scale. These different ways will be covered below.

To access the vegetation tool, go to the Tools -> Vegetation Editor.

The Vegetation Editor consists of several components: 

We'll discuss these components plus some basic usage information about the Vegetation Editor below.

Components

1. Menu Bar

Like many other tools, the Vegetation Editor has its own menu bar, which in this case has the following options:

File

OptionDescription
Add Group

Adds a new group to the list below in which several vegetation objects can be grouped. You define a group into a logical batch of similar items, grasses, bushes, trees etc. There are no rules as to what you call or add into a group. It's for you and your team's benefit to organize the groups into logical groups so at a glance, you can guess what it contains without opening up the group.

Add Object

Adds a new vegetation object to the selected group.

Import Vegetation Objects

Imports vegetation objects. Any groups exported out as *.veg groups, can be re-imported as with all their pre-defined settings.

Export Vegetation Objects

Exports vegetation objects. Selecting the highlighted categories/groups you want to export and pressing this button will allow you to save these items, including their pre-defined settings, into an external *.veg group. This can then be imported into another level.

Edit

OptionDescription
Remove

Removes all vegetation objects of the type(s) that you have selected.

Group

This sub menu has two options:

  • Rename Group lets you rename the selected group.
  • Move Selection to Group lets you select a vegetation object in the viewport and add it to the group you have selected in the Vegetation Editor.
Objects

This sub menu has two options:

  • Replace Object replaces all objects of the selected type(s) with a different one.
  • Duplicate duplicates the selected vegetation object. This allows you to have the same vegetation model, but apply different parameters to add variation, such as an alternate material, different bending values etc.

Tools

OptionDescription
Clear selected Vegetation Objects

Removes all vegetation objects in the selected group from the level without removing them from the Vegetation Editor.

Scale selected Vegetation Objects

Lets you scale all the vegetation objects in the selected group at the same time.

Randomly rotate all instances

Randomly rotates all vegetation objects in the selected group. They are all rotated separately, so they won't all point in the same direction after rotating.

Clear rotation

Puts the vegetation objects in the selected group back to their default direction.

Merge Vegetation Objects

This replaces all the different selected items in the group with the first instance in the list. (Warning: use lightly!)

Remove duplicated Vegetation

Removes a vegetation object that is within 0.1m of another vegetation object.

View

OptionDescription
Show Preview

Shows a preview of the selected vegetation object in the Vegetation Editor.

Show LOD files

Shows the LOD files in the file browser.

2. Toolbar

The toolbar in the Vegetation Editor contains four buttons:

ButtonNameDescription
Add Group

Adds a group in which you can place any number of vegetation objects.

Add Object

Lets you add a vegetation object in the selected group.

Duplicate

Duplicates the selected vegetation object and places the copy in the same group.

Remove

Removes the selected vegetation object from the Vegetation Editor and your level.

3. Vegetation Overview Window

In the Vegetation Overview window you can see which vegetation objects have been used in the level and how they have been grouped.

The boxes in front of the names of groups and vegetation objects can be ticked or unticked, respectively showing or hiding either the entire group or all instances of the selected vegetation object.

When right-clicking on different parts of this window, different context menus will appear:

Column Header

When right-clicking on the column header (the area that reads "(Visible) Object" in the screenshot above), you'll get several options to hide or unhide different columns:

OptionDescription
(Visible) Object

Shows/hides the names of the groups and vegetation objects in the level.

Count

Shows/hides how many instances of the vegetation object have been placed in the level.

TextMem Usage

Shows/hides the amount of texture memory the vegetation object uses.

Material

Shows/hides the material that is assigned to the vegetation object.

Elevation Min

Shows/hides the minimum elevation at which the vegetation object can currently be placed.

Elevation Max

Shows/hides the maximum elevation at which the vegetation object can currently be placed.

Slope Min

Shows/hides the minimum slope at which the vegetation object can currently be placed.

Slope Max

Shows/hides the maximum slope at which the vegetation object can currently be placed.

Group

When right-clicking on a group, you'll get the following options:

OptionDescription
Add Object

Lets you add a vegetation object to the selected group.

Clear selected Vegetation Objects

Removes all vegetation objects in the selected group from the level without removing them from the Vegetation Editor.

Scale selected Vegetation Objects

Lets you scale all the vegetation objects in the selected group at the same time.

Randomly rotate all instances

Randomly rotates all vegetation objects in the selected group. They are all rotated separately, so they won't all point in the same direction after rotating.

Clear rotation

Puts the vegetation objects in the selected group back to their default direction.

Merge Vegetation Objects

This replaces all the different selected items in the group with the first instance in the list. (warning use lightly)

Remove duplicated Vegetation

Removes a vegetation object that is within 0.1m of another vegetation object.

Remove

Removes the selected group and the vegetation objects in it from the Vegetation Editor and the level.

Object

When right-clicking on a single vegetation object, you'll get the same options as when right-clicking on a group, but you'll also get the following options that are specific to objects:

Additional OptionDescription
Replace Vegetation Object

Replaces all instances of the selected vegetation object with another object.

Duplicate

Duplicates the selected vegetation object and places the copy in the same group. This can be useful if you want to use the same vegetation object, but want to give it different parameters than the original copy.

Empty Space

When right-clicking in an empty space in the Vegetation Overview Window, you'll get a context menu with the following options:

OptionDescription
Add Object

Adds an object to the last group that was opened.

Add Group

Adds a new group.

4. Editing Buttons

Under the Overview window, you'll see three buttons:

ButtonDescription

Activating this button lets you paint the selected vegetation onto the terrain in the Viewport. (See below for more information.)

Activating this button lets you erase only the selected vegetation object(s). All other objects will not be removed. (See below for more information.)

Activating this button lets you select vegetation object. It will not be possible to select any other objects apart from vegetation. (See below for more information.)

Icon

This is the only way to select vegetation; normal selection through the Select mode will not select vegetation.

5. Brush & Vegetation Parameters

When the Paint button is activated, an option appears that lets you change the size of the brush.

Icon

You can also change the size of the brush by holding Alt and moving the mouse cursor up (increase) or down (decrease) in the Perspective Viewport.

The Vegetation parameters contain a large number of options to adjust the selected group or individual vegetation objects.

Parameter

Description

Notes

Size

Changes the size of newly placed vegetation objects. This allows you to uniformly scale the vegetation, where 1 represents 100%, and therefore, 1.5 is 150%.

Only applies to newly placed objects.

SizeVar

Changes the size variation +/- of newly placed vegetation objects. This is the size variation within a set of painted vegetation objects of one kind. This works on a per brush stroke basis. Keep Size at 1 and set SizeVar to 0.2 to get a nice variation. Be careful using this value too excessively as it can make it difficult to optimize view distance ratios, given that there's only one MaxViewDist setting but the objects vary in size and can be more noticeable when larger objects disappear.

Only applies to newly placed objects.

Random Rotation

Randomly rotates objects while painting new vegetation objects. To create a more natural look and distribution, you can set up a RandomRotation in the vegetation objects when you paint them. This feature works only if you use the Paint Object tool.

Only applies to newly placed objects.

Rotation Range To Terrain Normal

Use this param to align vegetation items to rotate themselves inline with the direction of the terrain normal. An example would be where on a deserted tropic island, all the palm trees on the islands edge, all lean out over the ocean to to maximize the sunlight they can receive. This works great if all of the palm tree models are "leaning" in the same direction (eg: +Y).

 

Align To Terrain Normals

0 - 100. Setting this to 0 makes the object ignore the the terrain "angle" at the point where its placed and aligns vertically (+Z). Setting it to 100, means the vegetation will align itself perpendicular to the terrain angle. Setting this to 50 or any number in-between 0 - 100, allows the vegetation object to align 1/2 way between vertical (0) or full terrain alignment (100). This offers more control than before where it was previously a checkbox.

 

Use Terrain Color

Makes the individual object receive the color of the underlying terrain so that it matches better. This option is used to blend the grass with the underlying terrain color. You can also use this option on other objects, but it works best with grass. This effect is especially useful for disguising grass that fades in the distance.

 

Allow Indoor

Enables the vegetation to be rendered within vis areas.

 

Bending

The Bending value controls the procedural bending deformation of the vegetation objects. It ranges from 0 to 100, 0 meaning no bending effect and 100 meaning the maximum effect. This works based off the amount of environment wind (WindVector, see Level Settings) in the level.

Ignored by AutoMerged settings.

Hideable

Deprecated - Can be set to hideable so that AI used it as hard cover, or to secondary so that AI used it as soft cover.

 

Player Hideable

Deprecated - Player can use object for cover.

 

Ground Decal Material

 

Choose a decal material to automatically place under every instance of this vegetation type.

 

Grow On

  • Brushes - control the placement of objects on brushes. This extends the feature to not only be able to place items on terrain, but also on brushes placed inside the level.
  • Terrain - control the placement of objects on terrain. If un-checked, this allows you to position vegetation items off of the terrain surface and float in the air.
Only applies to newly placed objects.

Auto Merged

Enable AutoMerged system on this object. see Merged Meshes vegetation tutorial for more information.

Requires specific asset setup.

Stiffness

Controls the stiffness, how much it reacts to physical interactions.

Requires AutoMerged active.

Damping

Physics damping for vegetation.

Requires AutoMerged active.

Variance

Adds a random factor to the wind direction during wind deformation simulations of auto merged vegetation.

Requires AutoMerged active.

Air Resistance

Similar to 'Bending' setting but specifically for AutoMerged vegetation. Controls the auto merged mesh deformations air resistance value.

Requires AutoMerged active.

Pickable

Allows the player to pick up the object.

Asset requires special setup in DCC tool

AI Radius

Deprecated - Used to tell the AI how wide the object is.

 

Brightness

Deprecated - Changes the brightness of the vegetation item.

 

Density

Adjusts the density, e.g. how close individual objects are near each other while painting new vegetation objects. The density setting ranges from 0 to 100. This value represents the distance between each vegetation object. Set the value to 10 and paint some trees. Trees will be placed further apart from each other.

Icon
If your density setting is bigger than your brush radius, the vegetation will not be painted, so always make sure you have a suitable brush radius when painting.
Only applies to newly placed objects.

Elevation Min

Limits the minimum height at which you can paint vegetation objects.

Icon

For painting underwater vegetation, make sure to adjust the ElevationMin value. Set it lower than the ocean; 0 is a safe option.

Only applies to newly placed objects.

Elevation Max

Limits the maximum height at which you can paint vegetation objects.

Only applies to newly placed objects.

Slope Min

Limits the minimum angle of the terrain on which you can paint vegetation objects. 255 equals 90 degrees. With a higher than 0 slope value specified you can no longer place objects at flat grounds.

Only applies to newly placed objects.

Slope Max

Limits the maximum angle of the terrain on which you can paint vegetation objects. 255 equals 90 degrees. With a lower than 255 slope max value specified you can no longer place objects on very steep areas.

Only applies to newly placed objects.

Cast Shadow Min Spec

Determines the minimum spec in which shadows will be cast.

 

Dynamic Distance Shadows

No caching of sun shadows for this object. Always render dynamic sun shadows for this object even when it is very far away.

 

Global Illumination

Use this vegetation for GI voxelization. This makes vegetation affecting GI: casting indirect shadows and producing light bounces.

 

Sprite Dist Ratio

Deprecated - Adjusts the distance when the sprite rendering should be enabled.

 

Lod Dist Ratio

Adjust the distance when the LOD changes.

 

Max View Dist Ratio

Adjusts the maximum view distance per vegetation object.

 

Material

Specifies a custom material to apply to the vegetation object.

 

Use Sprites

Deprecated - Turns on / off the use of sprite rendering in the distance.

 

Min Spec

Makes the group only be rendered at the specified system spec. Used to control highly detailed vegetation items, to only appear on Very High Spec (for example).

 

Layer Frozen

Deprecated - Turns on the frozen layer material settings.

 

Layer Wet

Deprecated - Turns on the wet layer material settings.

 

Object

This is the object that the vegetation item is using. Clicking on the folder icon allows you to change the *.cgf to another model.

 

Use On Terrain Layers

Sets up the vegetation item to be procedurally distributed across the level on selected surface types taking into account the items parameters such as density, slope and altitude etc.

 

Transforming Vegetation Objects

Placing / Erasing

When the Paint button is activated and you click in the Perspective Viewport, based on the size of the brush and the density set in the parameters, you will place one or more vegetation objects into your level. Holding LMB and dragging across the terrain will keep placing the selected object(s) until you let go of the mouse button. When placing the objects via the painting method, this will adhere to the rules you define within the parameters (such as density, size etc.).

You can manually place only one instance of the selected object by clicking the Paint button, holding down Ctrl while the vegetation object is selected in the Vegetation Editor and then clicking the mouse button in the Perspective Viewport. The selected object will be placed on the terrain, based on the position of the mouse cursor.

Icon

Holding Shift while the Paint button is activated will let you erase vegetation objects without having to use the Erase button. You should see the text "Remove" in the green circle instead of "Place".

Simply let go of the Shift button to start painting vegetation again.

Selecting

In the image below, the tree has been selected, which is indicated by the green and blue ring around the tree. To also help you identify the selected vegetation object, we shade the selected item white. Selecting single or multiple vegetation objects is only possible when the Select button in the Vegetation Editor is activated. 

Selected vegetation object

Below is a table that gives you an overview of the various combination of key and mouse actions:

 

Action / KeyModeEffect
LMBPaintPlace down multiple vegetation objects abiding by the rules defined in the objects parameters.
LMB+CtrlPaintPlace down only 1 of the selected vegetation items down.
LMB+ShiftPaintInverts the painting mode into the Erase Tool, (shortcut method).
LMBEraseRemoves vegetation items.
LMB+CtrlEraseRemoves vegetation items.
LMB+ShiftEraseInverts the Erase mode into the Painting Tool, (shortcut method).
LMBSelectSelect the vegetation item under the cursor.
LMB+CtrlSelectAdds another vegetation item to the current selection.
LMB+ShiftSelectN/A
LMB+DragSelectAllows you to select multiple vegetation items that are within the drag box. Release LMB to finalize selection.

Moving

Moving vegetation objects works the same as with other standard objects: using the Move mode.

For more information on how to use the Move mode, see this page.

As of CRYENGINE 3.5.3, there have been some tweaks to the way moving vegetation objects are handled. A problem which became more evident when dealing with very dense vegetation (auto-merge grass) was that moving vegetation to an invalid location resulted in seemingly sporadic behavior of the Editor.

If you've ever noticed vegetation jumping back and forth as you move it around, this is because the vegetation system was unable to find a valid location to place the moved instance (too dense, not enough room). When this happens, the vegetation instance is moved back to its last-known-good location. How we've improved this behavior is the important part though. The process is outlined as follows:

First, select a chunk of vegetation:

Moving to an empty area is no problem:

Now, try and fit this dense chunk of grass on top of another dense chunk of grass.

The vegetation that fails to find a valid location will return to its last-known-good location but now it will be highlighted red:

Pressing ESC will then de-select the successfully placed vegetation and keep the failed vegetation selected.

This allows you to either delete it or proceed to move it again:

This readability on exactly what the vegetation system is doing should make it much easier to control placing vegetation assets, as well as ensuring no wasted resources and over-packing of assets.

Rotating

Select one or more vegetation objects with the Select button, hold Ctrl+Alt and move the mouse pointer up/down to rotate vegetation objects. Note that you don't need to be in Rotate mode (like normal brush manipulation), this is a built-in shortcut within the Vegetation Editor.

Icon
You can also select vegetation objects with the Select button and use Rotate mode just like you would with other objects.
 For more information on how to use the Rotate mode, see this page.

Scaling

Select one or more vegetation objects with the Select button, hold down Alt, click the mouse button, and move the mouse pointer to scale selected vegetation object. Note that you don't need to be in Scale mode (like normal brush manipulation), this is a built-in shortcut within the Vegetation Editor.

Icon
You can also select vegetation objects with the Select button and use Scale mode just like you would with other objects.
 For more information on how to use the Scale mode, see this page.

Painting with the Paint Objects Tool

When you want to paint some vegetation down, you select the Paint mode. This adds an additional section in the parameters under Brush -> Radius. Moving the slider to the right increases the Brush radius (in meters). You can also specify more exact dimensions by clicking in the input field and entering the value that you want.

If you move the mouse pointer into the Perspective Viewport, you will see the brush's size, indicated by a green circle. Click and move the mouse pointer around to paint some vegetation. You will see the trees being distributed on the landscape:

As you can see, the distribution of the items will be very regular. However, you can adjust the options within the vegetation tool panel to give the vegetation brush some variety (SizeSizeVarRandomRotation and Bending used below):

 

  • No labels