stf.material¶
[ Schema | Category: Data ]
Represents a material for 3d surfaces.
Implementations¶
Blender |
bpy.types.Material |
|
Godot |
Material |
|
Unity |
Material |
|
Three.js |
MeshStandardMaterial |
Properties¶
Main¶
type¶
required Constant: "stf.material"
style_hints¶
optional Type: array<string>
Hints for the visual style of the material.
Example:
[
"realistic",
"pbr"
]
shader_targets¶
optional Type: object<string, array<string>>
Hints for the target shaders per target application. If multiple target shaders are specified, the first available should be used.
Example:
{
"blender": [
"ShaderNodeBsdfPrincipled"
],
"unity": [
".poiyomi/Poiyomi Toon",
"Standard"
]
}
properties¶
required Type: object<string, Material Property Values Object>
Example:
{
"albedo.texture": {
"type": "image",
"values": [
{
"image": 0
}
]
},
"albedo.color": {
"type": "color",
"values": [
[
0.78,
0.45,
0.78,
1.0
]
]
},
"specular.intensity": {
"type": "float",
"values": [
0.8
]
},
"decals.alphablend": {
"type": "float",
"values": [
1.0,
0.4,
0.2
]
}
}
Material Property Values Object¶
One of:¶
Float Property Values¶
type¶
required Constant: "float"
values¶
required Type: array<number>
Int Property Values¶
type¶
required Constant: "int"
values¶
required Type: array<integer>
Color Property Values¶
type¶
required Constant: "color"
values¶
required Type: array<array<number>>
Image Property Values¶
type¶
required Constant: "image"
values¶
required Type: array<Image Reference Object>
Image Reference Object¶
image¶
required Type: Resource-Ref
Resource Reference. The referenced resource must import into an image usable as a texture.
Json Example:¶
{
"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"
]
}