Viewing the Actor's Envelope

 
 
 

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.

The Mesh Proxy Object

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.

The Actor Copies Object

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:

NoteYou can toggle the visibility of the Actor Copies mesh of the current crowd with the CrowdFX Crowd Edit Show/Hide PolyMesh Copies command on the ICE toolbar.

Displaying the Crowd in OpenGL with a Realtime Shader

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.

NoteShape keys are not displayed on the mesh proxy in the OpenGL display mode.

To view the instanced actors' envelopes in an OpenGL display mode with this shader:

  1. In a viewport or Object view, switch to the Realtime Shaders OpenGL display mode.

  2. Select the simulation point cloud and open its Shape Instance Skinning ICE tree in the Post-Simulation region.

  3. 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.

  4. Select the display options in the GLSL Actor Envelope shader.

Note that this shader is used for previewing only: this isn't the geometry, material, and textures that are rendered.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License