Edit Cached Agents with Drive Shell

General Introduction

Drive Shell feature allows us to edit the agents after caching them. Usually we use it to fix some agents translate or rotate, and hide some incorrect agents.

Suppose we've already got the good simulation and made the agent cache especially we had did the dynamic simulation. But for some reasons we have to make a small fix on some very specific agents. While we don't want to re-make the simulation cache again because it's time-consuming and take some risk. At this time the Drive Shell feature helps.


Instructions

Make agent cache for the scene and enable the cache.

We can only use this feature after Caching Agents


Select the agent(s) you want to edit and click "ctrl + g", then you can notice that we created a group (transform) (or we can call it a shell) node for these agents.

Then you can edit this group, like translate, rotate or hide as your wish. Since the agents are in child space of the group, they will move along with it.

select some agents

Maya group control the agents transform



Click Miarmy Cache Tools > "Record Drive Shell" button, we can make our maya scene remember the relationship between your agents and the group node. The relationship will be stored at McdGlobal node, and you can check it by some simplest script code.

Notice

If you don't apply this step, all of your edits will be removed if you de-place your agents or close your maya file.



record the relationship between agents and group


script tip for checking the info

Edit the agents by Group

After re-place, agents will be automatically put into recorded group


For removing the records, we can simple click "Clear Drive Shell" button in Miarmy Cache Tool


Rotate in Place

There is a trick that we can rotate the agent in place with this tool,

Once we group 1 agent, the group pivot is at origin. Then if we want to rotate it in place, it cannot be done by default.

At this time, you can select the group node and click "insert" and move the group pivot from origin to the agent.

group pivot point at origin

Move group pivot point from origin to agent place


Then we can rotate the agent in place and record the edits.

Rotate agent in place


Make the Drive Shell Attach Terrain

We can enable the drive shell attach terrain attribute and make the agent inside the drive shell adapt the terrain automatically after editting its position.


After marking the drive shell, we need to de-place all agents and place agents again to transfer the attribute to the agents.