- Setup
- Texture preferences
- Common parameters
- Types of landscape layers
- Automatic grass meshes
- Water caustics
- Optimization
- Advanced parameters & limitations
Setup
- Add the Landscape Auto Material package to your project.
- Duplicate the master material instance Landscape_Automaterial_Inst from Content/LandscapeAutoMaterial/Materials/LandscapeAutoMaterial.
- Apply your copy of the instance to the Landscape actor in your level.
- Set up the GlobalScale parameter in the material instance to suit your landscape size.
- If you want to use additional weighted-blended layers, paint the whole landscape with the Auto layer first. Nothing appears to happen, but this is required for proper weighted-blend behaviour.
- Done!
Texture preferences
You can enable or disable the various texture inputs (albedo, roughness, height-mask, etc.) and link the texture references you want.
Common parameters
The 01 Planar group holds the basic parameters that are shared by every other material layer — the common starting point for tuning a layer.
Types of landscape layers
All basic materials are weight-blended layers. Only overlay layers — such as coloring, caustics and the foliage-eraser layers — are non-weight-blended.
So if you paint a weight-blended layer on top of a non-weight-blended layer, the non-weight-blended layer still exists. To clear a non-weight-blended layer you have to erase its painting using click + shift erase painting.
Automatic grass meshes
By default, auto-grass meshes are generated on the Planar material layer. See Advanced parameters if you want to generate auto-grass on a different additional layer.
You can set up auto-grass meshes in these GrassType objects:
- Default grass (black in splat mask) — /Game/LandscapeAutoMaterial/Meshes/Grass/Grass_01
- Small formations (blue in splat mask) — /Meshes/Grass/Grass_02
- Medium formations (yellow in splat mask) — /Meshes/Bushes/Bushes_01
- Big formations (red in splat mask) — /Meshes/Stones/Stones_01
- Splatmask — /Textures/Generic/SplatterMask_D
Currently you can't set up grass-output actors directly in the master material instance, because UE4 doesn't implement that. Instead, modify a copy of the master material and set up different Landscape Grass Types in the Grass Output node.
Water caustics
A non-weight-blended overlay layer that imitates water caustics projected onto the landscape.
Optimization
Use these schemes to boost your FPS:
- Turn off Tessellation in the master material (it hits performance on huge landscapes): .../LandscapeAutoMaterial/Landscape_Automaterial_M.
- Set the LODDistance Factor in landscape preferences — e.g. 2.5 with Square-Root LOD Falloff in a fly-by scene.
- Turn cast-shadows off for all 3rd-LOD grass meshes.
- Tweak grass LOD distances (the Screen Size parameter) to trade quality against performance. You can also disable 2nd-LOD shadows and raise the 1st-LOD distance.
- Set a lower grass density in the Grass Type settings for grass and bushes.
- Set Start and End cull distances for grass more efficiently.
- Disable unused additional layers in the master material instance: 00 SETUP \ Layer_N_Enabled = false.
- Decrease the auto-grass density multiplier: 00 SETUP \ Planar_Foliage_Generation_Density = 0.5 (default 1).
Advanced parameters & limitations
Extra customization of blending and tessellation parameters. All parameters are sorted into groups in the master material instance Landscape_Automaterial_Inst.
- Texture limits. On SM5 (PC, consoles) you can use up to 128 textures in a landscape material; on SM3 the maximum is 16. You can pack channels from several textures into one to reduce samplers. On a Mac (non-SM5) reduce the used textures to 16 by turning off some material layers in Landscape_Automaterial_Inst — disable Layer1_Enabled, Layer2_Enabled, Layer3_Enabled and Slopes_Use_HeightVariation, and the shader will compile successfully.
- Dynamic light. Landscape grass output (auto-generated grass) is available only with a Dynamic Light setup (like Epic's Kite Demo). To force dynamic light, turn off Allow static lighting in project settings.
- Grass collision. UE4 Landscape Output can't generate collision for grass meshes for performance reasons. Work around it by placing unique collision for large geometry by hand.
Video walkthrough
Get Landscape Auto Material
Everything you need to paint beautiful terrain, fast.