SetΒΆ

Guerilla Render uses sets to assign objects to be illuminated by the lights, to cast shadows and to be raytraced by the shaders.

A set is a collection of objects and is identified by a string. For instance, Shadows is the default object set that cast shadows. A scene graph node can belong to any sets. The Linking > Set attribute controls which sets an object belongs to, as a comma separated list of sets.

The following diagram explains the relationship between the scene elements and sets (scene elements are shown in orange, while sets are shown in blue:)

Essentially:

  • Objects belong to Sets
  • Shaders trace Sets for Diffuse, Reflection, Refraction
  • Lights illuminate Sets
  • Sets cast shadows in Lights

Guerilla predefines the 5 following sets:

  • Diffuse: the set of objects visible in the Diffuse BSDF.
  • Reflection: the set of objects visible in the Reflection BSDF.
  • Refraction: the set of objects visible in the Refraction BSDF.
  • Lights: the set of objects illuminated by the lights.
  • Shadows: the set of objects casting shadows.

The default RenderGraph puts all the objects in those sets.

You can define new sets by simply adding a new name in the Linking > Set attribute of the scene graph nodes, and use them for any purpose (for the light linking, trace linking..)

Keep consistent names for Sets, so their usage is obvious, for instance, use "ShadowsKey" or "KeyShd" for the sets of objects to cast shadows in the Key lights.

Put some objects in a set
  1. In the RenderGraph, add a RenderGraph/Set node.

  2. Select in this node the set where you want to place the objects.

  3. In the RenderGraph, make your objects flow into the Set node.

Remove some objects from a set
  1. In the RenderGraph, add a RenderGraph/Set node.

  2. Select in this node the -set (like -MySet) you want to remove the objects from.

  3. In the RenderGraph, make your objects flow into the Set node.