Materials

Materials are used in the game to set what various surfaces in a stage should look like. In Rolled Out!, materials work by picking a base material (See Base materials), which comes with default values for various properties such as textures, the emissive color, refraction, etc. Stages can then create materials that override those default values, and even animate those properties.

Example material JSON config

This goes in the /materials array of a stage config. More info can be found on the spec at Material Object.

{
  "name": "material_001",
  "base_material": "rolledout:mat_surface_translucent_lit_generic",
  "animations": [
    "anim_simple",
    "anim_colors",
    "anim_opacity"
  ],
  "parameter_overrides": {
    "base_color_texture": {
      "type": "texture2d",
      "value": "a1_png"
    },
    "base_color_multiplier": {
      "type": "vector3",
      "value": { "x": 1.0, "y": 0.8, "z": 1.0 }
    },
    "opacity": {
      "type": "scalar",
      "value": 0.8
    },
    "refraction_texture": {
      "type": "texture2d",
      "value": "refr_png"
    }
  }
}