zoukankan      html  css  js  c++  java
  • Unit Vector Compression

    Recently, I compared a few methods for compressing generic unit vectors.

    The method used in Cry Engine 3 for compressing normal vectors is irrelevant here, because it has a limitation that the z component cannot be -1. Since it's only designed for view space normal vectors, those vectors should not point away from the view. However, in our system, we need to handle compression of generic unit vectors, whose directions can be arbitrary.

    Below are results generated from a unit test with 10,000,000 random unit vectors for each:

    Quantized Spherical Coordinates in Jensen's Photon Map (16 bits):

    Max. Error: 1.57047
    Avg. Error: 0.711124

    Optimized Spherical Coordinates (16 bits)

    Max. Error: 0.562332
    Avg. Error: 0.30557

    Half Precision Spherical Coordinates (32 bits):

    Max. Error: 0.118694
    Avg. Error: 0.0324938


    Optimized Spherical Coordinates (24 bits):

    Max. Error: 0.0484566
    Avg. Error: 0.0158454

    In conclusion, the method described in "Encoding Normal Vectors using Optimized Spherical Coordinates" provides the best precision with the same number of bytes.

  • 相关阅读:
    面向对象的软件测试技术
    软件质量与软件测试
    测试方法
    测试计划的编写
    Monkey环境配置
    简单非线性关系数据集测试
    支持向量机
    最邻近规则分类
    Django1.9开发博客(14)- 集成Xadmin
    决策树
  • 原文地址:https://www.cnblogs.com/len3d/p/4015039.html
Copyright © 2011-2022 走看看