Terrain adaptation (AtomsUnreal)
Atoms can place your agent simulation on any terrain mesh using Atoms Height Fields and Gravity Fields.
Trace Channels
Unlike Atoms Crowd supported apps, we don't provide a height field manager in Unreal Engine, in fact, we use native Unreal Trace Channels.
Open Unreal project settings, then under Engine selection Collision. Create a new Trace Channel and give it a name.
In this example, we are going to use the "ground" name.
Then select your ground static mesh from the world outliner, unreal Collision set the Collision Presets to "Custom..." and set the collision channel for "ground" to "Block".
Once this is setup, you can finally set the height field on your Atoms modules. Currently, only the cacheReader, clipReader and stateMachine modules support height fields.
Also, in Atoms we introduced the concept of gravity. Gravity drives the agents up vector. Thanks to this idea you can also simulate your agents walking on 3D meshes and not just on 2D planes.
Gravity fields are actually height fields, so they can be handled and set exactly like height fields.
During the simulation, Atoms uses the normal of the gravity field to change the gravity metadata of the agent and rotate his up vector.
Gravity fields are not the only way to drive the agent up vector. Any custom behaviour module can change the gravity metadata of the agent to achieve the same effects.
Navigation Mesh
You are able to use a navigation mesh. Instead to create a trace channel and select it from the height field combo box, select “NavigationMesh“. This tells Atoms to use the existing navigation mesh as ground for your agents.
Tutorial
Copyright © 2017, Toolchefs LTD.