Layers in Koru Materials

Each material in Koru may have several layers:

Layered material in Koru

Here you see a material with 3 layers named “Top Layer”, “Middle Layer” and “Bottom Layer”. The top one is currently selected and you see its properties at the right. As you may see, layers have Mask and Bump parameters that work layer-wide, and also three optional blocks: diffuse, emissive and specular. You can read more about these blocks using the links at the left.

When Koru needs to render a shape it gets its material and renders the shape with each of layer from the bottom to top. For the material on the picture above, Koru first renders the shape using “Bottom Layer” parameters, then renders it again with “Middle Layer” parameters and finally renders it with “Top Layer” parameters. As the top layer is opaque green, you don’t see any lower layers on the shape, but if it was transparent or had a mask, you would see the underlying layers on the shape.

Here we have the same material, but the checkers mask is loaded into the top layer’s mask slot:

Layer mask in Koru

Koru uses the mask to reveal the middle (gray) layer where the mask is black and keep the top (green) layer where the mask is white.

Rendering a single layer

When you enable both diffuse, emissive and specular blocks in the same layer, Koru has to define which goes first. Here’s what it does:

  1. First of all it renders diffuse block, of course if it is enabled;
  2. Then it renders emissive block, again if it is there;
  3. The last comes specular block, also if it is there.

This means that if you have a highly-reflective specular block enabled, you may not see diffuse and emissive blocks behind it even if they are enabled. Consider using multiple layers or layer masks to display something on top of the reflective areas, or to reveal the lower layers.

Do I need multiple layers?

In most cases one layer is enough. You can define the base color with diffuse block, add some reflections with the specular one and get a nice-looking material.

However, some materials need more layers. For instance, lacquered aluminium needs two reflections: one for the aluminium itself and another for the lacquered layer. Another case is a complex material having some base texture and another one on top of that applied with a mask: partially rusted surface, for instance.

In such cases you need to create several layers and provide masks or control their transparency to make sure that all underlying layers are visible.