rdInst Tutorial 8 – Changing Instance Settings

You can assign Instancing settings to any/all StaticMeshes directly on the StaticMesh Objects (not actors or instances).

These settings are then picked up by rdInst when setting up the Instance Components

Step 1. Add the UserAssetData

This is done in the same way as the Randomization settings, it uses a SubClass of AssetUserData called rdInstAssetUserData. The settings it provides are similar to those you have when editing Foliage Instances from the Foliage Tool, PCG, or the Actors from the Asset Placement Editor mode in UE5.

Open the mesh in the StaticMesh Editor and scroll down the details panel until you find the “Asset User Data” section (In General Settings->Advanced). Click the (+) to add a new asset then select “rd Inst Asset User Data” in the selection drop-down.

Then expand that new asset with the down arrow on the left of it – now you can change the Instance settings from the values listed.

  • The Start and End Cull values set the range in Unreal units to spread the fade out of culling
  • The WPODisable Distance is the distance in Unreal units to disable WorldPositionOffset in materials for the instance
  • The Mobility value corresponds to: 0=Static, 1=Stationary, 2=Movable
  • The Collision value corresponds to: 0=No Collision, 1=Query Only, 2=Physics Only, 3=Query and Physics
  • The Min LOD is the minimum LOD to display for non-Nanite meshes
  • The Light Channel is self explanatory
  • The Random Seed is the value used to the per-instance random values
  • The “Num Per Inst Cust Data” value refers to the number of custom floats to allocate for each StaticMesh Instance – these are passed to the materials used by the instances. (takes 4 bytes per custom float per instance extra)
  • The Shadow Invalidate sets the type of shadow invalidation for Virtual Shadow Maps
  • The Flags are a Bitfield, and the Value of the Flags variable is the Addition of the Blue numbers for flags you want. There individual values are:
    • rdInst_CastShadow 0x00000001 (1)
    • rdInst_CastStaticShadow 0x00000002 (2)
    • rdInst_CastDynamicShadow 0x00000004 (4)
    • rdInst_CastFarShadow 0x00000008 (8)
    • rdInst_CastInsetShadow 0x00000010 (16)
    • rdInst_CastHiddenShadow 0x00000020 (32)
    • rdInst_CastShadowAsTwoSided 0x00000040 (64)
    • rdInst_CastVolumetrixTranslucentShadow 0x00000080 (128)
    • rdInst_ReceivesDecals 0x00000100 (256)
    • rdInst_DisableCollision 0x00000200 (512)
    • rdInst_CanEverAffectNavigation 0x00000400 (1024)
    • rdInst_HasPerInstanceHitProxies 0x00000800 (2048)
    • rdInst_RayTracingFarField 0x00001000 (4096)
    • rdInst_AffectDynamicIndirectLighting 0x00002000 (8192)
    • rdInst_AffectDistanceFieldLighting 0x00004000 (16384)
    • rdInst_Selectable 0x00008000 (32768)
    • rdInst_ReceiveMobileCSMShadow 0x00010000 (65536)
    • rdInst_SelfShadowOnly 0x00020000 (131072)
    • rdInst_CastContactShadow 0x00040000 (262144)

rdBPtools has tools built-in that make changing these settings very easy – and can be done to bulk Meshes at once.

Step 2. Done

That’s all that’s needed – when Instances of that StaticMesh are generated, they will use those settings.

Note: If you want to have different settings for the same StaticMesh, just Duplicate the Mesh and apply the other settings to the Duplicate.