rdInst Manual version 1.21
Last updated 15th February 2023
Section 1. About rdInst
Welcome to rdInst, a small run-time plugin that provides Handling of InstancedStaticMeshes and Actors.
There are 2 Actors to rdInst, and a small library of static methods:
- The first actor, ArdActor is the one that you SubClass from to get the ISM and Randomization functionality.
- The other is rdInstBaseActor, one is automatically added to your level (hidden), and it Manages the Instances.
- The static methods in the Library are used to get/set the AssetUserData used for storing the Instance and Randomization values.
To use this plugin, just enable it and Subclass an ArdActor in Blueprint or C++, then simply create Instances, either straight to the HISMC or using the Managed actors methods.
The plugin will be needed for your packaged builds, but is small and quite portable.
The Manager uses UHierarchicalInstancedStaticMeshComponents (HISMCs) rather than UInstancedStaticMeshComponents (ISMC) as they have a unique way of removing Instances.
The ArdActor has 4 different modes for handling it’s descendants:
- None – the fastest, you are in charge of all handling, it just gives you HISMCs for passed in StaticMeshes
- ShowOnlyOne – when your Actors ChildActors are collated into Folders (USceneComponents attached to the RootComponent) this shows only one folder.
- Randomization – each actor has it’s unique Randomization settings applied before being added to the level
- DrawEvent – this is similar to None, but triggers an rdDrawEvent whenever the Actor needs building
The Randomization mode provides the most power, Randomization settings can be added to any Actor by way of manually adding tags, or you can use the rdBPtools tool from the Marketplace which provides many time saving tools for setting them up.
The Randomization provides:
- a RandomStream that is shared (default, optional) throughout the chain of Child Actors (and any Parents of this)
- a Theme system, any Folder or Actor can specify what themes to be shown with (comma separated String)
- a Reliance system, any actor can rely on the visibility of any other actor
- the Location can be randomly generated with a specified range of its default Location
- the Scale can be randomly generated with a specified range
- the Rotation can be randomly generated with a specified range from its default Rotation
- there are Probability values for Flipping the actor on any of the 3 axis (values are 0.0 for never, 1.0 for always)
- there are Probability values for Showing the actor (values are 0.0 for always hide, 1.0 for always show)