Materials


Materials are how Unreal applies fancy textures to meshes. In other words, everything you can see in 3D is a material.

  • Materials are created by adding a .txt script file in the /Script/Materials folder of a mod.
  • The raw texture files used in a material must be put in the /Textures folder of a mod.
  • Most common file types like jpg or png are accepted.
  • The name of the .txt file will be how this material will be referred to in other script files.
  • To replace a base game material, you must name the .txt file using the right material ID.
  • Using the same name as a previous mod's material will overwrite it.

    Script file content example


    // Comments start with a double slash and end with a semicolon. They're ignored by the game.;
    // Every script operation must end with a semicolon. Spaces or line returns are ignored.;
    // Base game material file names are a number, so only use non-number names to add new materials. Ex: BlueChickenMaterial.txt;
    // Don't put spaces in file names.;
    // Not all script operations must be defined for a material to work. Default values will be used instead. This file contains all possible ones, but comments some of them.;

    // The file name of the base texture;
    texture = BlueChicken.png;

    // The file name of the OPTIONAL normal texture;
    // Normal textures are used to give a 3D effect to textures via bump mapping.;
    // https://cpetry.github.io/NormalMap-Online/ is an excellent free tool for generating bump maps from height maps;
    normal = BlueChickenNormal.png;

    // The file name of the OPTIONAL emissive texture;
    // Emissive textures will overwrite material effects and lighting and keep the non-black pixels in it fully bright;
    //emissive = None;

    // The file name of the OPTIONAL specular texture;
    // Specular textures will affect the specular setting of the material. It needs to be grayscale. It makes things shiny.
    specular = BlueChickenSpecular.png;

    // The file name of the OPTIONAL metallic texture;
    // Metallic textures will affect the metallic setting of the material. It needs to be grayscale. It makes things shiny.
    //metallic = None;

    // The file name of the OPTIONAL roughness texture;
    // Roughness textures will affect the roughness setting of the material. It needs to be grayscale. It makes things matte.
    roughness = BlueChickenRoughness.png;

    // The number of columns in the sprite sheet. Leave to 1 if this isn't a sprite sheet.;
    columns = 2;

    // The number of rows in the sprite sheet. Leave to 1 if this isn't a sprite sheet.;
    rows = 2;

    // How fast the sprite sheet animation will play. A smaller number will play it slower. Ignored if this isn't a sprite sheet.;
    animationFactor = 0.75;

    // The amount of frames in the sprite sheet animation. Leave to 1 if this isn't a sprite sheet.;
    frameAmount = 4;

    // Apply a hue shift to the texture. 0.0 to 1.0.;
    //hue = 0.0;

    // Percentage of desaturation of the texture. 0.0 to 1.0.;
    //desaturation = 0.0;

    // Set to true if you want meshes using this material to drop shadows into the world. false will disable dropping shadows.;
    shadow = false;

    // Set to true if you want this material to display rain wetness effects if the mesh is under rain. Do not use for materials used in dynamic sprites like enemies.;
    allowWetness = false;

    // The step sound to play if the player character is stepping on a mesh using this material.;
    //stepSound = 830;