rdInst Tutorial 8 – Changing Instance Settings

Last Updated: 18th January 2023

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

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 or the Actors from the Asset Placement Editor mode in UE5.

  • 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 “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 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 0x0001 (1)
    • rdInst_CastStaticShadow 0x0002 (2)
    • rdInst_CastDynamicShadow 0x0004 (4)
    • rdInst_CastFarShadow 0x0008 (8)
    • rdInst_CastInsetShadow 0x0010 (16)
    • rdInst_CastHiddenShadow 0x0020 (32)
    • rdInst_CastShadowAsTwoSided 0x0040 (64)
    • rdInst_CastVolumetrixTranslucentShadow 0x0080 (128)
    • rdInst_ReceivesDecals 0x0100 (256)
    • rdInst_DisableCollision 0x0200 (512)
    • rdInst_CanEverAffectNavigation 0x0400 (1024)
    • rdInst_HasPerInstanceHitProxies 0x0800 (2048)
    • rdInst_RayTracingFarField 0x1000 (4096)
    • rdInst_AffectDynamicIndirectLighting 0x2000 (8192)
    • rdInst_AffectDistanceFieldLighting 0x4000 (16384)
    • rdInst_Selectable 0x8000 (32768)

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.