After you assign a source model as an actor, its envelope mesh is identified as the geometry that will be instanced on each particle as an actor in a crowd simulation.
So how does this happen? There are a couple of objects involved, as described below.
CrowdFX makes a copy of the original model's polygon mesh and calls it the Mesh Proxy polygon mesh. This object is hidden by default, but you can see it when you're viewing the crowd simulation in the OpenGL display mode (see below).
The Mesh Proxy object is a copy of the original mesh's base pose (such as the T-pose), envelope weights, shape keys, materials, and textures in the Set Mesh Proxy compound in its Set Mesh Proxy ICE tree in the Modeling region.
In the Shape Instance Skinning compound, the envelope skinning data that is used to display the mesh proxy in an OpenGL display mode is set. This display mode uses the GLSL_Actor_Envelope shader that is in the mesh proxy's Material, when that shader is enabled.
CrowdFX also creates the Actor Copies polygon mesh, which is a single object that contains the envelope geometry of all instances of an actor proxy in the crowd simulation. The Actor Copies mesh is the usual object that you see representing the actors' envelopes in the 3D views unless you override its display to use the Mesh Proxy mesh as the particle shape for the simulated point cloud, as described below.
The Actor Copies mesh contains these two ICE trees:
The Duplicate Actor Geometry ICE tree in the Modeling region gets topology data from the Mesh Proxy object and duplicates it for creating the actor's mesh per-particle instance in the crowd simulation. Each actor instance's material and texture projection is also set here. The number of particles data is gotten from the Skeletons Cloud.
The Crowd Skinning ICE tree in the Post-Simulation region calculates the envelope deformation for each actor instance based on the global transform and point position data from the Skeletons Cloud. Basically, it checks how the actors are being animated in the simulation and where they are in the scene, then deforms the envelope accordingly.
If you need to preview a crowd simulation without waiting for the generation of the Actor Copies mesh on the first frame, you can view the actors in an OpenGL display mode.
To do this, you enable the GLSL Actor Envelope realtime shader compound that is defined in the Mesh Proxy object's material. This shader uses the Mesh Proxy mesh instead of the Actor Copies mesh as the envelope for each actor instance when previewing in the OpenGL display mode. Using data from the Mesh Proxy object, this shader determines the envelope's deformations, material, and textures used for each actor instance during simulation.
To view the instanced actors' envelopes in an OpenGL display mode with this shader:
In a viewport or Object view, switch to the Realtime Shaders OpenGL display mode.
Select the simulation point cloud and open its Shape Instance Skinning ICE tree in the Post-Simulation region.
Select the Enable option in the Set Shape Instance Bones compound. This temporarily overrides the viewport visibility of the Actor Copies mesh so that you see only the Mesh Proxy object in this view as shaded by the GLSL Actor Envelope shader.
In non-OpenGL displays, the mesh proxy is instanced, but you don't see the proper deformation, material, or texture is applied because the GLSL Actor Envelope shader is not supported.
Note that this shader is used for previewing only: this isn't the geometry, material, and textures that are rendered.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License