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.

Unit Vector Compression的更多相关文章

  1. AIZU AOJ 2309 Vector Compression 最小树形图(朱—刘算法)

    题意简述:给定若干个相同维度的向量,寻找一种排序方法,使得所有向量的表示长度总和最低. 所谓表示长度为(Aj-r*Ai)^2,其中i<j  数据范围:向量总数和维度均小于100 思路:(1)首先 ...

  2. [UE4]不精准射击 Random Unit Vector in Cone in Radians

  3. Vector Math for 3D Computer Graphics (Bradley Kjell 著)

    https://chortle.ccsu.edu/VectorLessons/index.html Chapter0 Points and Lines (已看) Chapter1 Vectors, P ...

  4. DirectX:Vector

    Tag DirectX下的博客主要用于记录DirectX的学习过程,主要参考<DirectX 12 3D 游戏实战开发>. Vector in DirectX Shader的编写离不开数学 ...

  5. 壁虎书8 Dimensionality Reduction

    many Machine Learning problems involve thousands or even millions of features for each training inst ...

  6. Fundamentals of Computer Graphics 中文版(第二版) (Peter Shirley 著)

    1 引言 2 数学知识 3 光栅算法 4 信号处理 5 线性代数 6 矩阵变换 7 观察 8 隐藏面消除 9 表面明暗处理 10 光线追踪 11 纹理映射 12 完整的图形流水线 13 图形学的数据结 ...

  7. Computer Generated Angular Fisheye Projections [转]

    Computer GeneratedAngular Fisheye Projections Written by Paul Bourke May 2001 There are two main ide ...

  8. 位姿检索PoseRecognition:LSH算法.p稳定哈希

    位姿检索使用了LSH方法,而不使用PNP方法,是有一定的来由的.主要的工作会转移到特征提取和检索的算法上面来,有得必有失.因此,放弃了解析的方法之后,又放弃了优化的方法,最后陷入了检索的汪洋大海. 0 ...

  9. 现代3D图形编程学习-基础简介(3)-什么是opengl (译)

    本书系列 现代3D图形编程学习 OpenGL是什么 在我们编写openGL程序之前,我们首先需要知道什么是OpenGL. 将OpenGL作为一个API OpenGL 通常被认为是应用程序接口(API) ...

随机推荐

  1. MySQL学习笔记之二---引擎介绍MyISAM VS InnoDB

    前言 MyISAM是MySQL的默认数据库引擎(5.5版之前),由早期的ISAM(Indexed Sequential Access Method:有索引的顺序访问方法)所改良.虽然性能极佳,但却有一 ...

  2. javaWeb 开发的成长路线

    感觉最近技术到了一个瓶颈,好长时间没有感觉进步了,本着活到老学到老的态度,笔者就去逛了下,看看前辈们写的文章,觉得他们写的非常不错,在这里特别贴出一张特别值得收藏的图片,不是说其他总结的图片不值得收藏 ...

  3. 留用 未验证 js适配根字体大小

    方法一:<script>                (function (doc, win) {                var docEl = doc.documentElem ...

  4. java算法 第七届 蓝桥杯B组(题+答案) 9.取球博弈

    9.取球博弈  (程序设计) 两个人玩取球的游戏.一共有N个球,每人轮流取球,每次可取集合{n1,n2,n3}中的任何一个数目.如果无法继续取球,则游戏结束.此时,持有奇数个球的一方获胜.如果两人都是 ...

  5. 什么是响应式编程——响应式Spring的道法术器

    响应式编程之道 1.1 什么是响应式编程? 在开始讨论响应式编程(Reactive Programming)之前,先来看一个我们经常使用的一款堪称“响应式典范”的强大的生产力工具——电子表格. 举个简 ...

  6. 无法修改SQL Server 服务名称

    之前安装数据库的时候,默认的是机器名A,然后装完后我设置过数据库发布即[复制]里面的[本地发布] 后来我又把机器名改了,但是平时登陆数据库都是用ip登陆的 今天我要设置一个新的发布,但是发现只能用实例 ...

  7. (转)Docker镜像中的base镜像理解

    base 镜像有两层含义: 不依赖其他镜像,从 scratch 构建. 其他镜像可以之为基础进行扩展. 所以,能称作 base 镜像的通常都是各种 Linux 发行版的 Docker 镜像,比如 Ub ...

  8. [c++] final override keyword

    the two keyword are aimed at virtual function final final function must be a virtual funtion , final ...

  9. linux ubuntu 各目录大小

    /home 45k /bin 8.7M /lib 370M /mnt 4.1k /run 36k /sbin 11M /tmp 41k /usr/share 770M

  10. TensorFlow全新的数据读取方式:Dataset API入门教程

    TensorFlow.data : http://tech.ifeng.com/a/20171109/44752505_0.shtml Pytorch:https://ptorch.com/docs/ ...