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.

  • 相关阅读:
    robotframework中文日志显示乱码
    flask学习
    RF元素定位的例子
    rf增加产品的例子
    Django如何重设Admin密码
    c++ ,类型转换
    new,delete和malloc,free以及allocator<T>
    疑问记录本
    c 字符串常用函数
    递归和栈溢出。
  • 原文地址:https://www.cnblogs.com/len3d/p/4015039.html
Copyright © 2011-2022 走看看