Skip to content
marika edited this page Mar 10, 2020 · 10 revisions

AET files are used within Project DIVA games to manage Auth 2D (the 2D subsystem) through a generic interface. This includes both layout and animations of SCRs, among other things.

As AET is directly tied to Adobe After Effects, the terminology for it is used within this document.

Name

The "AE" is almost guaranteed to stand for After Effects, however the "T" is unknown, likely being related to the "P" in After Effects Project files.

Header

Offset Length Description
0x0 0x4 Header size, self-inclusive
0x4 0x4 Pointer to Compositions pointer table
0x8 0x4 Pointer to Composition names pointer table
0xc 0x4 Pointer to Composition SCR Names array
0x10 [0x0] - 0x10 Padding
[0x0] 0x4 Number of Compositions

Composition SCR Names

Compositions use a table of names to refer to the different SCRs that Sprites within them use to define their contents, where each Sprite refers to an index within this table.

Offset Length Description
0x0 0x4 Pointer to first used name pointer table entry
0x4 0x4 Pointer to last used name pointer table entry

Composition

Compositions are used to define a self-contained timeline and set of Layers.

Offset Length Description
0x0 0x4 Timeline start frame number float
0x4 0x4 Timeline end frame number float
0x8 0x4 Timeline frames per second float
0xc 0x4 Unknown float, typically 0
0x10 0x4 Width, in pixels
0x14 0x4 Height, in pixels
0x18 0x4 Padding
0x1c 0x4 Number of Layer Levels
0x20 0x4 Pointer to Layer Levels array
0x24 0x4 Number of Sprite Groups
0x28 0x4 Pointer to Sprite Group array
0x2c 0x5 Padding
  • Width is always one of the following:
    • 320 (3DS bottom screen width)
    • 400 (3DS top screen width)
    • 1200 (exclusive to PV lines)
  • Height is always one of the following:
    • 240 (3DS top and bottom screen height)
    • 720 (exclusive to PV lines)

Layer Level

Layer Levels are used to define a single "level" of Layers, which Layers in other Layer Levels use as their Layer Children.

Offset Length Description
0x0 0x4 Number of Layers
0x4 0x4 Pointer to Layers array

It's not entirely clear why Layer Levels exist, and reading them can be quite cumbersome. The process is detailed below:

  • Read each Layer Level's Layers, storing their file pointer alongside them.
  • Read each Layer's Layer Children, but instead of reading the Layers directly, match the pointer to the child to a Layer from one of the previously read Layer Level's Layers.

It is of course also possible to instead directly read the Layer Children, but this drastically increases the read time, as many Layers are read upwards of hundreds of times over. When using the above method, each Layer is only read once, and references are used instead of copies.

Layer

Layers are used to define the contents of a Composition.

Offset Length Description
0x0 0x4 Name pointer
0x4 0x4 Timeline start frame number float
0x8 0x4 Timeline end frame number float
0xc 0x4 Unknown float, whole numbers, typically 0.0
0x10 0x4 Timeline speed percentage float
0x14 0x2 Unknown, flags?
0x16 0x1 Unknown, only ever 0x02 and 0x03
0x17 0x1 Type
0x18 0x4 Source pointer
0x1c 0x4 Unknown Layer pointer
0x20 0x4 Number of Markers
0x24 0x4 Markers array pointer
0x28 0x4 Properties pointer
0x2c 0x4 Padding

The animation timeline frame numbers are relative to the containing Scene's and the parent Layer's timelines, accounting for start frame and frame rate.

Layer Type

Layer Types are used to define what a single Layer contains.

Value Type
0x01 Footage, sources a Sprite Group
0x03 Null object, sources Layer Children

Layer Children

Layers can contain children if they are a null object, in which case the children use their parent's Properties as a base. For example, if a child has an opacity of 0.5, and the parent has an opacity of 0.5, then the child would be drawn at opacity 0.25.

Offset Length Description
0x0 0x4 Number of child Layers
0x4 0x4 Child Layers array pointer

The draw order and rules are equivalent to that of After Effects:

  • Children are drawn over their parent.
  • Children are drawn from back to front, with the last child being drawn on the bottom, and the first child being drawn on top.
  • Child positions are relative to their parent's anchor point, but child anchor points are independent.
  • Child scales, rotations, and opacities are relative to their parent's scale, rotation, and opacity, respectively.

Layer Properties

Layer Properties are used to contain the different temporal properties of a Layer and their keyframes.

