Vray Compositing


The configuration workflow for a project that requires Vray renders is very similar to the workflow used by the Webgl setup. The main difference lies in the use of the Template Override operator instead of the Map Override, and the additional configuration that is typically done in the Composite Asset.


The Composite Asset can be used with either Webgl renders or Vray renders. At this time, its usefulness for Webgl renders is limited, due in part to the lack of masking features for Webgl materials. When it comes to Vray, however, this asset is critical in controlling the amount of renders that need to be produced, since individual renders are the only way to display the Vray result to the end user.



Layering is the main method for reducing the total render count. 

For example, let’s say we have a chair that is configurable in three ways:

  • Fabrics for the cushion - 500 fabrics
  • Wood type for the frame and legs - 10 different woods
  • Background setting - 3 different backgrounds

Without any layering we would need to render a total of 15000 renders for just this one chair.

This can be reduced to a total of just 513 renders if we layer the background image, the wood frame, and the fabric components on their own separate layers. In addition to this reduced count, the end client would also be able to load configuration changes faster, since the wood frame and fabric renders may be a smaller part of the overall image, and would result in significantly smaller file sizes.


<insert here animated GIF image showing an example of composited layers>



The comp asset is composed primarily of layers. Each individual layer represents an image sequence. The order of the layers is also important, as it determines how these image sequences get layered on top of eachother.

Here is what the composite asset may look like for the example listed aboveIMG1.PNG



The order of each layer determines how the resulting images get layered in the 2D player.
The layer ordering is from top to bottom representing background to foreground. In the example above, the Background Layer will be displayed first, with the Wood Layer on top of that, and the Fabric Layer displayed on top of the Wood Layer.

Layer Type

There are currently two types of layers available: render layers and image layers. 

  • A render layer will use Vray or Webgl to generate the image sequence
  • An image layer only has a Texture target and, this allows the user to reference texture assets directly. For example, the user has a photograph that should be used as the background image of a configuration. This layer will take into consideration the alpha channel of the texture asset

Attribute Targets

Each render layer can be associated with a set of attributes. Image layers do not have this association.

An association with an attribute means that a new image will be generated for this layer for every possible value of that attribute. In our scenario, if the Wood Layer would be associated only with the WoodType attribute, then it would generate a total of 11 renders (the 11th is for the case where no value is selected).

For every additional attribute that layer is associated with, the number of possible combinations would grow exponentially, as it would need to create unique renders for each combination of attribute values.

AOV Operators

The render layers can be assigned an additional AOV (render pass). The ThreeKit platform currently supports only an Ambient Occlusion pass, with more to be added in the future.

The AOV pass is available to be added through the Operators button, as the Vray AOV Properties operator.

Override Groups

Each render layer can also have a practically unlimited number of Override Groups associated with them. These override groups allow the user to specify which items should appear on that layer, and how they should appear. This system is similar to the Collections feature in Maya’s Render Layers.



The Override Groups, as mentioned above, allow the user to specify which objects will be used to render that particular layer. Similarly to the Collection feature in Maya’s Render Layers, the user can specify any number of these Groups, and assign overrides to them.


In order to specify which objects should be included in these groups, the users can specify them by Node Tag, in the group’s Targets.


For example, on the Wood Layer we would like to render the wood components of the chair with a floor shadow cast by the whole chair, as well as with shadows on the wood frame cast by the fabric components. For this purpose the Wood Layer has three Override Groups listed under it:


Visible Items

This group targets all of the objects that should render as normal, with no overrides applied to them. This would be the objects tagged with the tag #Wood, and those tagged #Lights

Floor Shadow

This group would be for capturing the shadow cast by the whole chair on the floor. The objects included in this group would be the ones tagged with the tag #Floor.

The override applied to this group would be a Vray Material Wrapper, which contains the options necessary to capture the shadow only. This operator would effectively apply to all meshes tagged #Floor.

In order to capture shadows only, the Vray Material Wrapper’s options would look as follows:

Fabric Shadow

The purpose of this override group is to display the shadows and GI cast by the fabric components on the Wood components. For this purpose, we would target only the objects tagged #Fabric.

The override on this group would also be a Vray Material Wrapper, with the default options, and only the Primary Visibility option set to OFF.



On the Fabric Layer, we would need the following Override Groups:


Visible Items

Similarly to the Visible Items Group on the Wood Layer, this one would target the objects tagged with #Fabric and #Lights, and no override applied to them.

Wood Mask

This group would need to target the objects tagged with #Wood. In order to layer the Fabric on top of the wood, then the wood components would need to be masked out of the fabric. To achieve this effect in the render, we would need a Vray Material Wrapper override again, with the following settings:



In order for the composite asset to take effect, it has to be assigned to Catalog item. In our case above with the Chair, this composite asset could be assigned to the Chair catalog item using the Default Composite reference as seen below:


The Composite Asset can be referenced this way by any number of different product items. It will work correctly as long as they pass the same attributes. There could be, for instance, other chair products, or any other furniture products that share the same attributes Fabric, Wood, and Background, and they would all need to be rendered in the same manner, with the three separate layers.

A central Composite Asset linked to all of them would make the maintenance of the compositing much simpler.


There are also cases where the user needs to ensure that the node-tags entered inside the Override Groups are working correctly with a given Catalog Item. For this purpose, the user can choose to load any Catalog Item directly inside the Composite Asset as shown here:IMG6.PNG


Once a Catalog Item has been loaded this way, clicking on the individual Layers will preview the objects loaded in all the Override Groups inside that Layer. The Viewport will update the changes only when selecting a different Layer than the currently selected one.



There will be instances where it becomes necessary to apply different changes in the render setup, based on which layer is currently being rendered. As a simple example, let’s say that we would like to use a different VFB file for the Fabric Layer, as opposed to the Wood Layer. The logic for this cannot exist on the Composite Asset, since there is no direct connection between this and the Scene Asset where the VFB is specified. The Composite asset is only a child of the catalog item, and it receives the 3D assets for rendering. Instead, the logic would currently have to exist on the 3D assets.

We can use the Layer condition in our rules, to detect which layer is currently being rendered. This allows us to change properties or swap assets per layer.
In the example below, we create the Layer condition, and check against the Fabric Layer of our chosen Composite Asset. In this case, we are applying a different set of Vray Post Process corrections for the Fabric layer.


Share this