Ever tried instancing an LOD group? Well, you'll get some unexpected results if you use the Duplicate Special > Instance option (which would seem to be the way to go)....your instanced LODs will swap at the same time regardless of how far they are from the camera. In fact, they all seem to ape the original LOD group...
Let's begin by trying to understand what's going wrong....
The problem here is that the Instance command has created instances of the object Transforms, whereas we only wanted to instance the Shape nodes. As a consequence the message from the LOD node that sets the visibility of your Transform nodes is being applied to all your LODs because the instanced Transforms are 'sharing' attributes...... You can check whether a node is instanced in the Hypergraph - instanced nodes are pink.
- From the shelf, create a polygon cube and a polygon sphere.
- With both objects selected, Edit > Level Of Detail > Group - this will connect both objects to an LOD node, and group them in the Outliner under the new node: lodGroup1.
Move the LOD group away from the Origin, then play with the lodGroup1.threshold attribute until you can see the objects swapping when you move the camera closer to or further away from the group by a small distance either side of this value.
- Select the LOD group node in the Outliner
- Edit > Duplicate Special > Geometry Type: Instance
- Move the new LOD group away from the original
- Place the camera such that you see both LODs in a line, one behind the other, then dolly the camera - you would expect the LODs to swap independently, instead they are swapping at the same time.
2) The solution:
Our developers are aware of this shortcoming with instancing LOD groups. The solution, however, is quite simple.
Select the LOD group and duplicate it with the following Edit > Duplicate Special options:
- Geometry type: Copy
- Group under: Parent
- Duplicate input graph
- Instance leaf nodes
And your instanced LOD will behave itself.