Motion SDK

Materials

Physically based materials with 16 presets, flat and toon shading, outlines and procedural surfaces.

Declare materials once in materials and refer to them by id from a mesh or text. Or use a preset inline with "material": "preset:chrome".

The twelve look presets under the studio_soft rig.
{
  "camera": { "position": [0, 0, 9], "target": [0, 0, 0], "fov": 40 },
  "lighting": { "rig": "studio_soft" },
  "environment": {
    "background": { "solid": "#20242c" },
    "reflections": "studio"
  },
  "post": { "bloom": 0.6 },
  "nodes": {
    "matte_clay": {
      "transform": { "position": [-3.75, 0.8, 0] },
      "mesh": {
        "geometry": { "sphere": { "radius": 0.6 } },
        "material": "preset:matte_clay"
      }
    },
    "glossy_plastic": {
      "transform": { "position": [-2.25, 0.8, 0] },
      "mesh": {
        "geometry": { "sphere": { "radius": 0.6 } },
        "material": "preset:glossy_plastic"
      }
    },
    "chrome": {
      "transform": { "position": [-0.75, 0.8, 0] },
      "mesh": {
        "geometry": { "sphere": { "radius": 0.6 } },
        "material": "preset:chrome"
      }
    },
    "brushed_metal": {
      "transform": { "position": [0.75, 0.8, 0] },
      "mesh": {
        "geometry": { "sphere": { "radius": 0.6 } },
        "material": "preset:brushed_metal"
      }
    },
    "gold": {
      "transform": { "position": [2.25, 0.8, 0] },
      "mesh": {
        "geometry": { "sphere": { "radius": 0.6 } },
        "material": "preset:gold"
      }
    },
    "glass": {
      "transform": { "position": [3.75, 0.8, 0] },
      "mesh": {
        "geometry": { "sphere": { "radius": 0.6 } },
        "material": "preset:glass"
      }
    },
    "frosted_glass": {
      "transform": { "position": [-3.75, -0.8, 0] },
      "mesh": {
        "geometry": { "sphere": { "radius": 0.6 } },
        "material": "preset:frosted_glass"
      }
    },
    "ceramic": {
      "transform": { "position": [-2.25, -0.8, 0] },
      "mesh": {
        "geometry": { "sphere": { "radius": 0.6 } },
        "material": "preset:ceramic"
      }
    },
    "velvet": {
      "transform": { "position": [-0.75, -0.8, 0] },
      "mesh": {
        "geometry": { "sphere": { "radius": 0.6 } },
        "material": "preset:velvet"
      }
    },
    "neon": {
      "transform": { "position": [0.75, -0.8, 0] },
      "mesh": {
        "geometry": { "sphere": { "radius": 0.6 } },
        "material": "preset:neon"
      }
    },
    "holographic": {
      "transform": { "position": [2.25, -0.8, 0] },
      "mesh": {
        "geometry": { "sphere": { "radius": 0.6 } },
        "material": "preset:holographic"
      }
    },
    "toon": {
      "transform": { "position": [3.75, -0.8, 0] },
      "mesh": {
        "geometry": { "sphere": { "radius": 0.6 } },
        "material": "preset:toon"
      }
    }
  }
}
The twelve look presets under the studio_soft rig. apps/docs/examples/materials.json · render it with motion-sdk render apps/docs/examples/materials.json -t 1 -o materials.png

Presets

A preset sets sensible values; any field you write overrides it.

matte_clay, glossy_plastic, chrome, brushed_metal, gold, glass, frosted_glass, ceramic, velvet, neon, holographic, toon, and the surface presets gravel, rock, weathered_paint and stucco.

{ "materials": { "glow": { "preset": "neon", "color": "#ff2ec4", "emissive_intensity": 5 } } }

Glow

emissive and emissive_intensity make a material give off light. Above about 1, bloom picks it up. Neon tubes look best at emissive_intensity 4 or more with bloom_radius 0.6 to 0.8.

Stylised Shading

