---
title: "material.set: Material Options — Motion kit command — Kition"
description: "Sets material options on 3D `layers` at `time`: `castsShadows` and `acceptsShadows` (off, on, only), `acceptsLights`, reflections, `baseColor`, `metallic` and `roughness` (percents 0 to 100, a primitive's), `emissive`, and a card's specular and light transmission. Fails when no given layer has an option named."
canonical: "https://developer.kition.ai/docs/kits/motion/commands/material.set"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/motion/commands/material.set](https://developer.kition.ai/docs/kits/motion/commands/material.set)

# material.set

**Material Options.** Sets material options on 3D `layers` at `time`: `castsShadows` and `acceptsShadows` (off, on, only), `acceptsLights`, reflections, `baseColor`, `metallic` and `roughness` (percents 0 to 100, a primitive's), `emissive`, and a card's specular and light transmission. Fails when no given layer has an option named.

- Kit: Motion 0.1.0 (.kmotion); reference: [Motion kit commands](https://developer.kition.ai/docs/kits/motion.md)
- Changes the document: yes
- Acts on: `layers` (a list of ids), which a run step’s `on` fills

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `acceptsLights` | `boolean` | no |  |
| `acceptsShadows` | `"off" \| "on" \| "only"` | no |  |
| `ambient` | `number` | no |  |
| `appearsInReflections` | `boolean` | no |  |
| `baseColor` | `string \| number[]` | no |  |
| `castsShadows` | `"off" \| "on" \| "only"` | no |  |
| `comp` | `integer \| string` | no | read by the command beside its listed parameters |
| `diffuse` | `number` | no |  |
| `emissive` | `string \| number[]` | no |  |
| `layer` | `integer \| string` | no | read by the command beside its listed parameters |
| `layers` | `(integer \| string)[]` | no |  |
| `lightTransmission` | `number` | no |  |
| `metal` | `number` | no |  |
| `metallic` | `number` | no |  |
| `roughness` | `number` | no |  |
| `specularIntensity` | `number` | no |  |
| `specularShininess` | `number` | no |  |
| `time` | `number` | no |  |

## Call through motion_run

```text
motion_run {
  "path": "<file>.kmotion",
  "steps": [{ "command": "material.set" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `acceptsLights`, `acceptsShadows`, `ambient`, `appearsInReflections`, `baseColor`, `castsShadows`, `comp`, `diffuse`, `emissive`, `layer`, `layers`, `lightTransmission`, `metal`, `metallic`, `roughness`, `specularIntensity`, `specularShininess`, `time`. motion_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "acceptsLights": {
      "type": "boolean"
    },
    "acceptsShadows": {
      "enum": [
        "off",
        "on",
        "only"
      ],
      "type": "string"
    },
    "ambient": {
      "type": "number"
    },
    "appearsInReflections": {
      "type": "boolean"
    },
    "baseColor": {
      "oneOf": [
        {
          "description": "#rrggbb",
          "type": "string"
        },
        {
          "description": "[r, g, b(, a)] 0 to 1",
          "items": {
            "type": "number"
          },
          "type": "array"
        }
      ]
    },
    "castsShadows": {
      "enum": [
        "off",
        "on",
        "only"
      ],
      "type": "string"
    },
    "comp": {
      "description": "read by the command beside its listed parameters",
      "oneOf": [
        {
          "description": "comp's item id as motion_inspect lists it",
          "type": "integer"
        },
        {
          "description": "the item id as receipts print it (\"1\"), or the comp's name",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Item"
      ]
    },
    "diffuse": {
      "type": "number"
    },
    "emissive": {
      "oneOf": [
        {
          "description": "#rrggbb",
          "type": "string"
        },
        {
          "description": "[r, g, b(, a)] 0 to 1",
          "items": {
            "type": "number"
          },
          "type": "array"
        }
      ]
    },
    "layer": {
      "description": "read by the command beside its listed parameters",
      "oneOf": [
        {
          "description": "layer id as motion_inspect lists it (when no layer has that id, its 1-based stack position)",
          "type": "integer"
        },
        {
          "description": "layer id as receipts print it (\"51\"), a layer name, or #n for the n-th from the top",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Layer"
      ]
    },
    "layers": {
      "items": {
        "oneOf": [
          {
            "description": "layer id as motion_inspect lists it (when no layer has that id, its 1-based stack position)",
            "type": "integer"
          },
          {
            "description": "layer id as receipts print it (\"51\"), a layer name, or #n for the n-th from the top",
            "type": "string"
          }
        ]
      },
      "type": "array",
      "x-khp-index": "#",
      "x-khp-index-numbers": true,
      "x-khp-name": "name",
      "x-khp-types": [
        "Layer"
      ]
    },
    "lightTransmission": {
      "type": "number"
    },
    "metal": {
      "type": "number"
    },
    "metallic": {
      "type": "number"
    },
    "roughness": {
      "type": "number"
    },
    "specularIntensity": {
      "type": "number"
    },
    "specularShininess": {
      "type": "number"
    },
    "time": {
      "type": "number"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/motion-darwin-arm64@0.1.0 and the kit itself (motion_commands through @kition/cli@0.1.1, built from KitionAI/kition-motion@4719aa7).
