Skip to content

DmrVBM Blender ‐ Vertex Formats

Sandman13sq edited this page Jan 31, 2024 · 2 revisions

Vertex Formats

Vertex Formats Panel

When exporting a model, the attributes to write for each vertex can be customized in a format. Formats are saved per scene, and can be exported to and imported from JSON files.

Format Codes:

  • Native GMS2: POSITION3 COLORBYTES4 UV2
  • Native + Normals: POSITION3 NORMAL3 COLORBYTES4 UV2
  • Rigged + Normals: POSITION3 NORMAL3 COLORBYTES4 UV2 BONE4 WEIGHT4

Format List

This section lists all formats found in the active scene. Click the name of the format in the list to focus on its attributes.

  • The + button adds a format to the list. The - button removes the active format.
  • The Up and Down arrows moves the active format in the list.
  • The X button clears all formats from the scene.

Attribute List

This section lists attributes for the active format. Click the name of the format in the list to view its default values in the field below the list.

  • Click the leftmost icon for an attribute on the list to change the attribute type. The types are:
    • Position - Location of vertex.
    • UV - Texture coordinate per loop.
    • Normal - Surface orientation of vertex
    • Tangent - Vector perpendicular to the normal.
    • Bitangent - Cross product of normal and tangent.
    • Color - Vertex colors as floats.
    • Color Bytes - Vertex colors as 4 bytes
    • Bone Indices - Index of bone from deform vertex groups.
    • Bone Index Bytes - Above as 4 bytes
    • Weights - Weight from deform vertex groups.
    • Weight Bytes - Above as 4 bytes
    • Group Value - Vertex weight value from named vertex group.
    • Group Byte - Above as 1 byte.
    • Padding - A constant value for all vertices
    • Padding Bytes - Above as X bytes
  • Attributes that make use of named layers or groups will show a field to select the layer or group.
    • The choices shown are based on the active object's data.
    • The camera icon sets the layer to which uses the active render layer for that attribute.
    • The camera icon sets the layer to which uses the selected or highlighted layer for that attribute.
    • Color attributes have an sRGB/Linear toggle
      • If enabled, Colors will export as sRGB values. Use when exporting colors.
      • If disabled, Colors will export as Linear values. Use when storing data in color layers.
  • The rightmost number of the attribute list is the number of floats/bytes to write for that attribute
    • Size values are clamped appropriately.
  • The string field below is the format code. It is a string representation of the active format.

Active Attribute Properties

Attributes with extra parameters will show them here.

  • Default value is used when the layer or group cannot be found
    • Default value is always used for padding types