GolaemΒΆ

Guerilla Render can render the Golaem procedural crowd.

An example of a simple crowd rendered using Golaem Crowd.

Installation

Linux

Guerilla uses the glmCrowdGuerillaPlugin.so DSO. The Golaem bin and procedurals directories should be added to the LD_LIBRARY_PATH variable before running "guerilla" or "render".

Windows

Guerilla uses the glmCrowdGuerillaPlugin.dll DLL. The Golaem bin and procedurals directories should be added to the PATH variable before running "guerilla" or "render".

Load a Golaem crowd into Guerilla

In the Create menu, click the Create Golaem item. This create a NewGolaem node in the scene.

When you have a Golaem simulation cache ready, locate the .gscs file corresponding to this cache. You will find a collection of .gscf files, one per simulated frame. For instance:

/my/simulation/cache/testGuerilla.crowdField1.gscs
/my/simulation/cache/testGuerilla.crowdField1.1.gscf
/my/simulation/cache/testGuerilla.crowdField1.2.gscf
/my/simulation/cache/testGuerilla.crowdField1.3.gscf
...

Setup the Goalem attributes:

  • Crowd Fields: a list of semicolon separated field names (crowdField1 in the previous example)
  • Cache Name: the cache name (testGuerilla in the previous example)
  • Cache Directory: the directory where resides the cache (/my/simulation/cache/ in the previous example)
  • Characters: the .gcha character file to bind to this simulation cache.

Setup Golaem shaders

Create a Guerilla shader for each shader you assigned to the Golaem crowd in Maya:

  • Add the Surface shader to your scene (using Ctrl+Space)
  • Rename it accordingly, and set the Rib Naming -> Surface Name to the same value

For instance, if the Golaem crowd was setup to use a shader named MAN_MD_body, the scene should contain a equivalent shader, named MAN_MD_body and having its Rib Naming -> Surface Name set to MAN_MD_body as well.

The Surface shader renamed to MAN_MD_body, and its Surface Name set accordingly.

If Guerilla encounters an unknown shader during rendering, the console log contains a warning message such as Can't assign shader 'MAN_MD_body'. This indicates that the shader was not found in the scene nor in the library.

You can then change the shader parameters, and edit its shading network.

Texture variation

Golaem Crowd can randomly shuffle the textures on the agents, using a random index for each agent. Use the TextureSwitch node to associate this index to a texture bitmap.

The Files parameter contains a list of textures files, and the Attr parameter contains the name of the Golaem random parameter used as random value.

The TextureSwitch node is connected to the DiffuseColor input of the shader, and uses the MAN_MD_body_textureIdx random value to switch textures.

Color variation

Golaem Crowd also provides random floating point values on each agent, that can be used as random source for simple color variations. Use the RandomizeColor node to randomly shift the Hue, Saturation and Value of the color.

The RandomizeColor node is used to randomly shift the Hue of the DiffuseColor texture, using the MAN_MD_torso_tshirt_h random value.

Troubleshooting

To troubleshoot Golaem rendering, you can activate the RiCalls diagnostic which will log all communications between the procedural and the renderer. This is helpful to find which shader and shader parameters are provided by the procedural to Guerilla.

In the Passes view, Settings -> Logs & Diagnostics tab

  • Set the Verbosity to Diagnostics
  • Check Diagnostic RiCalls

The RiCalls diagnostic is enabled.