---
title: "material.set: Change Material — Scene kit command — Kition"
description: "Changes material `material` (name or id): base color, metallic, roughness, emission, alpha, transmission and more."
canonical: "https://developer.kition.ai/docs/kits/scene/commands/material.set"
---

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

# material.set

**Change Material.** Changes material `material` (name or id): base color, metallic, roughness, emission, alpha, transmission and more.

- Kit: Scene 0.1.0 (.kscene); reference: [Scene kit commands](https://developer.kition.ai/docs/kits/scene.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `alphaCutoff` | `number` | no | clip: the alpha below which the surface is not there (0.5) |
| `alphaMode` | `"opaque" \| "clip" \| "blend"` | no | How the base colour's alpha is used |
| `baseColor` | `number[] \| string` | no | Base colour |
| `emission` | `number[] \| string` | no | Emission colour |
| `emissionStrength` | `number` | no | Emission strength |
| `ior` | `number` | no | Index of refraction (1.5) |
| `material` | `integer \| string` | yes | The material's id or name |
| `metallic` | `number` | no | 0 to 1 |
| `name` | `string` | no | A new name |
| `normalStrength` | `number` | no | How strongly the normal map bends the surface (1) |
| `roughness` | `number` | no | 0 to 1 |
| `shader` | `integer \| string \| null` | no | A shader group (id or name) giving the surface and volume in path-traced renders, or null to let go of it |
| `transmission` | `number` | no | How much light passes through, 0 to 1 (glass at 1) |

## Call through scene_run

```text
scene_run {
  "path": "<file>.kscene",
  "steps": [{ "command": "material.set", "params": { "material": <integer | string> } }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `alphaCutoff`, `alphaMode`, `baseColor`, `emission`, `emissionStrength`, `ior`, `metallic`, `name`, `normalStrength`, `roughness`, `shader`, `transmission`. scene_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": {
    "alphaCutoff": {
      "description": "clip: the alpha below which the surface is not there (0.5)",
      "type": "number"
    },
    "alphaMode": {
      "description": "How the base colour's alpha is used",
      "enum": [
        "opaque",
        "clip",
        "blend"
      ],
      "type": "string"
    },
    "baseColor": {
      "description": "Base colour",
      "oneOf": [
        {
          "description": "[r, g, b] or [r, g, b, a], linear, 0 to 1",
          "items": {
            "type": "number"
          },
          "type": "array"
        },
        {
          "description": "#rrggbb (sRGB)",
          "type": "string"
        }
      ]
    },
    "emission": {
      "description": "Emission colour",
      "oneOf": [
        {
          "description": "[r, g, b] or [r, g, b, a], linear, 0 to 1",
          "items": {
            "type": "number"
          },
          "type": "array"
        },
        {
          "description": "#rrggbb (sRGB)",
          "type": "string"
        }
      ]
    },
    "emissionStrength": {
      "description": "Emission strength",
      "type": "number"
    },
    "ior": {
      "description": "Index of refraction (1.5)",
      "type": "number"
    },
    "material": {
      "description": "The material's id or name",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Material"
      ]
    },
    "metallic": {
      "description": "0 to 1",
      "type": "number"
    },
    "name": {
      "description": "A new name",
      "type": "string"
    },
    "normalStrength": {
      "description": "How strongly the normal map bends the surface (1)",
      "type": "number"
    },
    "roughness": {
      "description": "0 to 1",
      "type": "number"
    },
    "shader": {
      "description": "A shader group (id or name) giving the surface and volume in path-traced renders, or null to let go of it",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "NodeGroup"
      ]
    },
    "transmission": {
      "description": "How much light passes through, 0 to 1 (glass at 1)",
      "type": "number"
    }
  },
  "required": [
    "material"
  ],
  "type": "object"
}
```

Generated from the command list of @kition/scene-darwin-arm64@0.1.0 and the kit itself (scene_commands through @kition/cli@0.1.1, built from KitionAI/kition-scene@4d06faf).
