The Instance Range texture node functions in a similar way to the Instance Color texture node. 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: Instance range 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 10x10 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.

Figure 2: A 10x10 grid of greyscale colors in an Instance Range


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

Figure 3: Gradient Map texture and Instance Range

Parameters

    • Maximum ID - Maximum instance ID used to map an instance ID to a grey scale value. This node maps instance ID zero to black color, and maximum instance ID to white color and vice versa when invert is selected.
    • Invert - Invert the colors that are mapped to instance IDs, i.e. map the instance ID 0 to white color and the maximum ID to black color.