Miarmy Crowd Simulation Documentation (English)

Hook up Custom Attributes

Except rotate and translate animation channels, sometimes we want to hook some extra animation to the bones of agent and let them playback/animate with the action. For example, there is a blend shape animation happening on a joint/action, we want to hook it to the agent and join the simulation, then after simulation, fetch the result back for later user. (Such as creating deformer or facial animation)

Enable this Pipeline

By default this feature will be totally disabled, if you want to use it, please firstly enable a hidden attribute in McdGlobal node of your scene.
Click Miarmy > Miarmy Ready! It will select the McdGlobal Node, and then please manually turn that attribute on in Maya Attribute Editor.



Manually turn on the "hookCustomData" attribute on in McdGlobal Node


IMPORTANT: Before both 1 creating action and 2 creating original agent, please always enable this attribute.

Creating Action

Some joints in the animation rig may contain some custom attributes, for example, like the below image, there are many user defined attributes and animation on "joint1"



Maya custom attribute channels


Please make sure all the Action Nodes will be created from the SAME Rig with exact the SAME custom data scheme.
Of course also make sure enable "hook custom data" attribute in McdGlobal Node.
At this time, when we creating the action, these attributes and values, including animations, will be automatically stored inside action node.

Creating Original Agent

Before creating the Original Agent, you need enable "hook custom data" attribute in McdGlobal Node. And after creating the Original Agent, these custom attributes will be hooked up on Original Agent.
But If you already have original agent and don't want to re-create original agents, you need firstly active the editing agent type in Agent Manager, then click Miarmy > Original Agent > Upgrade for upgrading/adding these custom attributes.
You may notice that if everything all right, the "number of custom data" will be recorded in original agent bone. And we will use this attribute to allocate memory when building agent. You can double check if these attribute existed and have correct number



(Above) without custom data, (below) contain 3 custom data


The number of custom data will be stored. And when "original agent" building "agent", the data will be used to allocate exact memory in agent, for example, 3, it can allocate 3 float data in agent memory.
Notice: these data will only be linear interpolated between animations, no quaternion or other interpolated methods.

Simulation

When simulating, these custom data in action node will be assigned to agent bone just like the "translate" and "rotate" of the bone. Also transiting and blending normally.
When creating agent cache, these data will be also written into the Agent Cache, Character Cache etc…
After simulation, you can fetch these data to drive the deformer, or anything you like. For fetch these data, please refer the "Single Character Cache Part" of this document (Press Ctrl + F to search).

 

 

 

Basefount Technology