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.



Instance Range




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 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.



10x10 Grid Instanced Cubes




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



Nodegraph Layout




Figure 2: Instance Range node in the Nodegraph

 

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


Gradient Map



Figure 3: Gradient Map texture and Instance Range




Figure 4: The Gradient Map and Instance Range NodeGraph used in Figure 3


Figure 4a: The Gradient Map and Instance Range NodeGraph used in Figure 3