Flat shading on the rock and ground, toon bands with an outline on the capsule.
{
  "camera": { "position": [0, 1.5, 7], "target": [0, 0.3, 0], "fov": 40 },
  "lighting": {
    "rig": "golden_hour",
    "shadows": { "softness": 2, "strength": 0.6 }
  },
  "environment": { "background": { "solid": "#9fc6e8" } },
  "materials": {
    "flat": { "color": "#e07a5f", "shading": "flat" },
    "toon": {
      "color": "#3d85c6",
      "shading": "toon",
      "bands": 3,
      "outline": { "color": "#111111", "width": 0.04 }
    },
    "ground": { "color": "#81b29a", "shading": "flat" }
  },
  "nodes": {
    "ground": {
      "mesh": {
        "geometry": { "plane": { "size": [20, 20] } },
        "material": "ground"
      },
      "transform": { "rotation": [-90, 0, 0] }
    },
    "rock": {
      "transform": { "position": [-1.4, 0.8, 0] },
      "mesh": {
        "geometry": { "icosahedron": { "radius": 0.9 } },
        "material": "flat"
      }
    },
    "blob": {
      "transform": { "position": [1.4, 1.1, 0], "rotation": [0, 0, 20] },
      "mesh": {
        "geometry": { "capsule": { "radius": 0.55, "length": 0.7 } },
        "material": "toon"
      }
    }
  }
}
Flat shading on the rock and ground, toon bands with an outline on the capsule. apps/docs/examples/shading.json · render it with motion-sdk render apps/docs/examples/shading.json -t 1 -o shading.png
  • "shading": "flat": faceted, matte, low-poly.
  • "shading": "toon" with "bands": 3: cel shading.
  • "outline": {"color": "#111", "width": 0.04}: an inverted-hull silhouette in world units. It suits convex shapes. On tightly wound shapes like a torus knot the hull covers the mesh.
  • unlit: true ignores lights entirely.

To recreate the washed-out look of older three.js demos, pair flat shading with post.color_management: "legacy" and tone_mapping: "none".

Surfaces

The rock, weathered_paint and stucco presets on a gravel floor.
{
  "camera": { "position": [0, 1.2, 6], "target": [0, 0.6, 0], "fov": 40 },
  "lighting": { "rig": "golden_hour" },
  "environment": { "background": { "sky": {} } },
  "materials": {
    "gravel": { "preset": "gravel" },
    "rock": { "preset": "rock" },
    "paint": { "preset": "weathered_paint", "color": "#3d7ea6" },
    "stucco": { "preset": "stucco" }
  },
  "nodes": {
    "ground": {
      "mesh": {
        "geometry": { "plane": { "size": [30, 30] } },
        "material": "gravel"
      },
      "transform": { "rotation": [-90, 0, 0] }
    },
    "boulder": {
      "transform": { "position": [-2.1, 0.7, 0] },
      "mesh": {
        "geometry": { "icosahedron": { "radius": 0.8 } },
        "material": "rock"
      }
    },
    "drum": {
      "transform": { "position": [0, 0.7, 0] },
      "mesh": {
        "geometry": { "cylinder": { "radius": 0.5, "height": 1.4 } },
        "material": "paint"
      }
    },
    "wall": {
      "transform": { "position": [2.1, 0.7, 0], "rotation": [0, -20, 0] },
      "mesh": {
        "geometry": { "box": { "size": [1.4, 1.4, 0.4] } },
        "material": "stucco"
      }
    }
  }
}
The rock, weathered_paint and stucco presets on a gravel floor. apps/docs/examples/surfaces.json · render it with motion-sdk render apps/docs/examples/surfaces.json -t 1 -o surfaces.png

surface adds procedural colour, roughness and bump on top of any material. Patterns are noise (dirt, stains), gravel, rock (strata), rust (rust eating through paint, where color is the rust) and stucco. scale is the feature size in world units. Patterns are solid 3D noise, so there are no UVs or seams, and they fade with distance.

{ "surface": { "pattern": "gravel", "color": "#5a3c50", "scale": 0.1, "contrast": 0.6, "bump": 0.8 } }

For images on materials see Textures. For water see Water.

Blending

