Procedural Tools Plugin

 

This document describes how to use the custom Goofish Procedural Tools plugin to decorate foliage across any number of terrains, of any size, including using world composition.

 

Plugin Installation


To activate the plugin, simply copy the “ProceduralTools” plugin into the [Engine]\Plugins folder.

Once installed the ProceduralTools plugin will be available from the toolbar.

 

 

 

 

 

Plugin Usage


This section describes the plugin general use, to create procedural spawners, that will manage Hierarchical Instanced Static Mesh components for the world.

Activate the plugin from the toolbar

Any of the properties below can be changed later after creating the asset in the content browser

 

  • Create From Selected

    • Select static mesh actors from the Content Browser, and the tool will create a spawner blueprint in the content browser under /Game/Blueprints , with the configured properties

  • New Name Suggestion

    • Suggest a name for the spawner blueprint to be created in the content browser.

  • Align To Surface

    • Set the align to surface property on the created asset.

  • Terrain layer

    • Choose from a standard set of terrain layers, such as Grass, Rock, Snow.

      • NOTE: these can be changed later in the asset

  • Culling Distance, Height

    • Common culling and height offset distances.

  • Tiled

    • This will set the “Tiled” property on the spawner asset.

 

 

Custom Procedural Spawner

This section describes the properties, and usage of the spawners.

  • Pitch, Yaw, Scale Max

    • Used to drive the random instance placement. ( in degrees for rotation )

  • Density Scale

    • How dense to pack the instances, this will be relevant to the extent of the tile, or the world, depending on if “Tiled" was specified.

    • 0 Denotes no spawning.

    • 0.1 Denotes relatively sparse spawning.

    • 0.5 Denotes fairly dense spawning. ( use with caution )

    • 1 Denotes extremely dense. ( do not recommend )

  • Tiled

    • If specified, and the world is using world composition, each level tile will get it’s own spawner instance, that will be managed by this spawner.

      • Instances will be placed only within the confines of the tile, density scale refers to this size.

    • If not specified, only the persistent level will get a spawner instance, that will be invisible and managed by this spawner.

      • Instances will be spawned according to the World Offset and Extent properties.

      • Density scale will refer to the World Offset and Extent properties.

  • Seed

    • Used to control re-spawning the same values from the random streams.

  • Cluster

    • Allow instances to cluster as they are placed for more natural looking variance.

  • World Extent & Center

    • If Tiled is not specified, this will be required, to indicate the spawn area.

  • Allowed Component Fuzzy Names

    • If the line trace hits a component, which names is it allowed to spawn on ( match using contains )

  • Custom Procedural Instance Class

    • This will be the blueprint/class that the spawner will manage in the world, these are responsible for physics hits as well as managing and placing hierarchical static mesh instances in the world.

      • This blueprint/class must inherit from “CustomProceduralInstance" c++ class.

These spawner assets may be created by extending the “CustomProceduralSpawner" c++ class, or by using the above tool.

  • Inherits from CustomProceduralSpawner c++ class.

  • Is meant to be placed in the scene, and used as an editor tool to procedurally spawn foliage.

  • Meshes

    • A list of Static Mesh actors, that are going to be spawned in the world.

  • Custom Override Materials

    • Allow each instance material to be overridden, index of material, must match index of the static mesh.

      • Each material override may specify multiple materials per static mesh.

  • Terrain Layers

    • Spawn only on certain layers of the terrain

  • Collision

    • Each instance can support collision

  • Align To Surface

    • The hit normal will be used to align the instance to the surface.

 

 

 

 

Example Usage


This will showcase example usage on a terrain of 800,000 x 800,000 unreal units ( 8K ).

  • The landscape exists entirely in the persistent level, and is not broken up for world composition.

  • The rest of the world ( certain foliage, most static mesh actors ) however is broken up into 9x9 ( 81 ) level tiles, where each tile is 100K unreal units.

  • Static meshes and foliage will be sent to these tiles for performance.

    • Boulder, rocks and bushes will be tiled ( not live in the persistent level )

    • All trees will live in the Persistent level, and will NOT be tiled. ( trees need to be visible from near infinitely far away, as their highest LOD is basically a square billboard )

 

World Setup

The world consists of 81 levels for static mesh actors, and certain foliage, but the landscape lives in the persistent level in it's entirety.

 

 

 

 

 

Blockers

Be sure to place ProceduralFoliageBlockingVolumes in places where foliage should not spawn.

 

 

 

 

Boulders

First large boulders will get scattered across the entire terrain, and tiled into their respective levels. These have their culling distances set.

 

 

 

 

Scatter Rocks

Scatter rocks across the terrain next, including on top of boulders and/or any other large acrhitectural static meshes, such as terrace meshes.

 

 

 

 

Ground Cover: Bushes plants & flowers.

Ground cover is up next, these can also be scattered on top of boulders, and large terrace meshes.

 

 

 

 

Trees

Trees are then scattered into the world, these are not tiled, but scattered across the entire persistent level, as we want them visible from near infinitely far away, due to their performant high LOD billboard.

 

 

 

 

 

Play in Editor

This shows the tool in action, along with the tiles, as world composition only loads tiles as required.

 

 

 

 

Biomes

The tool supports biomes by optionally restricting foliage to be spawned on specific terrain layers, and/or components.