Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

This tutorial shows you how to create a basic setup for vegetation categories and vegetation objects, and how to place and modify them in a level.

...

Table of Contents
maxLevel3
minLevel2
minlevel2
excludeOverview

Vegetation Toolbar

By default, not all of these icons are visible as the RollupBar is too thin to fit them all.

...

  1. Add Vegetation Object
  2. Clone Vegetation Object
  3. Replace Vegetation Object
  4. Add Vegetation Category
  5. Remove Vegetation Object
  6. Export Vegetation
  7. Import Vegetation
  8. Distribute Vegetation on Whole Vegetation
  9. Clear Vegetation
  10. Scale Vegetation
  11. Merge Vegetation
  12. Put Selection to Category

Vegetation Setup

On the RollupBar, click Vegetation to select the Vegetation tool:

Adding a Vegetation Category

Click the Add Vegetation Category button:

...

At the moment, no objects have been added and therefore, it is not active. By clicking the grey triangle, you can show and hide the vegetation objects stored inside the category.

Adding Vegetation Objects

Make sure the new "Forest" category is selected. Click the Add Vegetation Object button.

...

The vegetation object will now appear in the list, inside the Forest category.

Placing Vegetation Objects

Select jungle_tree_large in the Objects list.

The text will be highlighted to indicate that the object has been selected and can be painted or manually placed.

Manually Placing Single Objects

You can manually place selected objects by holding down Shift while the vegetation object is selected in the Vegetation Tool 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 pointer.

...

Keep an eye on the status bar, as quite often helpful information is shared about the currently active tools.

Painting with the Paint Objects Tool

Now click Paint Objects and increase the Brush Radius by clicking and moving the slider to the right. You can also specify more exact dimensions in the input field above it.

...

Before RemovalAfter Removal

Moving Vegetation Objects

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.

...

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.

Vegetation Parameters

Below you'll find a list of available parameters for vegetation objects. Keep in mind that you can adjust properties for multiple objects or entire groups at the same time by selecting multiple objects, or selecting the group (such as "Forest" as we created earlier).

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.

RandomRotation

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.

AlignToTerrainCoefficient

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

 

UseTerrainColor

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.

 

AllowIndoor

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) 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.

 

PlayerHideable

Deprecated - Player can use object for cover.

 

GrowOnVoxels

Deprecated - Make the objects placeable on voxels.

 

GrowOnBrushes

Control the placement of objects on brushes.

Only applies to newly placed objects.

GrowOnTerrain

Control the placement of objects on terrain. Useful if you want them placed only on Brushes.

Only applies to newly placed objects.

AutoMerged

Enable AutoMerged system on this object. see Bending Setup for more information.

Requires specific asset setup.

Stiffness

Controls the stiffness, how much it reacts to physics interaction, for AutoMerged vegetation.

Requires AutoMerged active.

Damping

Physics damping for AutoMerged vegetation.

Requires AutoMerged active.

Variance

 Requires AutoMerged active.

AirResistance

Similar to 'Bending' setting but specifically for AutoMerged vegetation.

Requires AutoMerged active.

Pickable

Allows the player to pickup the object.

 

AIRadius

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

 

Brightness

Deprecated - Changes the brightness of the vegetation group.

 

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. 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.

ElevationMin

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

Tip

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.

ElevationMax

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

Only applies to newly placed objects.

SlopeMin

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

Only applies to newly placed objects.

SlopeMax

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

Only applies to newly placed objects.

CastShadow

Makes the object cast a shadow based on the minimum selected config spec. "High" won't work on Low/Medium specs, for example.

 

RecvShadow

Deprecated - Turns on/off the effect that objects can receive shadows.

 

AlphaBlend

Deprecated - Turns on alpha blending for textures with alpha channel.

 

SpriteDistRatio

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

 

LodDistRatio

Adjust the distance when the LOD changes.

 

MaxViewDistRatio

Adjusts the maximum view distance per vegetation object.

 

Material

Specifies a custom material to apply to the vegetation object.

 

UseSprites

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

 

MinSpec

Makes the group only be rendered at the specified system spec.

 

Layer_Frozen

Deprecated - Turns on the frozen layer material settings

 

Layer_Wet

Deprecated - Turns on the wet layer material settings

 

Use_OnTerrain_Layers

Sets up the vegetation group to be procedurally distributed across the level on selected surface types with the specified density, slope and altitude parameters.

 

Results

To conclude:

  • Add two vegetation objects like you did for the tree:
    • Objects/natural/ground/grass/grass_big_dense.cgf
    • Objects/natural/bushes/cliffbush/cliff_bush_yellow_mini.cgf
  • Adjust their Size, SizeVar, RandomRotation and other properties as described in the steps of this tutorial.
  • Select the Forest vegetation category, adjust the Brush Radius to a suitable size, activate Paint Objects, and start painting.

...