blend: "add" makes a surface add light to whatever it covers instead of covering it: glows, flames, light shafts and sparks brighten and never darken. It draws as a transparent surface (no depth write), so it doesn't hide what's behind it.

API Reference

Material

A physically based material. Start from a preset and override any field.

PropertyTypeDefaultDescription
bandsinteger (2 to 8)—Number of light bands for toon shading (2-8, default 3).
blendBlend—How the surface combines with what is behind it: normal (default) or add (light: glows, flames, shafts and sparks brighten what they cover and never darken it).
clearcoatnumber (0 to 1)—Clear lacquer layer strength, 0..1.
colorColor—Base color (albedo).
emissiveColor—Emitted light color (glows with bloom).
emissive_intensitynumber (0 to 100)—Emission strength multiplier.
emissive_mapTextureMap—Image multiplied into emissive (signs, screens, lit windows). Set emissive (white is fine) for it to glow.
iornumber (1 to 3)—Index of refraction used with transmission.
iridescencenumber (0 to 1)—Thin-film iridescence strength, 0..1 (holographic looks).
mapTextureMap—Image multiplied into color (sRGB; its alpha multiplies opacity). Mapped with the geometry's UVs.
metalnessnumber (0 to 1)—0 = dielectric, 1 = metal.
opacitynumber (0 to 1)—Overall opacity, 0..1.
outlineOutline—Draw a solid silhouette outline around meshes using this material.
presetMaterialPreset—Starting point; every other field overrides the preset value.
roughnessnumber (0 to 1)—0 = mirror, 1 = fully diffuse.
shadingShading—Lighting model: pbr (default), flat (faceted matte, like three.js flatShading) or toon (banded matte).
surfaceSurface—Procedural surface detail: noise-driven colour, roughness and bump (gravel, rock, rust, stucco). Solid 3D noise, so no UVs or seams.
transmissionnumber (0 to 1)—Glass-like light transmission, 0..1.
unlitboolean—Unlit/flat shading (ignores lights).
waterWater—Water: moving waves and a mirror reflection of the scene above it. Put it on a flat, horizontal plane (one water level per scene); color is the deep water colour.
wireframeboolean—Render as wireframe.

MaterialPreset

Curated, tuned material looks.

ValueDescription
"matte_clay"
"glossy_plastic"
"chrome"
"brushed_metal"
"gold"
"glass"
"frosted_glass"
"ceramic"
"velvet"
"neon"
"holographic"
"toon"
"gravel"
"rock"
"weathered_paint"
"stucco"

Shading

How a material responds to light.

ValueDescription
"pbr"Physically based (metalness/roughness, reflections).
"flat"Matte, one normal per face: low-poly, faceted look.
"toon"Matte with hard light bands (cel shading).

Outline

A silhouette outline (inverted hull), in world units.

PropertyTypeDefaultDescription
colorColor"#1a1a1a"Outline colour.
widthnumber (0 to 1)0.03Thickness in world units.

Surface

Procedural surface detail on top of a PBR material. color is the second colour the pattern mixes in (stones, rust, stains).

PropertyTypeDefaultDescription
bumpnumber (0 to 2)0.5Bump strength, 0..2.
colorColor—Second colour (defaults to a darker, warmer take on the base colour).
contrastnumber (0 to 1)0.5How sharply the two colours separate, 0..1.
pattern*SurfacePatternrequiredThe procedural pattern: gravel, rock, rust, stucco and more.
roughness_variationnumber (0 to 1)0.3How much roughness varies with the pattern, 0..1.
scalenumber (0.001 to 1000)—Feature size in world units (default per pattern).
seedinteger0Seed for the pattern's noise.

SurfacePattern

Built-in procedural patterns.

ValueDescription
"noise"Soft fbm blotches: dirt, stains, sand.
"gravel"Packed pebbles with dark gaps (voronoi): gravel lots, desert floor.
"rock"Layered, ridged stone with strata: cliffs, boulders.
"rust"Rust patches and streaks eating through paint: weathered metal.
"stucco"Fine bumpy plaster: walls.

Blend

Blend mode of a material.

ValueDescription
"normal"
"add"