Skip to content
François Beaune edited this page Feb 2, 2014 · 25 revisions

For convenience, appleseed includes a number of built-in entity models, providing a robust foundation with no external dependencies. This document describes these built-in entity models in details.

Table of Contents

### 10. Built-in Render Layer Rule Models

10.1. Common Parameters

Parameter Presence Description
render_layer Required The name of the render layer entities will be assigned to. This name is also used to construct the name of the render layer file.
entity_type Optional If specified, restrict the rule to entities of this type.
order Required A positive or negative integer which defines the precedence of this rule with respect to the other rules. Rules are applied in increasing order. The order of application of rules with identical order values is undefined.

If defined, the entity_type parameter must be set to one of the following values:

  • assembly
  • assembly_instance
  • edf
  • environment_edf
  • environment_shader
  • light
  • material
  • object
  • object_instance
  • surface_shader

10.2. The regex Model

Description

A regex render layer rule allows to assign one or multiple entities whose path matches a given Perl regular expression (cheat sheet, examples) to a given render layer.

The path of an entity is built by concatenating the names of all its parents, starting from the scene (whose name is always scene) and going down until the entity itself is reached. Entity names are separated by / characters. For instance, a sub-assembly "wheel" inside an assembly "truck" will have the following path: scene/truck/wheel.

Parameters
Parameter Presence Description
pattern Required The regular expression pattern used to select entities.
Example

The following rule, called "rule1", assigns all object instances from the "truck" assembly to a render layer called "truck_layer":

<render_layer_rule name="rule1" model="regex">
    <parameter name="render_layer" value="truck_layer" />
    <parameter name="entity_type" value="object_instance" />
    <parameter name="order" value="1" />
    <parameter name="pattern" value="scene/truck/.*" />
</render_layer_rule>
Clone this wiki locally