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. Java枚举类的serialVersionUID

    起因 最近在公司里敲代码的时候偶然间发现以前留下的枚举类实现了Serializable接口,然后写了个serialVersionUID...我以前一直没在枚举类里使用过..觉得有点神奇....于是百度 ...

  2. Yum -y update 报错

    问题描述: 操作系统:CentOS 6.5 今天服务器上执行 yum -y update 命令时,提示: Running rpm_check_debug ERROR with rpm_check_de ...

  3. python打开浏览器的三种方法

    1.startfile方法 import os os.startfile("C:\Program Files (x86)\Google\Chrome\Application\chrome.e ...

  4. 产品负责人(Product Owner)的主要职责和技能

    角色介绍 产品负责人以下简称PO,他是有授权的产品领导力核心,组成Scrum团队三个角色之一. PO担任的是产品经理的角色. PO的主要职责 1.对产品的ROI负责. ROI = profitabil ...

  5. objective-C 的内存管理之-实例分析

    objective-C 的内存管理之-实例分析 注:这是<Objective-C基础教程>一书上的实例,但是原书限于篇幅,分析得比较简单,初次阅读看得比较费劲,这里展开详细讨论一下. 场景 ...

  6. Django实现支付宝付款和微信支付

    支付宝支付和微信支付是当今互联网产品常用的功能,我使用Django Rest Framework实现了网页上支付宝支付和微信支付的一个通用服务,提供rpc接口给其他服务,包括获取支付宝支付页面url的 ...

  7. Scala开发Hadoop示例

    import org.apache.hadoop.conf.{Configuration, Configured}; import org.apache.hadoop.util.{ToolRunner ...

  8. keepalived和zookeeper对比

    https://blog.csdn.net/vtopqx/article/details/79066703keepalived与zookeeper都可以用来实现高可用,高可用一般跟负载均衡会一起考虑, ...

  9. ShaderLab

    [ShaderLab] Shader is the root command of a shader file. Each file must define one (and only one) Sh ...

  10. 这几天搞UNITY遇到的坑

    都是在IPHONE设备上遇到的,UNITY版本是5.4.4f1 1.EASY AR出现扫描蓝线绿块的,是因为不是EASY AR的CameraDeviceBehavior默认参数1280X720 2.自 ...