Offset Length Description
0x0 0x1 Blend Mode
0x1 0x1 Unknown; 0x00 or 0x01, typically 0x00
0x2 0x1 Unknown; 0x00 or 0x01, typically 0x00
0x3 0x1 Padding
0x4 0x8 Anchor point X Keyframes
0xc 0x8 Anchor point Y Keyframes
0x14 0x8 Position X Keyframes
0x1c 0x8 Position Y Keyframes
0x24 0x8 Rotation Keyframes
0x2c 0x8 Scale X Keyframes
0x34 0x8 Scale Y Keyframes
0x3c 0x8 Opacity Keyframes
0x44 0x4 Unknown pointer, sometimes 0x00000000

The anchor point is used to define the base point, relative to the Layer, for transforms. For example, the scale and rotation properties use the anchor point as the center point for their transforms.

  • Scale is in percentage.
  • Rotation is in clockwise degrees.

Note that the anchor point is relative to the scale of the Layer, but the position is in absolute pixels with a top-left origin within the containing Composition.

Layer Blend Mode

Blend modes define how a Layer's colours blend with colours behind it when being drawn.

Value Type
0x03 Normal
0x05 Add
0x06 Unknown, only seen in aet_pv003.bin and aet_pv072.bin
0x0b Unknown, only seen in aet_song.bin

Layer Property Keyframes

Keyframes are used to define different values within a single Layer's timeline that are interpolated between over time to create animations.

Offset Length Description
0x0 0x4 Number of keyframes
0x4 0x4 Keyframes array pointer

The contents of the array varies depending on the number of keyframes:

  • One keyframe: The array is a single float, defining the constant value of the property, and it does not animate.
  • More than one keyframe: The array first contains an array of floats defining the frame numbers at which each keyframe occurs, then another array afterwards defines the values.
    • Where l is the number of keyframes at 0x0:
Offset Length Description
0x0 l * 0x4 Keyframe frame number floats array
l * 0x4 l * 0x8 Keyframe value floats array

The value array contains two floats per entry:

Offset Length Description
0x0 0x4 Value float
0x4 0x4 Unknown float

The second float likely determines the interpolation curve of the keyframe, but it is unclear how.

Marker

Markers are used within Layers to mark points or events within their timeline.

Offset Length Description
0x0 0x4 Frame number float
0x4 0x4 Name pointer

A Marker is almost always named one of the following:

  • ST_IN: Start point of the in transition animation.
  • ED_IN: End point of the in transition animation.
  • ST_LP: Start point of the loop animation.
  • ED_LP: End point of the loop animation.
  • ST_OUT: Start point of the out transition animation.
  • ED_OUT: End point of the out transition animation.
  • ST_SP: Start point of the press animation.
  • ED_SP: End point of the press animation.
  • X: Unknown, only seen twice in PV lines, could be a typo.
  • X1: Unknown, only seen in PV lines, possibly scoring related.
  • X3: See above.
  • X6: See above.
  • BPMNNN: Where NNN is any three digit number, used in PV lines to mark BPM changes.
  • N: Where N is any single digit number, unknown, maybe sprite swapping animation related?
  • CUTNN: Where N is any two digit number, unknown, maybe masking related?

The remaining markers have either empty or broken names from invalid pointers (e.g. \211\346\226ʃM\203C\203Y and \210ȑO\202̃T\203F\201[\203H\210ʒU.) It is unclear whether libmirai is reading this incorrectly, or if the names are simply broken.

Note that the frame number is relative to the containing Layer's timeline.

Sprite Group

As the name implies, Sprite Groups are used to group Sprites. These very rarely contain more than one Sprite, but in such cases are used to create "flip book" style animations.

Offset Length Description
0x0 0x3 Multiply colour? Typically 0xffffff where it could be 0xRRGGBB
0x3 0x1 Padding
0x4 0x2 Width, in pixels
0x6 0x2 Height, in pixels
0x8 0x4 Unknown float, always 0.0 or 1.0
0xc 0x4 Number of Sprites
0x10 0x4 Pointer to Sprite array

Sprite

Sprites are used to describe an SCR that can be drawn to the screen.

Offset Length Description
0x0 0x4 Index of SCR name within the containing Scene
0x4 0x8 Padding
0xc 0x4 Unknown float, always 1.0
0x10 0x4 Unknown float, always 1.0

Occasionally the SCR name index will point to the last name within the containing Scene, which is always , so Sprites can sometimes be null.

Clone this wiki locally