Unreal Procedural Environments Quickstart
Last updated
Was this helpful?
Last updated
Was this helpful?
The Procedural Environments plugin adds a panel for easy terrain creation, allowing the population of buildings, props, NPCs, and liquids using a layer system. For each layer, you can define what, where, and how you want to spawn objects, allowing you to create environments with ease.
Requirements:
Unreal Engine 5.3 or 5.4 or 5.5
Unreal C++ Project Visual Studios 2019 - 2022
Anything World Account (optional)
Anything World Main plugin (optional)
AW Bridge plugin (optional)
Within the Fab environment, search for "Anything World Environment Generator" and click Add to My Library to download it.
Open your Unreal project in the Unreal Editor. From the main menu bar, navigate to Edit β Plugins to open the list of available plugins. Under the Other section, find the Procedural Environments plugin and check the box to enable it.
After enabling the plugin, you will see a new Procedural Environments section in the main menu bar of the Unreal Editor. Click it to open the tool panel.
The Anything World Main Plugin is only compatible with Unreal Engine 5.3 and 5.4. If you plan to use this plugin for importing Anything World models using Procedural Environments, ensure you are using Unreal Engine 5.3 or 5.4. Note: You can use your own models without the main plugin.
Within the Fab environment, search for "Anything World 3D Creation" and click Add to My Library to download it. You can also find the plugin here.
In the Fab environment, search for "Anything World Bridge" and click Add to My Library to download it.
The AW Bridge Plugin has strong dependencies on our two other Anything World plugins. Ensure that all required plugins are installed before activating the AW Bridge Plugin.
Open your Unreal project in the Unreal Editor. From the main menu bar, navigate to Edit β Plugins to open the list of plugins. Under the Other section, find the AW Bridge Plugin and Anything World Main Plugin, and check the boxes to enable them.
Log in to your Anything World account. This grants the plugin access to your Anything World API key, which is required to interact with the server.
Once all plugins are set up and you are logged into the main plugin, you can download AW models directly through the Procedural Environments plugin.
The Procedural Environments plugin implements a layer system that allows users to control which parts of the environment they want to generate. Each layer corresponds to different types of content such as terrain, buildings, props, NPCs, and liquids.
This plugin uses PCG module included in Unreal 5.2 and further. All the graphs spawned by the tool are based on PCG graphs. You can see the documentation of the module here.
General Data Layer: Contains general parameters that affect all PCG graphs spawned by the tool.
Terrain Layer: Contains options to spawn, load, or find terrain based on tags.
Building Layer: Defines the options for generating buildings, towns, or similar structures.
Props Layer: Contains options for spawning different prop PCG graphs in the scene.
NPCs Layer: Contains options for spawning NPCs in the scene.
Liquid Layer: Allows the spawning of a plane with a specific material and height.
The Building, Props, and NPC layers will spawn custom PCG graphs, which can also be found inside the plugin if you prefer to use them without the tool.
This layer includes three parameters that affect all PCG graphs spawned by the tool. These parameters help add variability and can impact performance:
Max Retry Iterations: The maximum number of recursive iterations the tool will make to find valid positions and perimeters. If the tool exceeds this number, an error will be thrown.
Spawning Precision: Defines the number of subdivisions in a PCG graph to make it more organic. Be cautious, as this can significantly impact performance.
Graph Variation Distance: Defines the variability in the distance between each perimeter point of the PCG graph and its centre. By increasing this value, you can define a range rather than a fixed radius.
This layer controls all options related to terrain generation. There is a dropdown selector to choose how the tool will detect or create the terrain.
Use Tagged Ground: If selected, the tool will find static mesh objects in the scene with the tag βGroundβ and use them to define the ground. This option is suitable if you want to create your own terrain models.
Load Landscape: If selected, the tool will search for an existing landscape in the scene and use it as the ground. This is recommended if you already have a terrain created.
Generate Landscape: This option generates a landscape with a few basic parameters.
Landscape Size: Defines the size of the landscape in meters. The X parameter defines width, Y defines depth, and Z defines height.
Texture Size: Defines the size of the input texture used to generate the landscape (only applicable for generative options).
Heightmap Texture: A dropdown to choose between:
Input Texture: Allows the user to add their own heightmaps for generating the landscape.
Custom Generation: Allows the user to use noise algorithms to generate the heightmap.
Landscape Material: Choose between:
Custom Material: Allows the user to add custom materials.
AW Material: Defines up to 3 levels with different textures for the terrain.
Seed: Affects the result of the generation. The same seed with identical parameters will yield the same result.
Noise Scale: Changes the size of the pattern generated by the algorithm.
Noise Algorithms
Fractal noise: This algorithm includes additional parameters:
Octaves: Number of fractal permutations.
Frequency: Defines the βwidthβ of the pattern applied to every octave.
Amplitude: Defines the βheightβ of the pattern for each octave.
Lacunarity: Multiplies the frequency between successive octaves.
Persistence: Defines the loss of amplitude between successive octaves.
Material layers will be set inside a master material that we have created and the tool will create a new instance of the material with all the user parameters.
Each layer is composed of a Heightmap Range and three textures:
Heightmap Range: The X value represents the minimum height of the layer, and the Y value represents the maximum height. The range covers the full height of the landscape, distributing the textures accordingly.
Albedo: Texture for the main color/texture of the layer.
Normals: Texture for the normals of the layer.
Roughness: Texture for the roughness of the layer.
The Buildings Layer offers options to generate multiple building groups and spawn them in your scene. Each building group consists of a PCG graph of multiple buildings with customizable parameters.
Users have the ability to spawn multiple building groups simultaneously, each with different configurations and models.
Add a New Building Group: To create a new building group, click the Add Building Group button located in the top-left corner.
Remove a Building Group: To remove a building group, click the Remove (X) button in the top-left corner of the respective building group.
Hide a Building Group: To hide a building group from view, click the arrow icon located in the top-right corner of the building group.
Radius Size: Defines the maximum radius of the building graph.
Building Spacing: Defines the space between building instances. Smaller values lead to more instances.
Area Percentage: Defines the area percentage of the PCG graph that must meet the max ground angle criteria.
Max Ground Angle: Defines the maximum allowable angle between the center of the PCG graph and the perimeter point.
Building Size (Min/Max): Defines the minimum and maximum size of the buildings spawned.
If you set the same value into the Building Size min and Building Size max you will spawn the same size of buildings without any variability.
Angle Deviation: Defines the maximum rotation angle applied to each building.
Translation Variation: Defines random X/Y position variation for each instance.
Wall Thickness: Defines the thickness of walls in centimeters.
Number of Doors: Defines the maximum number of doors per building.
Generate Roads: Generates roads between buildings (only works if translation variation or angle deviation is not applied).
This option only works if you don't apply any translation variation or Angle deviation to the building group.
Building Group Tag: Optionally defines a tag for all instances spawned by the building graph.
Enable Binding: Activates or deactivates binding the spawning process to certain constraints.
Seed: Makes the spawning process deterministic.
Doors
Floors
Walls
Roofs
Props
The Generate Roads feature provides several options to define the roads in the environment. Essential options include road mesh actor reference, chunk size, and smoothness, with additional optional variables. The road will be a spline actor that spawns multiple instances along the spline path.
Road Mesh: Defines which modular road mesh will be used to spawn roads.
Road Material: Specifies the material to be applied to every instanced road mesh.
Junction Material: This material is used for road mesh instances where intersections occur.
Chunk Size: Defines the size of building blocks. By default, this value is set to 1, but you can increase it to scale the road chunks.
Smoothness: Controls the number of spline points to make the road appear smoother.
To use the binding options, you must activate the Enable Binding checkbox. This will reveal additional options for binding objects and determining the effect of the binding.
Bind by Tag: You can define a tag, and all objects in the scene with that tag will define a zone where the PCG graph can or cannot be spawned.
Bind by Actor Reference: You can add an actor reference to define a specific zone for the binding. The plugin includes an actor designed for defining zones.
Binding Rule: Defines the binding behavior.
Inclusive: The binding area defines the spawning zone for the PCG graph. Areas outside this zone will not be valid.
Exclusive: The binding area defines a zone where the PCG graph cannot be spawned. You can create exclusive zones to prevent certain objects from appearing.
Fill Area: Instead of a fixed radius for the PCG graph, the binding area will define the full area where the graph can be created.
Each building set in a building block contains an actor reference and a few additional related options. To remove a set, click the X button in the bottom-right corner. To hide all sets, click the down arrow in the top-right corner.
Asset Type Selector: Choose whether to use custom assets or download assets from the Anything World database. (To use Anything World assets, AW Bridge and the Anything World main plugin are required.)
Custom Asset: Add your own actor assets to be spawned.
AW Asset: Specify the name of a particular asset from the AW database, and it will automatically be serialized and spawned in the PCG graph.
Probability Weight: Defines the likelihood of this set being spawned compared to others. A higher value means the asset will be spawned more often.
Scale: Defines the range of scale for the actor. If you set the same value for both the minimum and maximum, all instances will be the same size.
Tag: Assign a specific tag to every spawned instance of this actor.
There are five building block sets. A building group is only valid if each building block set has at least one building set inside it (Props block is an exception; no prop is needed to spawn a building group).
Doors: Contains door instances to be spawned inside every building graph.
Walls: Contains wall instances for the buildings.
Floors: Contains floor instances to be included in each building.
Roofs: Contains roof instances for the buildings.
Props: Contains prop instances for the buildings. Those props will be spawned on top of the building.
The props layer provides options for spawning multiple prop groups in your scene. Each prop group defines a PCG graph of multiple props, and each prop is spawned with the parameters you define.
Users have the ability to spawn multiple prop groups simultaneously, each with different configurations and models.
Add a New Prop Group: To create a new prop group, click the Add Prop Group button located in the top-left corner.
Remove a Prop Group: To remove a prop group, click the Remove (X) button in the top-left corner of the respective prop group.
Hide a Prop Group: To hide a prop group from view, click the arrow icon located in the top-right corner of the prop group.
Radius Size: Defines the maximum radius of the PCG graph.
Prop Spacing: Defines the space between instances. The smaller the value, the more instances will be spawned.
Angle Deviation: Defines the maximum angle rotation applied to every prop instance.
Translation Variation: Defines random X/Y position variation for the spawned instances.
Group Tag: This is optional and can be used to tag all spawned instances of the PCG graph.
Enable Binding: Activates or deactivates binding for this prop group.
Seed: A seed value that ensures deterministic spawning behavior.
Prop Set Section: Allows you to define which actor and conditions will be used to spawn each prop.
As with the other layers, you must activate Enable Binding to reveal binding options for props.
Bind by Tag: Define a tag, and all objects in the scene with this tag will define a zone where the PCG graph can or cannot be spawned.
Bind by Actor Reference: You can reference an actor within the scene to define a specific binding zone.
Binding Rule: Determines how the binding area is treated.
Inclusive: Only the bind area will be valid for spawning the props, excluding the rest of the scene.
Exclusive: The bind area prevents spawning within its region, effectively creating zones where no props will appear.
Fill Area: Instead of a fixed PCg graph radius, the binding area will define the spawning region.
Each prop set contains a reference to an actor with related options:
Asset Type Selector: Decide whether to use custom assets or download from the Anything World database.
Custom Asset: Add your own actor assets to be spawned.
AW Asset: You can provide the name of a specific asset from the Anything World database, and it will be serialized and spawned in the PCG graph.
Probability Weight: Determines the likelihood of this set being spawned. Higher values mean more frequent spawning.
Location Offset: Applies a location offset to the actor's pivot point.
Rotation Offset: Applies a rotation offset to the actor's pivot point.
Scale: Defines the scale range for the actor. If the same value is set for both min and max, all instances will be the same scale.
Tag: Allows you to add a specific tag to every spawned instance of the actor.
The NPCs layer lets you add and spawn multiple NPC groups with customized parameters in your scene. Each NPC group consists of a PCG graph of multiple NPCs.
Users have the ability to spawn multiple NPC groups simultaneously, each with different configurations and models.
Add a New NPC Group: To create a new NPC group, click the Add NPC Group button located in the top-left corner.
Remove a NPC Group: To remove a NPC group, click the Remove (X) button in the top-left corner of the respective NPC group.
Hide a NPC Group: To hide a NPC group from view, click the arrow icon located in the top-right corner of the prop group.
Radius Size: Defines the maximum radius of the NPC group.
NPC Spacing: Determines the space between spawned NPC instances. Smaller values lead to more densely packed NPCs.
Angle Deviation: Defines the maximum rotation angle applied to each NPC instance.
Translation Variation: Specifies the random X/Y position variation for the spawned NPCs.
Group Tag: Optionally tags all NPC instances spawned in the group.
Enable Binding: Activates or deactivates the binding options for NPC spawning.
Seed: A seed value that ensures deterministic NPC spawning.
NPC Set Section: Allows you to define which character and conditions will be used to spawn each NPC.
Similar to other layers, binding options can be enabled by selecting Enable Binding. This section provides options for binding NPC groups to specific zones.
Bind by Tag: Define a tag to specify a zone where NPCs can or cannot be spawned.
Bind by Actor Reference: Add an actor reference to define a binding zone for the NPCs.
Binding Rule: Determines the effect of the binding area.
Inclusive: NPCs can only spawn within the bind area.
Exclusive: NPCs cannot spawn within the bind area.
Fill Area: The NPC group will be generated inside the binding area, replacing the fixed radius with the bind area.
Each NPC set contains a reference to a character and its related options.
Every NPC set expects a Character reference to spawn a valid NPC. To use a custom asset you need to provide a valid Character. You can take a look at this tutorial for more information on how to prepare a Character inside Unreal engine https://dev.epicgames.com/documentation/en-us/unreal-engine/setting-up-a-character-in-unreal-engine
Asset Type Selector: Choose whether to use custom assets or download from the Anything World database.
Custom Asset: Use your own character assets.
AW Asset: Specify a character asset from the Anything World database for spawning.
Probability Weight: Defines the likelihood of this NPC set being spawned.
Location Offset: Applies an offset to the pivot point of the character.
Rotation Offset: Applies a rotation offset to the character's pivot point.
Scale: Defines the scale range for the character. If the same value is set for both min and max, the scale will be consistent across instances.
Tag: Assign a specific tag to every spawned NPC instance.
The Liquid Layer defines a plane with a specific material and height where the liquid will be spawned.
Liquid Material: Allows you to assign a material for the liquid plane.
Liquid Height: Specifies the height at which the liquid plane will be spawned.
The tool provides several generative options for the environment:
Generate Environment: This button will generate a completely new environment based on the current settings in the layers. It will disregard previous generations, and all references in the environment manager will be overridden.
Regenerate Environment: Removes all objects referenced in the environment manager and regenerates the environment based on the updated parameters in the layers.
Load Environment: Finds all the AW environment actors in the scene and saves all references in the environment manager, allowing you to modify the environment in the layers.
Clear Map: Removes all AW environment actors found in the scene.
The Unreal PCG module used by this plugin was in a really early stage in Unreal Engine 5.3. It is recommended to wait a small time before regenerating the environment multiples times in a row. Every time you click to regenerate the environment, all the graphs will be regenerated, and this process could hit an error present in the PCG module in this engine version.
All objects spawned by the tool are referred to as AW environment actors. These may include PCG graphs, actor instances, character instances, and landscapes.