In this lesson, you will learn how to leverage Hierarchical Instanced Static Meshes (HISM) to render thousands of identical objects in a single draw call while maintaining high-performance per-instance culling.
Why HISM Over Standard Instancing?
When you have thousands of objects (like trees, rocks, or grass), the traditional approach of placing individual StaticMeshActors is a performance killer. Each actor incurs its own draw call and overhead. While standard InstancedStaticMeshComponents (ISM) solve the draw call issue by batching, they treat all instances as a single block. If one instance is partially visible, the entire batch remains rendered.
HierarchicalInstancedStaticMeshComponent (HISM) solves this by building a hierarchical tree structure of the instances. This allows the engine to perform per-instance occlusion and distance culling. If a cluster of instances is behind a wall or beyond the camera's view distance, the engine can discard that entire sub-tree of instances without sacrificing the performance gains of batching.
Implementation Logic
You typically implement this within an Actor Blueprint or via C++ by adding the component and then feeding it instance transforms.
// Example: Adding an instance to a HISM component in C++
FTransform InstanceTransform(Rotation, Location, Scale);
MyHISMComponent->AddInstance(InstanceTransform);
Managing Collision and Culling
Because HISM supports per-instance collision, it is the industry standard for environmental clutter. Unlike standard ISMs, HISM allows you to define a InstanceStartCullDistance and InstanceEndCullDistance. Because the internal structure is hierarchical, the GPU only processes the instances that actually contribute to the current frame’s visibility.
When profiling your scene using stat RHI or the Frame Debugger (which we covered in previous lessons), you will notice that shifting to HISM drastically reduces your "Draw Calls" count. This frees up the Render Thread to focus on more complex shaders or lighting, while the HISM tree keeps the overhead of managing those thousands of individual collision boxes minimal.
Key Takeaway: Use Hierarchical Instanced Static Meshes to collapse thousands of objects into a single draw call while utilizing spatial hierarchies for intelligent per-instance occlusion and distance culling.