Table of Contents

Instance attributes can be used to vary shading across different instances

image.png

It works with both Packed Primitive Instancing and Object Level Instancing

There are a few different methods:

1. Main method

To set it up you need to 3 things:

  1. In your shader network you need a “instance color” node. You can leave all the internal settings at default (of course feel free to modify power/colorspace etc as needed).

image.png

image.png

  1. Add the attributes you want to use to your packed instances (Packed Primitive Instancing ) / instance points (Object Level Instancing ). In most cases you will be using the @Cd attribute to add color, but you can use any vector/color attribute.

Here the attribute is added before the copytopoints node on the pointcloud, but this can also be done after copying the packed geo to points. The important thing is that the attribute is on the points, not the primitives.

Here the attribute is added before the copytopoints node on the pointcloud, but this can also be done after copying the packed geo to points. The important thing is that the attribute is on the points, not the primitives.

  1. Add the attribute in the Octane Object Parms Attributes Panel under Instance attributes and point it at the instance color node.

    image.png

For the Nerds

If your curious the way instance color attributes work is that octane writes the attribute values to a texture that’s handed to the GPU, where each pixel value corresponds to an instance. So for example the color value of the first instance (instance point 0) is written to the first pixel in the texture and so, the second instance’s value in the second pixel and so on. Then when rendering octane looks up the value for each instance by looking at the corresponding pixel according to the instance ID.

Gotchas

  1. This is a big one: Materials using the instance color node CAN ONLY BE USED BY ONE HOUDINI OBJ NODE. This is because the instance color node will be pointed at an instance attribute texture that is object specific, and can’t point at multiple object textures at the same time. You need to duplicate the material if you want multiple objects to use the “same” material.