比較バージョン

キー

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

In the previous section you already created some agents. In Atoms there are a coplue of layout modules you can use to layout your agents in the scene.



Grid layout (maya only)

The grid layout creates, a grid of agents.

Create an agent group, please make sure the attribute editor is visible and the agent group node is selected.

Click on the "Add" button and add a gridLayout module. Type the agent type name you entered previously in the "agentType" field (i.e. testRobot). 
Set the "size" field to (3,0,3). Click again on the "Add" button and add a stateMachine module. 

Click on Maya time slider rewind button and your 9 agents will appear in the viewport.
Hit the play button to run the simulation.

Image RemovedImage Added


Points layout

With the points layout you can choose the exact location where the agents must be created.



Maya

Create an agent group, please make sure the attribute editor is visible and the agent group node is selected.

Click on the "Add" button and add a pointsLayout module.

Select the agent group and open the "Agent Layout Tool" from the pointsLayout module options or from the menu Atoms->Tool->Agents Layout Tool. It shows the layout tool widget. Then press R or press the  icon, move the mouse over the viewport. A green circlo with an arrow indicates where you are going to create an agent and in what direction. Press the LMB to create an agent. To change direction press CTRL+LMB and move the cursor on the left or on the right. You can creates multiple agents at once. Press the icon or RMB → Layout → Grid.

After you created some agents we can edit ther position direction and changes agentType. Press the Q button or use the icon, select some agents. The press the W button or the icon and use the move manipulator to move the agents in the scene. To rotate the use the E button or the icon.

From the tool UI or from the context menu (RMB button) you can access to more action for each different mode. For example go back to the selection mode and form the ui or from the context menu press delete agents to delete them or use the "change agent type".


Image RemovedImage Added

Houdini

In houdini when you create an agent group it automatically creates the points layout module and a grid object as input of the "agent group modules" node.

Go inside agentGroup1_geo node and select the grid1 object. Set the row and columns to 4 and 4. Then select the pointsLayout_direction and set the value to (1,0,1). At every point of mesh atoms creates an agent. Setting the atoms_pointsLayout_directions and atoms_pointsLayout_agentTypes changes the direction and agentType of each agents. Try to create a scatter node after the grid1 object to randomly creates agents on the grid mesh.

Image RemovedImage Added



Mesh scatter layout (maya only)

The mesh scatter layout creates randomly agents on a input mesh.

Create a plane, and scale it to 2000,1,2000

Create an agent group, please make sure the attribute editor is visible and the agent group node is selected.

Click on the "Add" button and add a gridLayout module. Type the agent type name you entered previously in the "agentType" field (i.e. testRobot). 
Set the "radius" field to 150. Set the mesh to "pPlane1". Click again on the "Add" button and add a stateMachine module. 

Click on Maya time slider rewind button and your agents will appear in the viewport.
Hit the play button to run the simulation.

Image Added


Offset behaviour module

The offset behaviour module can be used to modify an existing behaviour, so can be used with the grid layout module or any other layout module. Image RemovedIt also supported by the "Agent Layout Tool".

  • Create an agent group
  • Attach a grid layout module and set the size attribute to (5,0,5)
  • Add an offset behaviour module
  • Select the agent group and activare the "Agent Layout Tool" from the Atoms menu Atoms → Tools → Agents Layout Tool
  • Press the Q button or use the Image Added icon, select some agents
  • Press the W button or the Image Added icon and use the move manipulator to move the agents in the scene. To rotate the use the E button or the Image Added icon.
  • Add an agent filter behaviour module
  • Open again the "Agent Layout Tool"
  • Select some agent
  • From the Agent layout tool ui or from the context menu (click the right mouse button) press the Delete agents button
  • Rewind your scene and press play