Materials Primer

Materials Primer

The parent materials used by the Inflexion team on the Enhanced edition of Conan Exiles, are markedly different from those available in the UE4.15 modkit. There are fewer parent-materials with significantly more extended features.

The main selection of materials split into those for Characters, and those for Environments

While there are more special-case materials available in the folders in FLX Materials Content plugin folder, these do most of the work in CE:E UE5.6

  • Character materials:
    • M_Character
      • This is used for characters, creatures, weapons, armor, etc.
    • M_Eye_Human
      • Derived from the metahuman eye shader, with extended customisation options
    • M_Human_Hair
      • Adapted from the UE4.15 hair material with extended functionality and a new main file type
  • Environment materials:
    • M_Foliage
      • Includes a custom wind-animation system that leverages SpeedTree’s UV-storage, and custom Vertex-color painting.
    • M_Prop
      • A standard environment art shader that is used for small/large props, and architecture.
    • M_Rock
      • Tuned specifically for very large objects, and is set up to apply many layered features to offer small-scale detail, and large-scale variation
    • M_Glass
      • Using Unreal’s Thin Translucent shading model - this is used sparsely.

These materials are constructed primarily for delivering materials to Unreal’s renderer that work as well as possible in as many different lighting and reflection setups as possible (bright and dark).

They are also set up for a team already familiar with working this way and are complex.

The fine-tuning of materials is also handled editor-side, rather than ‘offline’ (in photoshop/substance/etc). This is so that tuning can be fast, and occur at any step in the development process without having to reauthor the texture.

Core tech and how it influences authoring

CE:E UE5.6 Leverages Nanite, Lumen, and Virtual Shadow maps as part of the core rendering setup.
This means there are some broad guidelines to avoid performance (framerate) issues:

  • Used “Masked” blend mode on materials as little as possible - VSM works most optimally when shadows are cast off geometry, not pixels.
    • When foliage placed in large amounts uses Masked materials, shadow-casting performance can drop dramatically (Shadow depths shown using the console-command stat gpu).
    • Also - WPO distance threshold on moving foliage (regardless of Masked Materials) needs to be aggressive. This can be perceived as a regression from 4.15 - however, this is simply due to the VSM shadow-casting performance diminishing greatly over distance on complex objects.

The inflexion team uses Substance Designer and Painter with proprietary nodes to help generate textures, with certain steps being fully automated.

Several channels in our texture setups are procedurally generated from other textures through these Substance setups, but can be authored elsewhere, just the same.

