Grass Editor
Last updated
Last updated
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.
Sliders for adjusting the Grass
brush.
The grass pool list.
Buttons for managing the grass pool list.
Modifier settings window for the selected grass pool.
The grass patterns list.
Scene editor.
Grass cover creation, editing, and deletion occur in real-time using the Grass
brush on the scene.
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 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.
To highlight the grass objects' locations on the map for the selected pool, hold the Shift
key.
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.
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.
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 Patterns
window displays available templates for the Grass
brush. The name of the selected pattern is highlighted.
The description of the Grass Patterns list is in the file scene/set/grass.set
Grass models in templates feature:
Support for various materials.
Shadow casting and self-shadowing.
Interaction with "wind."
"Burning" functionality.
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.
Use different templates to create a natural and diverse landscape.
Customize pool modifiers for specific tasks, e.g., dense forests, sparse meadows, or neatly aligned crop rows.
Combine grass cover with other elements like trees and shrubs for optimized and realistic scenes.
Adding grass:
Add a new pool or select an existing one.
Configure grid parameters (cell size
, rotation
) for empty pools.
Set modifiers for grass models (scale_range
, spreading
).
Choose a grass template from the Patterns
list.
Use LMB
to draw or click on desired areas.
Repeat steps 3–5 for different templates and adjust parameters as needed.
Removing grass:
Select the required grass pool.
Use RMB
to erase grass from specific areas.
Deleting a grass pool removes all associated models from the map.
When designing maps, it is important to consider that the presence of grass cover impacts performance and to use various optimization methods to prevent FPS drops.
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:
Grass Editor
Entity Editor to complement the surface texture patterns with map entities like stones, flora, and other ambient objects.
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.