havok 动画压缩
动画压缩
This section describes animation compression features available within the Havok Animation SDK. Without the use of compression the space requirements of animation assets may exhaust the memory resources available in gaming consoles. Animation compression allows for these assets to stored in a compact form which significantly reducing the amount of memory required. The goal of animation compression is to produce a result that is perceptually similar to the raw input animation while achieving a significant savings in the size of the representation.
此章主要描述havok animation SDK中可用的动画压缩功能,如果不用动画压缩的话,动画资源会消耗很多的内存资源。动画压缩可以让资源以紧凑的方式存贮,并明显的减少内存的使用率。动画压缩的目标是同样的动画而更节省的使用资源。
The Havok Animation SDK supports three compression schemes. Each compression technique implements lossy animation compression in which there is a tradeoff between fidelity to the original animation versus the size of the compressed animation in bytes. Each of the compression schemes allows the author control over the settings which define the space verses quality trade off. This trade off is conceptually similar to those encountered in popular "lossy" multimedia file representations for images, video or music. In addition to the trade-off between fidelity and compressed size, there is also a tradeoff between compressed size and decompression speed. Schemes that compress the animation to a smaller size are typically (but not always) slower to decompress.
Havok 动画SDK支持三种压缩方案。每种压缩技术实现了原始动画保真度和压缩程度权衡的有损压缩。每种压缩方案都可以让使用者通过设置达到质量和空间的平衡。这种权衡在概念上类似于流行的“有损”多媒体,比如图片,视频和音乐。同样,这种权衡也是压缩率和解压速度的权衡,一般压缩的越小,解压的效率就越慢!
The three compression schemes are:
三种压缩方案是:
Spline: Provides a good balance of compressed size and decompression speed on all platforms. This is the only scheme that allows you to decompress individual bones. The Spline compression scheme is described in Section 5.1, “Spline Compression”.
样条压缩:在所有的平台都提供了一个好的平衡在压缩大小和解压速度上,这个是唯一的一个方案允许你解压独立的骨骼。详细描述查看5.1节
Quantized: Provides the best decompression speed on platforms with appropriate SIMD support, but the compressed size is not as small as the other schemes. The Quantized compression scheme is described in Section 5.2, “Quantized Compression”.
量化压缩:提供了最快的解压速度在支持SIMD的平台,但是没有其他压缩方案压缩的小。详细描述查看5.2节
Predictive: Provides the smallest compressed size, and decompresses faster than Spline on platforms with appropriate SIMD support. The Predictive compression scheme is described in Section 5.3, “Predictive Compression”.
预测压缩:提供了最小的压缩大小和比spline更快的解压速度在支持SIMD 的平台。
SIMD: (Single Instruction Multiple Data,单指令多数据流)能够复制多个操作数,并把它们打包在大型寄存器的一组指令集,例:3DNow!、SSE。 AMD公司引以为豪的3D NOW! 技术实质就是SIMD,这使K6-2、雷鸟、毒龙处理器在音频解码、视频回放、3D游戏等应用中显示出优异的性能。
All of the compression schemes share the following features:
所有的压缩方案都有以下的功能:
Full control over the accuracy of the approximation.
对逼真的准确性的完整控制!
Smoothly degrading quality from lossless to lossy compression settings.
从有损到无损的压缩设置的平滑支持
Multiple decompression threads may be executed in parallel.
可以并行的多个压缩线程
Optimization for several platforms.
多个平台的优化
Runtime performance statistics for each of the available compression schemes are detailed in the Platform Guide for the appropriate platform. You should carefully consider the decompression speed for your target platform when choosing a compression scheme.
每个可用的压缩计划适当的平台,在平台指南“中有详细的运行时性能统计。您应仔细考虑您的目标平台的解压缩速度来选择合适的压缩方案。
5.4. Example Compression Ratios 压缩比率示例
The following table provides the compression statistics for 15 example animations using an error threshold of 0.0001 for all channels. The skeleton and animations have 38 bones. The total uncompressed size of the animations is 3146 KB.