比較バージョン

キー

  • この行は追加されました。
  • この行は削除されました。
  • 書式設定が変更されました。

Atoms can place agents on different terrains using height field and gravity field.


Basic terrain
  • Create and 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 ground with some hills
  • Open the height field manager formt 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 "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 height field
  • Rewind your scene and press play. Atoms will place the agents on the mesh


注意

Since computing the height field si expensive atoms will not update it if If you modify the ground mesh. If you modify the mesh open you need to update the heght field. Open the Hegiht field manager, select the height field form the list then press the right mouse button and choose reload to update the height field




Deformed terrain
  • Create and 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 the offset to animate the deformation
  • Open the height field manager formt 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 "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 height field
  • Rewind your scene and press play. Atoms will place the agents on the deformed mesh
注意

When the animated option is on atoms rebuild the height field at every frame and for dense mesh this could be expensive. If you ground has only the transform animated please have a look the the next section


Transformed terrain

If your ground has the transform animated without any deformer you can use the parent constriant module to speed up the ground computation without using an animated height field.


  • Create and 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 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 "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 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 Added



Gravity fields and 3d terrain