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.

  • 相关阅读:
    bootstrapValidator重新校验/全选回显
    mybatis遍历map参数查询
    location.href传json字符串
    springmvc异步处理
    intellIJ IDEA学习笔记3
    intellIJ IDEA学习笔记2
    intellIJ IDEA学习笔记
    maven国内镜像
    Docker版本Jenkins的使用
    Docker容器网络
  • 原文地址:https://www.cnblogs.com/len3d/p/4015039.html
Copyright © 2011-2022 走看看