LightWave Instancing

I played around with one of the newer features in LightWave this week: instancing. This feature lets you load a single object and then duplicate it throughout the scene. There are multiple advantages to using instancing instead of manually loading multiple copies of an object into the scene. First, instancing uses far less memory to store the duplicated object information, which becomes very obvious if you duplicate the object hundreds of thousands of times. Second, you can use some simple rules to automatically place the objects throughout the scene, either uniformly or randomly. You can even control the random placement using a texture map.

In my initial tests, I just wanted to get instancing working using a very simple scene. Inspired by the recent news of the Kaze series, I decided to try to make a field of bamboo stalks. First, I created a single square polygon to act as a ground plane. Next, I created a very rough model of a bamboo stalk, extending vertically about 3 meters from the ground. Then I loaded those two models into Layout.

When we decide to add instancing to a scene, we first have to choose an object that will receive the instances. In this case, the ground object fills that role. Opening up the object properties for the ground object, I went to the “Instancer” tab and added a new Instance Generator to the object.

Object Properties for Bamboo InstancingNow that we have a generator, we need to tell it what to copy and how to place them around the object. Double-clicking the newly created instance generator brings up those options.

In the Instance Generator window, just choose an object from the scene that you want to copy. For my scene, I added the Bamboo object. Since I wanted my copies to spread across the entire ground object, I chose a “Type” of “Surface”, increased the instances to 1200, and set the “Distribution” to “Random”. I also added some randomness to the rotation, so they are not all perfectly vertical.

Instance Generator Properties for Bamboo Scene

Here is the final result after I placed the camera, added some basic lighting (a single area light on the left plus some global illumination), and turned on volumetric fog.

Instanced Bamboo Forest
Final render from LightWave of the bamboo forest using only two objects in the scene. Click for full resolution image.