stf.material¶
Properties¶
Key |
Required |
Type |
Description |
---|---|---|---|
style_hints |
No |
List |
Hints on the visual style of the material |
shader_targets |
No |
Dict<List |
Hints on the target stader per target application |
properties |
Yes |
Dict<String, Property-Object> |
Dict of Property-ID as a string to an Object |
Property-Object properties¶
Key |
Required |
Type |
Description |
---|---|---|---|
type |
No |
String |
Type of the value variables |
values |
No |
List |
List of values. The value object is determined by the |
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 |
TODO: the image object should be expanded with UV-offsets and such
Implementations¶
Json Example¶
"bdf11d99-70d2-42df-8a58-19f1e5238662": {
"type": "stf.material",
"name": "Body",
"style_hints": [
"realistic",
"pbr"
],
"shader_targets": {
"stfblender": [
"ShaderNodeBsdfPrincipled"
],
"unity": [
"PoiyomiToon"
]
},
"properties": {
"albedo.texture": {
"type": "image",
"values": [
{
"image": "1bf800ea-1bda-491c-ba89-c7bfa364e239"
}
]
},
"roughness.texture": {
"type": "image",
"values": [
{
"image": "155888f8-041c-4fe7-bf57-a558bd7b2137"
}
]
},
"metallic.texture": {
"type": "image",
"values": [
{
"image": "937ef22d-5175-4c4b-aa89-51da4c445dd4"
}
]
},
"normal.texture": {
"type": "image",
"values": [
{
"image": "e0c8e0ce-f667-49cc-b39a-5fb2dcde48ee"
}
]
}
}
}