The Content Editor provides a number of methods to paint trees onto a Crafted Map.
The first method involves using a Metadata Map layer to add a generation pass onto the map. This pass is based on a specific part of the map that you designate as an area to fill with trees (or other objects). A Metadata Map is a layer of information that can be painted onto the terrain, which can be read from a script to make decisions, make choices, or populate an area with objects.
The second method uses a custom, defined Palette to "paint" tree objects onto the terrain. Palettes are special paint brushes you can set up to paint groups of objects directly onto maps. This is great for scattering foliage with a defined density, or in this case, painting forests.
Painting Trees with Metadata
To paint trees onto a crafted map by using a Metadata Layer, you must first key that layer to a category of tree assets.
This will create a brush you can use to paint trees onto a map.
Key a Tree Type to a Metadata Layer
To key a metadata layer to a tree type, perform the following steps:
- Right-Click on Metadata Map in the Scenario Tree and select +Add.
- A new Layer will appear beneath Metadata Map. This layer will serve to hold your selected type of tree metadata.
- Right-Click the new Layer and use the Properties panel to give it a name. We recommend calling it Forest, as it will hold all your forest metadata brushes.
- Right-Click your Re-Named Layer and select +Add.
- The Add Blueprint panel will then appear. Using this panel, find and select map_gen_distribution_categories Metadata and press OK.
- A Family Manager Enum entity will appear beneath your re-named layer. This is the brush that will hold your new tree type.
- Select this new Family Manager Enum and use its Property panel to select a tree type.
- The name of your Family Manager Enum will then switch to whichever tree type you chose. You may now select this brush and use it to paint the selected metadata tree type onto your map.
- You may continue to repeat Steps 4 to 7 to add additional metadata brushes to your Forest Metadata Layer.
Painting Trees using a Metadata Layer
Once you have added all the tree types to your Forest metadata layer, you are ready to use them as brushes to "paint" tree areas onto your map.
The different tree types and their effects are as follows:
- trees_dense will produces a large, thick, dense area of trees in the painted area.
- trees_dense_small will produce a small dense forest that generates trees to fit your painted area.
- trees_loose will produce a scattering of trees that do not form impasse or stealth areas.
- trees_stealth will produce a produce a large stealth forest in the painted area.
- trees_stealth_small will produce a small stealth forest in the painted area.
When you select a metadata tree category, you can adjust the Painter settings for the type of brush you would like to use.
Once your Forest Type and Painter settings are selected, you are ready to paint the a tree area onto your map.
- Right-Click will paint the metadata tree area onto the map.
- Left-Click will erase the metadata tree area from the map.
The image below shows an example of dense woods (dark green), stealth woods (light green), and loose trees (yellow).
Getting the Trees to Appear
To get the Metadata Trees to appear in an area you have painted, you must re-generate your map.
If you have used the Terrain Painter tool to generate your map, you can navigate to Scenario > Generators > Random Scenario to open the map layout tool
The Random Scenario panel will then appear, allowing you to define a new set of parameters to populate your map.
Perform the following adjustments:
- Under Distribution Categories, turn off all resource categories except for the painted tree layers.
- Make sure "Clear Default Parent" is turned off.
Then press OK to generate your new map playout with the metadata tree categories you have selected.
Your new generated map layout will now contain your metadata tree areas.
Metadata Trees and Resources
The Metadata Resource generation is done in a special resource placement pass, which occurs after local distributions, but before Balanced Resources and Global Distributions.
The other resource passes take the occupation of your painted trees into account, so no need to fear your balanced resources going inside your forests.
Using the Palette Tool to Paint Trees
If you want more control over your forests, you can also set up a Custom Palette to paint forests directly onto your map.
To paint trees directly onto your map, perform the following steps:
- Navigate to Scenario > Palettes. The Palettes panel will appear.
- Using the Palette panel, Right-Click and select +Add.
- A new palette will be created. You can give it a name, we recommend 'Forests'.
Right-Click on this new palette and select +Add.
- The Add Blueprint panel will appear. Select Brush from this panel and click OK.
- Right-Click on the Brush you just made and select +Add.
A new Bristle will then be added to your brush.
- Right-Click on the Bristle. The Add Blueprint panel will appear. Select Entity from the list and press OK. You may add as many entities as you wish here. Each entity will act as a different type of tree in your forest brush.
- For each new Entity you add to the brush, Left-Click it to open the Entity Blueprint interface. Click the (...) button next to the Blueprint field.
- This will open the add blueprints, allowing you to search for individual trees. The various types of trees are found under EBPs > gameplay > resources > wood > trees.
The tree entities here have different data encoded to create a variety of forests. Using the 'single' trees will not let you make stealth or dense forests, for example. Make sure you are picking the correct type of tree for the type of forest you want.
- You can repeat steps 6 to 9 to continue to add additional trees (bristles) to your brush.
Repeat these steps until you feel the brustles inside your brush reflects what you want for your forest.
Selecting the Right Trees
If you wish to make a dense forest to block movement, after selecting a few different types of tree for your forest, look to each tree's Transform settings.
Change the Scale of each tree to be between 0.5 and 0.7, depending on the density of forest you want. If you do not change the scale, the default tree density will not be dense enough to create reliable impasse, so you will want to scale them down for spawning, then scale them back up afterwards.
Painting the Forest
Once your brush settings complete, select your Palette in the Object Browser.
Then, hold down the Right Mouse Button and paint your custom forest onto the terrain.
Once your trees are in the world, you can scale them back up to full size by Left-Clicking and selecting them all in the Scenario Tree.
Once all the trees are selected, you can change their scale back to 1.0 using the Transform panel
If you wish, you can also press the "Regenerate All" button to calculate the forest mesh for your new trees, ensuring that their stealth area or impasse are working correctly.