Miarmy Crowd Simulation Documentation (English)

Master Perception (Input)

081 Master Channels (Go to Video Tutorials)

 

Introduction

We can establish master and slave relationship between different agents and make them interactive each other.

For example, we can make a group of A agents be the Masters of other group of B Agents, and then, each B agent can feel the master of it and interactive of its master separately.

 

Example 1

Like the following picture shown, the A agents are masters of B agents, and the B agents are Slave.

Using master sentences, B can feel A separately.

Master - Slave relationship

 

Example 2:

like the following picture shown, master-slave relationship can be linked freely, and a group of agents be are master/slave each other.

Using master sentence, each agent can feel its own master agent

Multiple Master - Slave relationship

 

Setup Workflow

For establishing this kind of relationship, we need to use script (Python or MEL) and connect the "masterOf" attribute of agents.

Please take a look at follow picture:

If we want to make agent A be the master of agent B, we need connect attribute "masterOf" from Agent A to Agent B's "masterOf" attribute:

Agent A will be master of Agent B

And if we take a look from hypershade, it will be looks like this

McdAgent6 will be master of McdAgent7

And if there is relationship between 2 agents, there will be a pink link line when we select the master agent

display pink link line when we select agent master

 

Note: We usually establish this relationship by "Post Place" callback (read more on Callback Script Functions)

post place callback script

 

 

In our sample folder, we made some maya scene file for your referencing

T3_S07_01_MasterChannel_Single_v2.ma (use script "establishMasterSlave2()" from McdPipelineCommands.py

 

T3_S07_02_MasterChannel_Multi_v2.ma (use script "establishMasterSlave3()" from McdPipelineCommands.py

 

 

Sentence Usage

If there is relationship established successfully. we can use some sentences to make them interactive.

With master sentences, each slave agent can feel master and do something we want them to do.

 

Master Sentences

Master:

  • my master is on LEFT/RIGHT
  • my master is UP/DOWN
  • my master to me distance

Similar like sphere range and Left is 0~180, right -180~0

the sphere degree, range -180 to 180

 

 

 

 

Basefount Technology