The starting textures required for most artwork in CE:E are:

  • Basecolor (Non-metal colors are kept, Metal colors on the Basecolor texture (if using the Inflexion materials as intended) will be discarded at runtime.
  • Normal (standard Tangent-space normal map)
  • Roughness
    • Inflexion authors Most roughness masks at Full Range
      • This means that runtime roughness ranges and amounts are established on the Material instance for the asset, rather than authored into the roughness mask itself
        • More on this later.
  • Metal
    • Metal masks for Environment art are authored on single-channel black-and-white textures, without greyscale values to throttle how metallic they appear.
    • Metal color is handled through an indexing system, to ensure that all metal of a particular type is represented consistently across the whole game.
    • Tarnish, damage, and decay are handled procedurally on the MI_ rather than being authored into the texture.

Core Texture Types

There are 2 base texture types in Inflexion’s material setups.

BCR and NCD_Mask.

These supply color, roughness, normal, specular, Ambient occlusion -

The textures are generally applied to TexCoord0 coordinates.

  • BCR / BCRO (sRGB / BC7 compression)
    • This is the main Basecolor/Roughness texture (Or BaseColor/Roughness/Opacity where necessary.
    • RGB channels store color data which should be authored without any baked shadows/lighting, with appropriate colors for materials that are as close to real-world values as possible.
    • Alpha channel stores roughness data and occasionally Opacity Mask data, also.
    • The BCRO format stores Opacity data and roughness data on the alpha-channel - this is automated on the Inflexion Substance side, but can be manually implemented:
      • Roughness data is on the upper range, between .25 and 1
      • 0.25 and above is deemed an opaque pixel - 0-0.25 is not opaque and will be rendered as such.
    • M_Prop for BCRO usage will require overrides to be set on the MI_ for
      • Blend mode - should be changed to “Masked”
      • Opacity Mask Clip Value should be set to 0.2 (this should be the default).
      • Your Opacity masks should automatically be considered when the blend mode is overridden.
  • NOTE - textures that provide color, whether they are BCR/BRCO/gradients/Overlay textures, are ALWAYS handled in sRGB color space.

The following textures are all suffixed _Mask.

In CE:E - the suffix _Mask will always denote LINEAR RGB (with middle grey at 128) - please ensure that sRGB is unchecked. This can have significant adverse effects on the visual appearance of materials.

  • NCD_Mask (linear RGB, BC7 compression, loaded in Directx tangent space).

    • This is a proprietary stack of channels that allows many different functions in our shaders.
    • Channel layout:
      • R - Normal X
      • G - Normal Y
        • Normal Blue Channel is discarded, and reconstituted at runtime from the X/Y data. This allows for accurate/cheap blending of normal data in the shader.
      • B - Curvature
      • A - Displacement/Height.
    • Curvature and displacement data should be generated from the Normal data; every materials has a normal map, and derived channels such as these should be generated as consistently as possible -
      • Curvature - is used in the shaders for specular data and occasionally procedural roughness data. It’s also used for procedural damage and deposition effects (sand, moss, weather, etc).
      • Displacement is used in the shaders for similar purposes - but we derive cavity-occlusion (Material AO) from this channel, as well as it functioning primarily as a driver for deposition effects, too. On landscapes this channel is used for blending between layers, as well as displacement of Nanite geometry (Ultra quality only).
    • Important
      • Curvature masks must be authored the same way each time, with an average value of 128. They are combined often in the inflexion shaders, and wandering too far from that average value can have adverse effects on the success of Specular occlusion, and procedural deposition/damage effects (particularly on characters).
  • Tangent-space Normal information is generally always stored on NCD_Mask textures.

  • Metal_Mask - (Alpha Compression - should be 1mip lower than BCR/NCD )

    • Since Metal is not common enough on materials to warrant a whole channel, and having non-standard texture formats for different assets adds unnecessarily to authoring complexity, metal masks are added to materials where necessary
    • Metal masks should be authored per metallic area on a prop, weapon, or character - procedural tech on the shader allows tarnish and character to be applied.
    • Similar to the shared Roughness/Opacity under a BCRO texture, wholly metal objects do not require a Basecolor texture, and instead use the NCD_Mask with the Metal_Mask
      • Metal/Roughness -
      • 1-metal setup:
        • This assumes that the whole material is metal:
        • Metal Mask /roughness mask - since metalness is implied here, the roughness data is
      • In this case, the metal mask provides 3 functions.
      • Grey values 0/0.25 are not opaque on a masked material
    • M_Prop - Tarnish is handled on metal-only via a parameter
    • This is used on Environment materials only.
  • RGN_Mask (linear RGB, BC7 compression, Compressed without Alpha - used at as low Mip as possible.

    • Available on M_Character and M_Prop_Customizable
    • This is a 3channel linearRGB texture marking areas for customizable regions. The numbered regions on the MI_ correspond to the color-order of the texture:
    • On M_Character / M_Prop_Customizable
      • R1 - Red (255/0/0
      • R2 - Green (0/255/0)
      • R3 - Blue (0/0/255)
    • On M_Character Alone
      • R4 - Cyan (0/255/255)
      • R5 - Magenta (255/0/255)
      • R6 - Yellow (255/255/0)
    • Adjacent regions should butt up against the next without any gaps.

There are many different functions in Inflexion’s material library, that do need further explanation.

This will come in future updates and deep-dives.

Last updated on