中EN

Material Instances

  • Change appearance "without incurring an expensive recompilation"; parameterized material editable in an instance; can improve performance.
  • Parent-child hierarchy; instance inherits all attributes; naming M_ (parent) / MI_ (instance). Standard material "could take up to a minute to recompile".
  • Only attributes designated as parameters in the parent are editable (Scalar, Vector (4 floats), Texture parameters e.g. TextureSampleParameter2D/Cube). Constants not exposed.
  • Static parameters (StaticSwitch, Static Component Mask) applied at compile time; editable in instance editor but not at runtime; masked-out branch not executed. "A new Material is compiled for every combination of static parameters in the base Material that are used by instances" → excessive shaders; minimize static params and used permutations.
  • Material Instance Constant (MIC): calculated once prior to runtime; created in Content Browser. Material Instance Dynamic (MID): changed at runtime via C++/Blueprint (Create Dynamic Material Instance + Set Material).

引用这一章的笔记

输入关键词开始搜索

滚轮或双指缩放 · 拖动平移 · 双击放大 / 还原