STF Format

STF is a file format for 3D assets, intended for interchange between 3D modeling-tools and game-engines.

Concept

STF files are made up of a binary header, a Json definition and a set of binary buffers.

The Json definition contains meta information, resources and buffer references.
Resources have a type property, and are identified by a unique ID as a string.

STF implementations provide resource-handlers, which convert between STF resources of a specific type and a specific application resource.
I.e. a resources-handler for stf.mesh in the Blender STF implementation would convert the STF-resource to and from Blenders bpy.types.Mesh.

A set of resources-handlers that any valid STF implementation has to provide is specified in Core Resources.

STF implementations must provide an easy to use plugin system for resources-handlers. If in any way possible, resources-handlers should be hot-loadable at runtime.

Format Properties

  • The file extension for stf files is .stf.

  • The media-type for stf binary files is model/stf+binary.

  • The STF binary header is stored in little endian byte order.

  • The Json definition is encoded as utf8.

  • STF uses the same coordinate system as glTF 2.0. (See glTF-2.0. coordinate-system-and-units)

Binary Format

An STF binary file consists of a binary header, a json-definition, and zero or more binary buffers.

STF binary file layout

Length (Bytes)

Content

4

Magic number: STF0

4

STF binary format version major

4

STF binary format version minor

4

Number of buffers, including the Json definition buffer

8 * {number of buffers}

Buffer lengths in bytes

{length of all buffers}

Buffers

The Json definition is the first and only required buffer.

Json Definition

The root Json element is an object. It contains 3 properties: stf, resources and buffers.

Json Types

The following special Json-types are specified:

Resource-ID

  • For core resources:
    A string that is the key of a resource in the resources object.

  • For other resources:
    An int that is the index of in the referenced_resources array of the resource.
    The string at that index is the key of a resource in the resources object.

Buffer-ID

  • For core resources:
    A string that is the key to a buffer in the buffers object.

  • For other resources:
    An int that is the index of in the referenced_buffers array of the resource.
    The string at that index is the key of a buffer in the buffersobject.

Resource-Path

A Json array which contains Resource-IDs and other path elements needed to target a specific resource. As some resources may be instantiated multiple times, this is needed to resolve one specific instance.

stf object

The stf object holds meta information.

Properties:

stf object properties

Key

Required

Type

Description

version

Yes

list

List of two integers, specifying the major and minor version of the STF files Json definition.

root

Yes

Resource-ID

ID of the root resource

asset_info

No

Asset-Info-Object

Meta information such as authors, license or documentation link.

asset_properties

No

Map<String, String>

User defined properties

generator

No

String

The name of the STF implementation that created this file.

timestamp

No

String

ISO 8601 date and time in UTC.

metric_multiplier

No

Float

Which number represents one meter. The default value is 1.0.

Asset-Info-Object

Key

Required

Type

Description

asset_name

No

String

version

No

String

url

No

String

author

No

String

license

No

String

license_url

No

String

documentation_url

No

String

The root resource must be a stf.prefab. It represents the assets scene-hierarchy.

stf object example

"stf": {
	"version": [
		0,
		0
	],
	"root": "a6452f90-3edb-4fcd-bfe5-f7860a1ea665",
	"asset_info": {
		"asset_name": "Default Cube"
	},
	"asset_properties": {
		"Foo": "Bar"
	},
	"generator": "stf_blender",
	"generator_version": "0.1.0",
	"timestamp": "2026-03-24T10:37:45.230480+00:00",
	"metric_multiplier": 1
}

resources object

The resources object is a map of resource objects identified by an ID.

The various resource objects describe the files actual content. Each resource-type defines arbitrary additional properties.

Resource object base properties:

Resource object base properties

Key

Required

Type

Description

type

Yes

String

Type of the resource.

referenced_resources

No

List

IDs of resources this resource references.

referenced_buffers

No

List

IDs of buffers this resource references.

name

No

String

Display name of the resource.

version

No

Int

Version of this resource. The default value is -1. If a breaking change is made to a resource type, it has to set this property.

degraded

No

Boolean

Has this resource lost information at some point, but retained the same ID. The default is false.

Resources must store all references to other resources and buffers in the referenced_resources and referenced_buffers fields respectively.
If an STF implementation doesn’t support a resource, it will preserve and re-export it along with all its relationships.

Resource Categories

Resources are in one of the following categories: Data, Node, Instance and Component. Each of these categories have additional properties.

The information about what category a resource is, must be known by the resource-type’s implementation and is not contained in STF files itself.

Data

Support for plugins of this category is required.

Data resource base properties:

Data resource base properties

Key

Required

Type

Description

fallback

No

Resource-ID

ID of a resource that should be used in case this one’s type is not supported in this implementation

components

No

List

Component resource IDs

Node

For now only stf.node and stf.bone exist. Support for handler plugins of this category is not required.

Node resource base properties:

Node resource base properties

Key

Required

Type

Description

enabled

No

boolean

True by default

children

No

List

IDs of child-nodes

components

No

List

Component resource IDs

Instance

They represent an instance of a data resource in the scene hierarchy. These include for example mesh or armature instances. Instances can provide data relevant for the instance of the resource, such as an armatures pose or meshes blendshape value or material assignments. An instance resource can be referenced only once by a Node resource. Support for handler plugins of this category is required.

Instance resource properties:

Instance resource base properties

Key

Required

Type

Description

enabled

No

boolean

True by default

Component

They Represents additional functionality or information for Data and Node resources. A component resource can be referenced only once by a Data or Node resource. Support for handler plugins of this category is required.

Component resource properties:

Component resource base properties

Key

Required

Type

Description

enabled

No

boolean

True by default

exclusion_group

No

string

A group from which an importer will choose the best type to process. This way competing and mutually exclusive solutions can exist within the same file.

resources object example

"resources": {
	"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
					}
				]
			}
		},
		"style_hints": [
			"realistic",
			"pbr"
		],
		"shader_targets": {
			"blender": [
				"ShaderNodeBsdfPrincipled"
			]
		},
		"referenced_resources": [
			"f518a35d-d788-4692-a2dd-84d036d259e8",
			"edc8188f-7d85-419c-967f-5f7b427d8288"
		]
	},
	{
		// ...
	}
}

buffers object

The buffers object is a map of buffer objects identified by an ID. Each buffer object has a type property. Any further properties are defined in the buffer-type’s definition.

For now, stf.buffer.included is the only supported buffer type. Support for hot-loading different buffer-types is not required.

stf.buffer.included

This type represents a buffer contained in the same file.

stf.buffer.included properties:

stf.buffer.included properties

Key

Required

Type

Description

index

Yes

Int

Index of the binary buffer in the file. An index of 0 means the first buffer after the Json definition buffer.

buffers object example

"buffers": {
	"2c04d7f9-96cd-4867-baf3-2a54d4d31a67": {
		"type": "stf.buffer.included",
		"index": 666
	},
	{
		// ...
	}
}

Minimal Definition Example