Grass Editor

The Grass Editor in the GEM RTS Engine is used for adding and editing grass cover on a map's surface. The grass cover consists of grass pools.

A grass pool is a surface layer containing grass objects derived from one or more grass patterns. Grass Editor enables the creation of unique settings for each grass pool. Overlapping grass pools increase the density and diversity of grass cover in overlapping areas.

To access the Grass Editor, open the Grass tab in the Landscape Editor.

Grass Editor interface elements

The Grass tab in the Landscape Editor.
  1. Sliders for adjusting the Grass brush.

  2. The grass pool list.

  3. Buttons for managing the grass pool list.

  4. Modifier settings window for the selected grass pool.

  5. The grass patterns list.

  6. Scene editor.

Grass cover creation, editing, and deletion occur in real-time using the Grass brush on the scene.

The Grass brush settings

  • The slider Sharp/Soft: adjusts the blur level of the drawing area’s boundaries.

  • The slider Slow/Fast: controls the rate of grass object addition during drawing.

  • Grass brush size is adjusted using the + (Plus) and - (Minus) keys.

The Grass pool list

The list displays the names of all grass pools used in the current map. The name of the selected grass pool is highlighted and comprises:

  • pool type name;

  • short description.

Example: grid ‘grass green’

  • grid: pool type name.

  • grass green: description.

The Grass Pool list

To highlight the grass objects' locations on the map for the selected pool, hold the Shift key.

The Grass Pool list management buttons

  • Add: adds a new pool.

  • Delete: removes the selected pool.

Currently, only the grid pool type is supported. Procedurally generated pools may be added in future updates.

Grass Pool modifier settings

Each grass pool has a set of modifiers that influence the grass cover's appearance. These modifiers adjust pool parameters and grass object spawning during brush use.

Modifiers configuration window

The modifier window opens when a pool is selected or newly created.

name

Contains the pool's code name or brief description. Example: 'grass fields'.

cell size

Sets the grid cell size for grass placement density. Editable only for empty pools.

rotation

Adjusts the grid angle, enabling placement on arbitrary angles relative to the ground surface layout.

Editable only for empty pools.

scale_range

Specifies the range for scaling grass objects during brush use, applied randomly within the range.

spreading

Defines grass object offset from grid nodes. A value of 0 places objects strictly at nodes, useful for creating aligned patterns like "furrows."

strict_angle

Regulates object placement on slopes. (Disabled in the current version.)

The Grass Patterns list

The Patterns window displays available templates for the Grass brush. The name of the selected pattern is highlighted.

The pattern plant_3 highlighted as the selected option for drawing grass cover

The description of the Grass Patterns list is in the file scene/set/grass.set

Grass brush operation

  • LMB: adds grass per the selected pool and template parameters.

  • RMB: removes grass cover from the selected pool.

The grass pool's modifiers are applied when spawning grass objects during brush usage.

Recommendations:

  1. Use different templates to create a natural and diverse landscape.

  2. Customize pool modifiers for specific tasks, e.g., dense forests, sparse meadows, or neatly aligned crop rows.

  3. Combine grass cover with other elements like trees and shrubs for optimized and realistic scenes.

Working algorithm with the Grass brush

Adding grass:

  1. Add a new pool or select an existing one.

  2. Configure grid parameters (cell size, rotation) for empty pools.

  3. Set modifiers for grass models (scale_range, spreading).

  4. Choose a grass template from the Patterns list.

  5. Use LMB to draw or click on desired areas.

Repeat steps 3–5 for different templates and adjust parameters as needed.

Removing grass:

  1. Select the required grass pool.

  2. Use RMB to erase grass from specific areas.

Best practices for realistic landscapes

To achieve the most realistic perception of the map's landscape, it is important to apply a comprehensive approach, using several tools from the Map Editor:

Example of successful grass used on the arena_polesie map

Natural grass cover:

  • Use overlapping pools with varied densities for realism.

  • Combine short, tall, or dry grass patterns for natural effects.

  • Avoid grass in areas dictated by narrative or map design.

Maintaining visual integrity:

  • Use the Color brush for distant areas where grass rendering is disabled for optimization.

  • Adjust terrain and grass cover hues to blend transitions and maintain consistency.

Combining elements: textures, map entities, Grass brush, Color brush

  • Adjust terrain textures or vertex colors for seamless integration.

  • Add objects like tall grass, stones, or shrubs for a lively environment, aligning with the map’s style and logic.

Using the Grass Editor in combination with other tools allows for creating detailed and visually appealing game maps, significantly simplifying the process of adding and configuring vegetation.

Last updated