content_create_material
Creates and saves a surface Material asset in the live Flax Editor at a Content-relative .flax path, generating missing folders and failing if the asset already exists.
Instructions
Creates a surface Material asset through the live Flax Editor and saves it. relativePath is relative to Content/ and ends in .flax. The tool does not overwrite: it fails when an asset exists at that path. It creates missing folders. The editor does not record an Undo step. Texture ids are asset GUIDs of 32 hex digits: get them from content_search. normalTextureId must be a texture that is imported as a normal map. For glass, water or film, use content_create_material_transparent. For a variant of an existing material, use content_create_material_instance.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"relativePath": "<relativePath>",
"baseColor": "<baseColor>",
"roughness": "<roughness>",
"metallic": "<metallic>"
},
"name": "content_create_material"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metallic | Yes | Surface metallic value in the 0-1 range. | |
| uvTiling | No | Optional positive UV tiling applied to supplied textures. | |
| baseColor | Yes | Uniform RGBA base color, with every component in the 0-1 range. | |
| roughness | Yes | Surface roughness in the 0-1 range. | |
| relativePath | Yes | Destination path relative to Content/, ending in .flax. | |
| emissiveColor | No | Optional emissive RGBA color, with every component in the 0-1 range. | |
| normalTextureId | No | Optional normal-map FlaxEngine.Texture GUID. | |
| baseColorTextureId | No | Optional FlaxEngine.Texture GUID used for base color. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metallic | Yes | ||
| uvTiling | Yes | ||
| baseColor | Yes | ||
| roughness | Yes | ||
| materialId | Yes | ||
| parameters | Yes | ||
| mainThreadId | Yes | ||
| materialPath | Yes | ||
| emissiveColor | Yes | ||
| normalTextureId | Yes | ||
| baseColorTextureId | Yes |