Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Atoms can place agents on different type of terrains using built-in height fields and gravity fields.


Basic terrain
  • Create an agent group.
  • Add a grid layout module and set the size attribute to (5, 1, 5 ).
  • Add a state machine module and set the state attribute to 1.
  • Create a bumpy ground.
  • Open the height field manager from he Atoms menu Atoms → Height field manager.
  • Select the terrain mesh.
  • Press the Add button,  in the dialog name field type a name (i.e. "ground").
  • Press the select button to automatically fill the mesh field with the ground path.
  • Press Ok, close the height field manager and rewind your scene.
  • Select the agent group.
  • In the state machine module options, set "ground" as height field.
  • Rewind your scene and press play. Atoms will place the agents on the mesh.


Note

Your height fields need to be reloaded whenever they are modified. Open the Height field manager, select your height field item and press the reload.




Deformed terrain
  • Create an agent group.
  • Add a grid layout module and set the size attribute to (5, 1, 5 ).
  • Add a state machine module and set the state attribute to 1.
  • Create a plane and increase the subdivision to 30 30 and scale to 1000,1,1000.
  • Add a mountain deformer, set the height to 500 and put some keyframes on the time parameter to animate the deformation.
  • Open the height field manager from he Atoms menu Atoms → Heigh field manager.
  • Select the terrain mesh.
  • Press the Add button,  in the name field of the dialog set a name (i.e. "ground").
  • Press the select button to automatically fill the mesh field with the ground path.
  • Check the animated checkbox.
  • Press Ok, close the height field manager and rewind your scene.
  • Select the agent group.
  • In the state machine module options, set "ground" as height field.
  • Rewind your scene and press play. Atoms will place the agents on the deformed mesh.


Note

Atoms rebuilds the animated height field internal structure at every frame. For dense meshes this could lead to performance slow downs. If your ground is a static mesh moving in space, please have a look at the following section.




Animated undeformed terrain

If your ground transform is animated (but the mesh itself is static), you can use the parent constraint module to speed up the ground computation without using an animated height field.

  • Create an agent group.
  • Add a grid layout module and set the size attribute to (5, 1, 5 ).
  • Add a state machine module and set the state attribute to 1.
  • Create a plane and increase the subdivision to 30 30 and scale to 1000,1,1000.
  • Set the plane as a child of a null and animate the transform of the null adding some keyframes.
  • Open the height field manager form he Atoms menu Atoms → Height field manager.
  • Select the terrain mesh.
  • Press the Add button,  in the name field of the dialog set a name (i.e. "ground").
  • Press the select button to automatically fill the mesh field with the ground path.
  • Check the animated checkbox.
  • Press Ok, close the height field manager and rewind your scene.
  • Select the agent group.
  • In the state machine module options, set "ground" as height field.
  • Add a parent constraint behaviour module and rewind the scene.
  • Connect the plane worldMatrix to the parentConstraint parentMatrix.
  • Rewind the scene and press play.





Gravity fields and 3d terrains

Gravity fields are standard height fields but they are used to modify the agent gravity and up vector metadata. You can create a number of effects using gravity fields. Here are two examples:

  • Create an agent group.
  • Add a grid layout module and set the size attribute to (5, 1, 5).
  • Add a state machine module and set the state attribute to 1.
  • Create a sphere, scale it to (3000,3000,3000) and move to (0, -1000, 0).
  • Create an height field using this sphere and set its name to "gravityMesh".
  • Duplicate the sphere and model some bumps on the new sphere.
  • Create a new height field using this sphere and set the name to "groundMesh".
  • Select the agent group.
  • In the state machine module options, set "groundMesh" as height field and "gravityMesh" as gravity field.
  • Now create a curve around the sphere and add a follow curve module using that curve, if you don't use the curve you will see the agents get stuck on the right point of the sphere because by default every agents as 1,0,0 as direction metadata
  • Rewind your scene and press play.


Image RemovedImage Added


  • Create an agent group.
  • Add a grid layout module and set the size attribute to (5, 1, 5).
  • Add a state machine module and set the state attribute to 1.
  • Create a simple plane and scale it to (1000,1,1000).
  • Create an height field using this plane and set the name to "groundMesh".
  • Duplicate the plane and rotate it to (30, 0, 0).
  • Create a new height field using this plane and set the name to "gravityMesh".
  • Select the agent group.
  • In the state machine module options, set "groundMesh" as height field and "gravityMesh" as gravity field.
  • Rewind your scene and press play.




Widget Connector
width960
urlhttps://www.youtube.com/watch?v=NvhctXWyPZc
height540