Flow CombinationΒΆ

The RenderGraph provides different way for combining two attribute flows through the binop node. This node combines two attribute flows, X and Y. Here is a description of the different modes.

  • union: merge X and Y
  • override: merge Y into X if X is active, or Output is not active if X is not active
  • intersection: merge X and Y if both flows are active
  • subtract: return X if Y is not active, or Output is not active if Y is active
  • remove: remove Y attributes from X
  • replace: replace X with Y when Y is active

For any object, if the flow is going into the X (or Y) input, we say the X (or Y) input is active for this object.

Union: merge two flows

The union mode merges the X and Y flows. All the attributes are merged. If the same attribute is present in the X and Y flows, priority is given to the X flow.

This mode is used to merge several objects flows altogether (for instance, union of Sphere and Cube)

Cube uses the Red shader and Sphere uses the Blue shader, both are rendered in Layer

Intersection: return the union of the X and Y flows if both are active

The intersection mode returns the union of the X and Y flow attributes if both of them are active. If one of the two flows is not active, the output is not active.

This mode is used to restrict a set of objects (for instance, a character's head is Character intersection Head.)

All objects use the Red shader, and only Sphere is rendered in Layer (since All intersected with Sphere is Sphere)

Subtract: return the X flow minus the Y flow

The subtract mode returns the X flow attributes if the Y flow is not active. If Y is active, the output is not active.

This mode is used to remove a set of objects from another (for instance, a character without its head is Character subtract Head.)

This mode is used to remove an object set from a flow.

All objects use the Red shader, and All but Sphere are rendered in Layer

Override: override the X flow with the Y flow

The override mode overrides the X attributes with the Y. If the X flow is not active, the output is not active.

This mode is used to override some attributes of an object set.

All objects use the Red shader, but Sphere is overridden with the Blue shader

Remove: remove the attributes from X present in Y

The remove mode removes the attributes from X present in Y flow. The value of the Y attributes doesn't matter.

This mode is used to remove a specific attribute from a flow.

All objects use the Red shader, but Sphere has its shader removed, causing it to render as black

Replace: replace the X flow by the Y flow

The replace mode replaces all X attributes with Y if active. If the Y is not active, X is not changed.

This mode is used to replace all overrides for a set of objects.

All objects use the Red shader, but Sphere has all its attributes replaced with nothing, causing it to render as black