Instance Range


The Instance Range texture holds a greyscale color with the Maximum ID range of 0 to whatever figure you enter in this parameter, and OctaneRender® prepares this range to map it to geometric instance IDs.

Figure 1: Parameters of the Instance Range texture node


Just as a Lua script or any of the OctaneRender plug-ins are able to generate instances of an object, these same processes can also assign an ID to each generated instance, which results in a grid of instance IDs. You can then assign colors to each instance ID via Texture (in this case with an image in the Instance Color texture), and match the IDs with pixels of the image, starting at the bottom-left and moving up to the top-right. For the example below, there are 10 x 10 instances that a Lua script assigns IDs to each instance, generating 100 IDs. To map the range, the Maximum ID attribute must match the number of generated IDs - 100 in this case.

You can use other mapping textures, such as the Gradient texture, in conjunction with the Instance Range to create some interesting variations.


Since OctaneRender stores the colors as a texture, this option is more flexible compared to storing the colors directly with the geometry, since it allows you to specify more than one color per instance.