stf.material

Implementations

Blender

bpy.types.Material

Resource

Unity

Material

Resource
Default Processor

Godot

Material

Resource

Properties

Key

Required

Type

Description

style_hints

No

List[string]

Hints on the visual style of the material

shader_targets

No

Map[List[string]]

Hints on the target shader per target application

properties

Yes

Map[string, Property-Object]

Map of Property-ID as a string to an Object

Property-IDs can be freely chosen by users.
If an implementations happens to support a Property-ID with its Property-Object’s type, it will be used.

Property-Object properties

Key

Required

Type

Description

type

No

String

Type of the value variables

values

No

List[Value-Variable]

List of values. The value object is determined by the type

The following types for property-values are supported:

float

Json float value

int

Json int value

color

Json array of four floats, corresponding to the RGBA color channels.

image

An Image-Property-Value-Object:

Key

Required

Type

Description

image

Yes

Resource-ID

ID of an stf.image or compatible resource.

TODO: the image object should be expanded with UV-offsets and such

Json Example

"0060c2b8-d856-4459-a88a-16e659792e6f": {
	"type": "stf.material",
	"name": "Body",
	"properties": {
		"albedo.texture": {
			"type": "image",
			"values": [
				{
					"image": 0
				}
			]
		},
		"roughness.texture": {
			"type": "image",
			"values": [
				{
					"image": 1
				}
			]
		},
		"metallic.texture": {
			"type": "image",
			"values": [
				{
					"image": 2
				}
			]
		},
		"normal.texture": {
			"type": "image",
			"values": [
				{
					"image": 3
				}
			]
		}
	},
	"style_hints": [
		"realistic",
		"pbr"
	],
	"shader_targets": {
		"blender": [
			"ShaderNodeBsdfPrincipled"
		]
	},
	"referenced_resources": [
		"f518a35d-d788-4692-a2dd-84d036d259e8",
		"edc8188f-7d85-419c-967f-5f7b427d8288",
		"5761ccd4-55bd-4fa5-ac98-f3d32004ac9e",
		"746f1aa1-5287-4d57-8892-e26fe631b953"
	]
}