-
Notifications
You must be signed in to change notification settings - Fork 108
/
format_reference.acl.sjson
277 lines (224 loc) · 8.15 KB
/
format_reference.acl.sjson
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
// Raw clip filenames should have the form: *.acl.sjson
// Note: a clip raw file isn't a true valid javascript file. It uses simplified json syntax.
// Compressed clip filenames should have the form: *.acl.zip
// Note: a compressed clip is just a zipped raw clip.
// Each file contains the information of a single clip or track list (but not both).
// The ACL file format version
// version = 1 // Initial version
// version = 2 // Introduced clip compression settings
// version = 3 // Introduced additive clip related data
// version = 4 // Introduced track list related data
version = 5 // Renamed enums for 2.0 and other related changes
// BEGIN CLIP RELATED DATA
// Clip general information.
// Optional, if present clip settings, bones, and tracks must be present as well.
// Must come first, before settings, bones, and tracks
clip =
{
// Clip properties can come in any order
// Clip name, handy for debugging. Optional, filename will be used if missing.
name = "A clip"
// Number of samples per track. All tracks must have the same number of samples.
// Clip duration in seconds = (num_samples - 1) / sample_rate
// Regardless of sample_rate, if we have a single sample, we have a 0.0 duration
// and thus represent a static pose.
num_samples = 73
// Clip sample rate in samples per second. All tracks must have the same sample rate.
sample_rate = 30
// Whether floating point values are stored in hexadecimal and thus binary exact. Optional, defaults to 'false'.
// Introduced in version 2.
is_binary_exact = true
// Additive format of base clip, if present. Optional, defaults to 'none'.
// Introduced in version 3.
additive_format = "none"
// The additive base clip name. Optional, defaults to empty string.
// Introduced in version 3.
additive_base_name = "A base clip"
// The additive base clip num samples. Optional, defaults to 0.
// Introduced in version 3.
additive_base_num_samples = 1
// The additive base clip sample rate. Optional, defaults to 1.
// Introduced in version 3.
additive_base_sample_rate = 30
}
// Optional clip compression settings.
// Must come before bones
settings =
{
// The name of the algorithm to use. See function get_algorithm_type(..)
// Defaults to 'uniformly_sampled'
algorithm_name = "uniformly_sampled"
// The rotation, translation, and scale formats to use. See functions get_rotation_format(..) and get_vector_format(..)
// Defaults to raw: 'quatf_full' and 'vector3f_full'
rotation_format = "quatf_full"
translation_format = "vector3f_full"
scale_format = "vector3f_full"
// Settings used when segmenting clips
// Optional
segmenting = {
// How many samples to try and fit in our segments
// Defaults to '16'
ideal_num_samples = 16
// Maximum number of samples per segment
// Defaults to '31'
max_num_samples = 31
}
// Threshold angle value to use when detecting if a rotation track is constant
// Defaults to '0.00284714461' radians
// DEPRECATED, NO LONGER USED OR NECESSARY
constant_rotation_threshold_angle = 0.00284714461
// Threshold value to use when detecting if a translation track is constant
// Defaults to '0.001' centimeters
// DEPRECATED, NO LONGER USED OR NECESSARY
constant_translation_threshold = 0.001
// Threshold value to use when detecting if a scale track is constant
// Defaults to '0.00001'
// DEPRECATED, NO LONGER USED OR NECESSARY
constant_scale_threshold = 0.00001
// The error threshold used when optimizing the bit rate
// Defaults to '0.01' centimeters
// DEPRECATED, NO LONGER USED OR NECESSARY
error_threshold = 0.01
}
// Reference clip skeleton, list of bones (any order)
// Must come before tracks
bones =
[
{
// Bone properties can come in any order
// Bone name
name = "root"
// Parent bone. An empty string denotes the root bone, there can be multiple root bones
// There must be a root bone
// Parent bones must be listed before their children
parent = ""
// Virtual vertex distance used by hierarchical error function
vertex_distance = 1.0
// Bind pose transform information. All three are optional
// The bind pose should be in parent bone local space
bind_rotation = [ 0.0, 0.0, 0.0, 1.0 ]
bind_translation = [ 0.0, 0.0, 0.0 ]
bind_scale = [ 1.0, 1.0, 1.0 ]
}
{
name = "bone1"
parent = "root"
vertex_distance = 1.0
}
]
// Animation data, list of clip tracks (any order)
tracks =
[
{
// Track properties can come in any order
// Bone name
name = "root"
// Rotation track, optional
// The rotations should be in parent bone local space
rotations =
[
[ 0.0, 0.0, 0.0, 1.0 ]
[ 1.0, 0.0, 0.0, 0.0 ]
// The number of samples here must match num_samples
]
// Translation track, optional
// The translations should be in parent bone local space
translations =
[
[ 0.0, 0.0, 0.0 ]
[ 1.0, 0.0, 0.0 ]
// The number of samples here must match num_samples
]
// Scale track, optional
// The scales should be in parent bone local space
scales =
[
[ 1.0, 1.0, 1.0 ]
[ 1.0, 1.0, 1.0 ]
// The number of samples here must match num_samples
]
}
]
// END CLIP RELATED DATA
// BEGIN TRACK LIST RELATED DATA
// List general information.
// Optional, if present clip settings and tracks must be present as well.
// Must come first, before settings and tracks
track_list =
{
// Track list properties can come in any order
// List name, handy for debugging. Optional, filename will be used if missing.
name = "A clip"
// Number of samples per track. All tracks must have the same number of samples.
// List duration in seconds = (num_samples - 1) / sample_rate
// Regardless of sample_rate, if we have a single sample, we have a 0.0 duration
// and thus represent a static snapshot.
num_samples = 73
// List sample rate in samples per second. All tracks must have the same sample rate.
sample_rate = 30
// Whether floating point values are stored in hexadecimal and thus binary exact. Optional, defaults to 'false'.
is_binary_exact = true
}
// Optional list compression settings.
// Must come before tracks
settings =
{
}
// List of raw tracks
tracks =
[
{
// Track properties can come in any order
// Track name, optional
name = "Right Hand IK"
// Track type (float1f, float2f, float3f, float4f)
type = float4f
// The precision target used when optimizing the bit rate
// Defaults to '0.0001' units
precision = 0.0001
// The constant track detection threshold
// Defaults to '0.00001' units
// DEPRECATED, NO LONGER USED OR NECESSARY
constant_threshold = 0.00001
// 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' (0xFFFFFFFF) will strip the track
// from the compressed data stream. Output indices must be unique and contiguous.
// Defaults to the track index
output_index = 12
// The track index of our parent track
// Transforms only
parent_index = 2
// The shell distance of the transform's error metric
// Transforms only
shell_distance = 3.0
// The constant rotation detection threshold
// Transforms only
// DEPRECATED, NO LONGER USED OR NECESSARY
constant_rotation_threshold_angle = 0.1
// The constant translation detection threshold
// Transforms only
// DEPRECATED, NO LONGER USED OR NECESSARY
constant_translation_threshold = 0.1
// The constant scale detection threshold
// Transforms only
// DEPRECATED, NO LONGER USED OR NECESSARY
constant_scale_threshold = 0.1
// Bind pose transform information. All three are optional
// The bind pose should be in parent bone local space
bind_rotation = [ 0.0, 0.0, 0.0, 1.0 ]
bind_translation = [ 0.0, 0.0, 0.0 ]
bind_scale = [ 1.0, 1.0, 1.0 ]
// Track data
// The number of samples here must match num_samples
data =
[
// Scalar tracks are of the form: [ x, y, z, .. ] with one entry per scalar component
[ 0.0, 0.0, 0.0, 1.0 ]
[ 1.0, 0.0, 0.0, 0.0 ]
// Transform tracks are of the form: [ [ rot.x, rot.y, rot.z, rot.z ], [ trans.x, trans.y, trans.z ], [ scale.x, scale.y, scale.z ] ]
// All three parts must be present and cannot be omitted
]
}
]
// END TRACK LIST RELATED DATA