Skeletal animation Properties panel (Information for programmers)

The section explains the Frame format and Quantization quality items in the Skeletal animation Properties panel.

These settings are items of interest to application programmers.

Differences in operations between frame format and standard format

This is a description of the difference between frame format binary output and standard format binary output.

Frame format

In frame format, when animation is configured to any of the X,Y, Z components, then all the components are output in the binary data that is exported.

Curve evaluation results are entered for components for which an animation is configured. A copy of the bind pose value in the .cskla file is inserted for components for which an animation is not configured.

All components are therefore written into the model in every frame.

Consider the example where animation is configured for the X component of Scale but there is no animation for Translate.

In this case, the the X, Y, Z components of Scale will be written to the model in every frame. None of the Translate elements will be written.

Standard format

A bind pose value is not included in standard format binary data.

Only components for which an animation is configured are written into models. Other components are not changed.

As a result, the bind pose value in the .cmdl file is used for components for which an animation is not configured.

Note: Due to the above differences caused by each format when using binary output, behavior will not match if the bind pose differs between the model and the animation.

The reason that skeleton data is included in both is because this allows optimization and binary output using the .cskla file alone.

Quantization Quality

This section describes the internal operations of quantization.

The term quantization in this case refers to the quantization of key data.

A tolerance value is set internally for each level of quantization quality. The quantization format is selected automatically to satisfy this tolerance.

Relation to NW4R settings values

NW4R allows the user to directly set tolerance values.

If you are referring to these values when setting the quantization quality you need to keep the following point in mind:

In the case of the value set for Rotate (and just this case), in NW4R the value set by the user is internally changed and used.
The referenced values thus need to be interpreted differently from the values set in CreativeStudio.
The correspondence is as follows:
CreativeStudio tolerance value = 20 x NW4R tolerance value.

Automatic Selection Algorithm

Animation curve quantization is performed on all applicable quantization formats.

At set frame intervals (described below), the curve is evaluated before and after quantization and the evaluated values used to determine the error.

The maximum error value is taken as the error for the curve overall.

If the curve error is less than the acceptable tolerance, then that format passes the test.

Among the formats that pass this test, the one with the smallest volume is the one that gets selected for use.

Rotate curves

Evaluated using absolute error.

The absolute value for the difference in evaluated values is used as the error.

Scale, Translate curves

Evaluated using relative error.

The (absolute value for the difference in evaluated values) ÷ (maximum amplitude of the curve) is used as the error.

Quantization Format Types

There are eight types: FVSS128, FVSS64, FVSS48, FVS96, FVS48, FVS32, FV64 and FV32.

The number at the end of the format name indicates the per-key data size, expressed in units of bits.

Note: For details about the formats, see the ResFloatKey~Data structure in Library/include/nw/anim/res/anim_ResAnimCurve.h.

Frame Interval

The value that is used for the frame interval when performing error evaluations is the value of Frame Precision, which is one of the export settings of the DCC tool.

In other words, a curve that is baked to a higher precision also undergoes detailed error evaluation.

Note: There is a bug in version 1.0.1 and earlier versions of CreativeStudio that causes the above-described information to be deleted when the intermediate file is saved.
If the information is not available, then the error evaluations are performed at a frame interval of 1.0.
Thus, for data defining detailed movement in a small number of frames, we recommend that you re-export the data and then conduct quantization.

Checking the Format

You can use the Console panel to check which format has been selected for use.

In the console version, specify the command line option --verbose to export to standard output.

Setting the Acceptable Tolerance

Note: The settings values shown below may change in the future.

Table 1 Setting the tolerance (Scale / Translate)

Quantization quality Acceptable Tolerance Values Comments
0 Always quantize to minimum volume format.
1 0.40 --
2 0.30 --
3 0.20 --
4 0.10 --
5 0.06 --
6 0.03 --
7 0.01 --
8 0.005 --
9 0 Never quantize.

Table 2 Setting the tolerance (Rotate)

Quantization quality Acceptable Tolerance Values Comments
0 Always quantize to minimum volume format.
1 0.50 --
2 0.40 --
3 0.30 --
4 0.20 --
5 0.10 --
6 0.05 --
7 0.01 --
8 0.005 --
9 0 Never quantize.

CONFIDENTIAL