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 field fields and gravity fieldfields.


Basic terrain
  • Create and an agent group.
  • Add a grid layout module and set the size attribute to (5, 0, 5 ).
  • Add a state machine module and set the state attribute to 1.
  • Create a simple bumpy ground with some hills.
  • Open the height field manager formt from he Atoms menu Atoms → Heigh Height field manager.
  • Select the terrain mesh.
  • Press the Add button,  in the dialog name field of the dialog set type a name , for example put (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 has " as height field.
  • Rewind your scene and press play. Atoms will place the agents on the mesh.


Note

If you modify the ground you need to update the heght fieldYour height fields need to be reloaded whenever they are modified. Open the Hegiht Height field manager, select the height field form the list then press the right mouse button right click on your height field item and choose reload to update the height field.




Deformed terrain
  • Create and an agent group.
  • Add a grid layout module and set the size attribute to (5, 0, 5 ).
  • Add a state machine module and set the state attribute to 1.
  • Create a plane and increase the subdivision to 50 50 and scale to 3000,3000,3000.
  • Add a wave deformer, set the amplitude to 0.1 and put some keyframe to keyframes on the offset attribute to animate the deformation.
  • Open the height field manager formt 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 , for example put (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 has " as height field.
  • Rewind your scene and press play. Atoms will place the agents on the deformed mesh.


Note

When Atoms rebuilds the animated option is on atoms rebuild the height field internal structure at every frame and for . For dense mesh meshes this could be expensivelead to performance slow downs. If you ground has only the transform animated your ground is a static mesh moving in space, please have a look at the the next following section.


Image RemovedImage Added



Transformed
Animated undeformed terrain

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

  • Create and an agent group.
  • Add a grid layout module and set the size attribute to (5, 0, 5 ).
  • Add a state machine module and set the state attribute to 1.
  • Create a plane and increase the subdivision to 50 50 and scale to 3000,3000,3000.
  • Put the plane inside a group and animate the transform of the group adding some keyframes.
  • Open the height field manager formt form he Atoms menu Atoms → Heigh Height field manager.
  • Select the terrain mesh.
  • Press the Add button,  in the name field of the dialog set a name , for example put (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 has " as height field.
  • Add a parent constraint behaviour module and rewind the scene.
  • Connect group1.worldMatrix to tcAgentGroupNodeShape1.atoms_parentConstraint_parentMatrix.
  • Rewind the scene and press play.



Image RemovedImage Added



Gravity fields and 3d
terrain
terrains

The gravity Gravity fields are standard height fields but they are used to modify the gravity and agents up vector metadata. With the gravity field you You can create different effects. here a number of effects using gravity fields. Here are two examples:

  • Create and an agent group.
  • Add a grid layout module and set the size attribute to (5, 0, 5).
  • Add a state machine module and set the state attribute to 1.
  • Create a simple sphere and , scale it to (1000,1000,1000) and move to (0, -1000, 0).
  • Create an height field using this sphere and set the its name to groundMesh"gravityMesh".
  • Duplicate the sphere and defor this sphere a little bit to create some hillsmodel some bumps on the new sphere.
  • Create a new height field using this sphere and set the name to gravityMesh"groundMesh".
  • Select the agent group.
  • In the state machine module options, set "groundMesh has " as height field and gravityMesh has heightField"gravityMesh" as gravity field.
  • Rewind your scene and press play.


Image RemovedImage Added


  • Create and an agent group.
  • Add a grid layout module and set the size attribute to (5, 0, 5).
  • Add a state machine module and set the state attribute to 1.
  • Create a simple plane and scale it to (1000,1000,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 has " as height field and gravityMesh has heightField"gravityMesh" as gravity field.
  • Rewind your scene and press play.


Image RemovedImage Added