stf.mesh

[ Schema | Category: Data ]

Represents a skeleton comprised of bones in a 3d hierarchy.

Implementations

Blender

bpy.types.Mesh

Godot

Mesh

Unity

Mesh

Three.js

BufferGeometry

Datamodel

  • Face: Made up of one or more triangles.
    The Material Index exists at this level.

  • Triangle: 3 Face Corners, which can be shared by other triangles of the same face.

  • Face Corner: Reference to a Split, which can be shared by other face corners.

  • Split: References a vertex, which can be shared by other splits, as long as at least one of their other properties (Normal, UV, Color, …) is unique.
    Normals, UVs and colors exist at this level.

  • Vertex: Position
    Blendshapes, weights & vertex groups exist at this level.

Properties

Main

type

required Constant: "stf.mesh"

float_width

optional Type: integer

Default: 4

Byte-width of float-values.

indices_width

optional Type: integer

Default: 4

Byte-width of indices.

material_slots

optional Type: array<Resource-Ref | null>

Array of optional resource references representing the default material resource for each material slot. Which face belongs to which material is defined by the material_indices buffer. These can be overridden by the meshes instance.

vertices

required Type: Buffer-Ref

Buffer reference. Every three float values describe the XYZ components of a vertex.

splits

required Type: Buffer-Ref

Buffer reference. Vertex index for each unique combination of normals, uvs, colors, etc..

split_normals

optional Type: Buffer-Ref

Buffer reference. Every three float values describe the XYZ components of a splits normal vector.

split_colors

optional Type: Buffer-Ref

Buffer reference. Every four float values describe the RGBA color of a split.

face_corners

required Type: Buffer-Ref

Buffer reference. Index of the split for each face corner

tris

required Type: Buffer-Ref

Buffer reference. Every three values describe the face_corner indices that form a triangle.

faces

required Type: Buffer-Ref

Buffer reference. Every uint value describes the number of tris that are part of the same face.

material_indices

optional Type: Buffer-Ref

Buffer reference. Each value is an index for the material_indices, for each face.

sharp_edges

optional Type: Buffer-Ref

Buffer reference. Every two values describe indices of two connected vertices that have explicitly set split normals.

sharp_face_indices

optional Type: Buffer-Ref

Buffer reference. Every values describes the index of a face that has explicitly set split normals.

lines

optional Type: Buffer-Ref

Buffer reference. Every two values describe indices of two vertices that should render as a line.

armature

optional Type: Resource-Ref

Resource reference. If the mesh is rigged, it has to reference an armature resource.

weight_lens_width

optional Type: integer

Default: 1

Byte-width of bone weight float-values.

bone_indices_width

optional Type: integer

Default: 1

Byte-width of bone indices.

bones

optional Type: array<Resource-ID>

The Resource-IDs of the armature’s bones at the index corresponding to the bone_indices buffer.

weight_lens

optional Type: Buffer-Ref

Buffer reference. The number of bone-weights for each vertex.

bone_indices

optional Type: Buffer-Ref

Buffer reference. The bone index for each weight for each vertex. The bone index corresponds to the bones array

weights

optional Type: Buffer-Ref

Buffer reference. The bone weight for each weight for each vertex.

uvs

optional Type: array<UV Channel Object>

An array of objects describing a UV channel.

blendshapes

optional Type: array<Blendshape Object>

Blendshapes

vertex_groups

optional Type: array<Vertex Group Object>

Vertex groups

UV Channel Object

name

optional Type: string

The name of the UV channel

uv

required Type: Buffer-Ref

Buffer reference. Every two float values describe the UV coordinates of a split

Blendshape Object

name

required Type: string

The name of the blendshape

default_value

optional Type: number

Default: 0

limit_upper

optional Type: number

Default: 1

limit_lower

optional Type: number

Default: 0

indices

optional Type: Buffer-Ref

Buffer reference. If the blendshape doesn’t store values for every vertex, this buffer specifies a list of vertex-indices it affects.

position_offsets

required Type: Buffer-Ref

Buffer reference. Every three float values are the XYZ relative offsets for vertex positions. Has offsets for each vertex, of if the indices buffer is present, values for each vertex index.

split_indices

optional Type: Buffer-Ref

Buffer reference. If the blendshape doesn’t store values for every vertex-split, this buffer specifies a list of split-indices it affects.

split_normals

optional Type: Buffer-Ref

Buffer reference. Every three float values are the XYZ normals. Has normals for each split, of if the split_indices buffer is present, values for each split index.

Vertex Group Object

name

optional Type: string

The name of the vertex group

indices

optional Type: Buffer-Ref

Buffer reference. If the vertex group doesn’t store values for every vertex, this buffer specifies a list of vertex-indices it affects.

weights

required Type: Buffer-Ref

Buffer reference. Each float value is the weight for a vertex. Has weights for each vertex, of if the indices buffer is present, weights for each vertex index.

Json Example:

{
    "type": "stf.mesh",
    "name": "Cube",
    "referenced_resources": [
        "ec16a927-1b26-4157-a3f2-71455d05e2bf"
    ],
    "material_slots": [
        0
    ],
    "float_width": 4,
    "indices_width": 1,
    "referenced_buffers": [
        "a2678730-f63c-4415-85a8-9426bfc7242e",
        "be7acc51-f47c-406c-82f6-c7ea7833ed4d",
        "c29e0d3a-9b4d-444b-93f1-e3163332fdcb",
        "d3329a1a-b79a-4d27-b16d-f7af2420951a",
        "97925952-70a7-4773-96fe-00e44d4cdfee",
        "05039913-1397-4f3c-9b54-d514ace748e7",
        "4d86408e-84f5-4f05-86b2-82f3a8803f9d",
        "6cdbf5c5-e770-4bbf-924f-4c10818826e9",
        "e7b0b03d-c004-4876-97a3-c4a26b7ac3c9",
        "ecb6ef8b-618c-4dcd-a0b0-0a0cf70cf143",
        "42a32c5f-edb6-43c3-a028-fa2a75b46671"
    ],
    "vertices": 0,
    "face_corners": 1,
    "splits": 2,
    "split_normals": 3,
    "uvs": [
        {
            "name": "UVMap",
            "uv": 4
        }
    ],
    "tris": 5,
    "material_indices_width": 1,
    "faces": 6,
    "material_indices": 7,
    "sharp_face_indices": 8,
    "lines": 9,
    "sharp_edges": 10,
    "components": [
        "5b09c146-b626-4fb4-a4fa-b33b0e5085e2"
    ]
}