PASTEDOWN   221   0
   416 2.47 KB    17

Animation format

By Synthbot
Created: 2021-09-18 08:17:45
Updated: 2021-09-18 08:21:00
Expiry: Never
ppp

There is a single Frames table that describes the hierarchy of frame composition. This must be in "frames.parquet" (or other extension depending on the file format). It contains these fields:

  • frameId (primary key), childFrameIds (list, to be rendered in order), transform (matrix, to be applied before rendering)
  • You can render a frame by (1) applying its transformation, then (2) rendering each of its children in sequence. I'll add more columns and instructions here as I work more with mask layers, and potentially other things necessary to get the animation right.

There must be at least one Shapes table. These describe how to render images, which are cached copies of certain frames. This must be in a "*.shapes.parquet" (the asterisk can be anything). It contains these fields:

  • frameId (primary key), format-specific data
  • The frameId specifies which frame this is a cached copy of.
  • For our SVG spritemaps, this would be: frameId, spritemapFilename, svgObjectPrefix, positionX, positionY, width, height, originX, originY, rescale
  • ... This includes all the details for where a shape is within a spritemap and how to render it as a frame. I'll probably call it svgsprites.shapes.parquet.

There's an optional Assets table, which describes how frames are structured to form an animation. This should be in "assets.parquet". It contains these fields:

  • assetId, layerIndex, frameIndex, frameId
  • Each assetId forms a table (a row for each layerIndex, a column for each frameIndex, a frameId in each cell). You can render a single frame for a given assetId by rendering each corresponding layer (a column of the table) in layerIndex sequence. You can render the animation for a single asset by rendering each frame in frameIndex sequence.
  • Each animation clip is given its own assetId ("file://animation_filename"). You can render the clip by rendering each of its frames like any other asset.
  • It's optional because we'll want to render AI-generated frames without requiring the AI to create entries in this table.

We might add more data, like a table for all of the character assets. This should be in "*.data.parquet" (the asterisk can be anything except frames or assets). The exact fields can vary. To attach data to a frame, each row should contain a frameId column. To attach data to an asset, each row should contain an assetId. At some point, I'll convert Clipper's symbol labels (whether a symbol corresponds to a character, whether the symbol is clean or noisy) into a table like this.


Pony Preservation Project - /mlp/con 2021

by Synthbot

Pony Preservation Project - /mlp/con 2020

by Synthbot

Preservation Project History - 2020 to 2021

by Synthbot

Missing music

by Synthbot

Animation format

by Synthbot