Skip to content

acl/core/track_desc.h

#include "acl/core/track_desc.h"

The descriptions of scalar tracks and transform tracks.

track_desc_scalarf

struct track_desc_scalarf

This structure describes the various settings for floating point scalar tracks. Used by: float1f, float2f, float3f, float4f, vector4f

track_desc_scalarf::category

track_category8 category = track_category8::scalarf;

The track category for this description.

track_desc_scalarf::output_index

uint32_t output_index = k_invalid_track_index;

The track output index. When writing out the compressed data stream, this index will be used instead of the track index. This allows custom reordering for things like LOD sorting or skeleton remapping. A value of k_invalid_track_index will strip the track from the compressed data stream. Output indices must be unique and contiguous.

track_desc_scalarf::precision

float precision = 0.00001F;

The per component precision threshold to try and attain when optimizing the bit rate. If the error is below the precision threshold, we will remove bits until we reach it without exceeding it. If the error is above the precision threshold, we will add more bits until we lower it underneath.

Defaults to 0.00001

track_desc_scalarf::is_valid

error_result is_valid() const

Returns whether a scalar track description is valid or not. It is valid if:

  • The precision is positive or zero and finite

track_desc_transformf

struct track_desc_transformf

This structure describes the various settings for transform tracks. Used by: quatf, vqvf

track_desc_transformf::category

track_category8 category = track_category8::transformf;

The track category for this description.

track_desc_transformf::default_value

rtm::vqvf default_value = rtm::vqv_identity();

Default tracks are cheaper than constant or animated tracks because they are not stored inside the compressed clip. It is the responsibility of the code that decompresses to ensure that default sub-tracks are properly handled. By default, we assume that default sub-tracks are constant and equal to their identity value. If another value is more commonly used by animation clips getting compressed (e.g. the bind/reference pose), it makes sense to use it as the default sub-track value. This will reduce the memory footprint but whatever value you use must be provided during decompression. See track_writer::get_default_rotation_mode() & friends. Note that if you do not use the identity here, compressed tracks will not contain the required data to be able to reconstruct the original tracks on their own: the implementation will have to provide the default sub-track values (whether constant or variable per sub-track).

track_desc_transformf::output_index

uint32_t output_index = k_invalid_track_index;

The track output index. When writing out the compressed data stream, this index will be used instead of the track index. This allows custom reordering for things like LOD sorting or skeleton remapping. A value of k_invalid_track_index will strip the track from the compressed data stream. Output indices must be unique and contiguous.

track_desc_transformf::parent_index

uint32_t parent_index = k_invalid_track_index;

The index of the parent transform track or k_invalid_track_index if it has no parent.

track_desc_transformf::precision

float precision = 0.01F;

The shell precision threshold to try and attain when optimizing the bit rate. If the error is below the precision threshold, we will remove bits until we reach it without exceeding it. If the error is above the precision threshold, we will add more bits until we lower it underneath. Note that you will need to change this value if your units are not in centimeters.

Defaults to 0.01 centimeters

track_desc_transformf::shell_distance

float shell_distance = 3.0F;

The error is measured on a rigidly deformed shell around every transform at the specified distance.

Defaults to 3.0 centimeters

track_desc_transformf::constant_rotation_threshold_angle

float constant_rotation_threshold_angle = 0.00284714461F;

Threshold angle when detecting if rotation tracks are constant or default. See the rtm::quatf quat_near_identity for details about how the default threshold was chosen. You will typically NEVER need to change this, the value has been selected to be as safe as possible and is independent of game engine units.

Defaults to 0.00284714461 radians

Deprecated

Replaced by error metric, to be removed in v3.0

track_desc_transformf::constant_translation_threshold

float constant_translation_threshold = 0.001F;

Threshold value to use when detecting if translation tracks are constant or default. Note that you will need to change this value if your units are not in centimeters.

Defaults to 0.001 centimeters.

Deprecated

Replaced by error metric, to be removed in v3.0

track_desc_transformf::constant_scale_threshold

float constant_scale_threshold = 0.00001F;

Threshold value to use when detecting if scale tracks are constant or default. There are no units for scale as such a value that was deemed safe was selected as a default.

Defaults to 0.00001

Deprecated

Replaced by error metric, to be removed in v3.0

track_desc_transformf::padding

uint32_t padding = 0;

Unused padding.

track_desc_transformf::is_valid

error_result is_valid() const

Returns whether a transform track description is valid or not. It is valid if:

  • The precision is positive or zero and finite
  • The shell distance is positive or zero and finite
  • The constant rotation threshold angle is positive or zero and finite
  • The constant translation threshold is positive or zero and finite
  • The constant scale threshold is positive or zero and finite