Painting vegetation

In this recipe, we will be showing you how you may bring some life to the your level's environment by painting down vegetation objects, such as trees.

Getting ready

  • Before we begin, you must have Sandbox 3 open
  • Then open My_Level.cry

How to do it...

  1. From the RollupBar, open the Terrain tab.
  2. Click the Vegetation button.

    Note

    Before we can paint the vegetation down, we must first add in some objects that we want to use as vegetation. The first vegetation we will place down will be some trees.

  3. Click on the Add Vegetation Category.
  4. Name the new category as Trees.
  5. Select the newly created Trees category.
  6. Click the Add button (page with the +).
  7. Navigate to .../Objects/Natural/trees/river_tree.
  8. Ctrl + click on river_tree_a, b, c, and d.cgf.
  9. Click Open.

All of the highlighted trees have now been placed in this category. You can now start painting with a few of the selected trees, or select the entire category to paint everything within. We shall demonstrate this by selecting the entire category:

  1. Select the Trees category.
  2. Set the Brush radius to 50%.
  3. Click Paint Objects.
  4. Click somewhere on your terrain.

You have now painted a small grove.

How to do it...

How it works...

The vegetation painter is a lot like placing brushes into a level. The major difference between the two is that the vegetation paint allows you to paint multiple objects at a time while following ONLY the terrain, whereas brushes allow you to place one object at a time, but in any location/direction you desire. It is possible to use objects other than just trees or grass for the vegetation painter, but keep in mind that you will not have the same control as with brushes.

There's more...

Here are the definitions to the vegetation parameters.

Vegetation parameters

  • Size: This is the ratio of how big the object is from its original size (1 = default object size).
  • SizeVar: This is a random variation in size that is painted down after taking the Size parameter. For example, Size = 2, SizeVar = 0.3. The final size of painted objects vary between 1.7 to 2.3.
  • RandomRotation: This randomizes the rotation of the painted objects that are placed.
  • AlignTo Terrain: This aligns the objects to the Normal of the terrain surface.
  • UseTerrainColor: This adapts the terrain colour and applies it over the top of the diffuse color on the object (this is good for grass).
  • Bending: This enables bending of the object (if the object permits it).
  • Hideable: This controls how the AI will use this object to hide behind it.
  • PlayerHideable: If the player is within the bounding box of the object, this determines if the player is hidden from the AI's sight when in the defined stance.
  • GrowOn Voxels/Brushes: If true, the painted objects will attempt to align themselves to Voxels/Brushes.
  • Pickable: Flags if the vegetation object is pickable.
  • Brightness: This applies an additional brightness filter on the object.
  • Density: Spacing between the objects when painted (1 = 1meter between objects).
  • ElevationMin/Max: This is the minimum and maximum elevation (in meters), which this object can be painted on.
  • SlopeMin/Max: This is the minimum and maximum slope angle on the terrain the objects can be painted on.
  • CastShadow: This determines whether the object casts a shadow or not.
  • RecvShadow: Does the object receive shadows from other objects? (Good to turn off for performance reasons.)
  • SpriteDistRatio: This is the ratio in which the object will switch over from rendering the object to the defined sprite.
  • LodDistRatio: This is the ratio when the object will switch to rendering a lower LOD.
  • MaxViewDistRatio: Depending on the size of the bounding box, this determines the maximum ratio where the player will be able to see the object at all.
  • Material: Any custom-defined material for the object.
  • UseSprites: If the object should render the Sprites at all.
  • MinSpec: The minimum system specification this object should render on.
  • Layer_Frozen/Wet: This applies custom Frozen/Wet shaders on top of the object.
  • Use On Terrain Layers: This automatically populates the terrain layer with the object with the above defined parameters.

See also

  • The Terrain Texture setup recipe
  • The Placing objects in the world recipe
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.44.229