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.
Unit Vector Compression的更多相关文章
- AIZU AOJ  2309 Vector Compression 最小树形图(朱—刘算法)
		
题意简述:给定若干个相同维度的向量,寻找一种排序方法,使得所有向量的表示长度总和最低. 所谓表示长度为(Aj-r*Ai)^2,其中i<j 数据范围:向量总数和维度均小于100 思路:(1)首先 ...
 - [UE4]不精准射击 Random Unit Vector in Cone in Radians
 - Vector Math for 3D Computer Graphics (Bradley Kjell 著)
		
https://chortle.ccsu.edu/VectorLessons/index.html Chapter0 Points and Lines (已看) Chapter1 Vectors, P ...
 - DirectX:Vector
		
Tag DirectX下的博客主要用于记录DirectX的学习过程,主要参考<DirectX 12 3D 游戏实战开发>. Vector in DirectX Shader的编写离不开数学 ...
 - 壁虎书8 Dimensionality Reduction
		
many Machine Learning problems involve thousands or even millions of features for each training inst ...
 - Fundamentals of Computer Graphics 中文版(第二版) (Peter Shirley 著)
		
1 引言 2 数学知识 3 光栅算法 4 信号处理 5 线性代数 6 矩阵变换 7 观察 8 隐藏面消除 9 表面明暗处理 10 光线追踪 11 纹理映射 12 完整的图形流水线 13 图形学的数据结 ...
 - Computer Generated Angular Fisheye Projections [转]
		
Computer GeneratedAngular Fisheye Projections Written by Paul Bourke May 2001 There are two main ide ...
 - 位姿检索PoseRecognition:LSH算法.p稳定哈希
		
位姿检索使用了LSH方法,而不使用PNP方法,是有一定的来由的.主要的工作会转移到特征提取和检索的算法上面来,有得必有失.因此,放弃了解析的方法之后,又放弃了优化的方法,最后陷入了检索的汪洋大海. 0 ...
 - 现代3D图形编程学习-基础简介(3)-什么是opengl (译)
		
本书系列 现代3D图形编程学习 OpenGL是什么 在我们编写openGL程序之前,我们首先需要知道什么是OpenGL. 将OpenGL作为一个API OpenGL 通常被认为是应用程序接口(API) ...
 
随机推荐
- PHP - 脚本退出(包括异常退出),执行指定代码
			
之前做聊天室的时候有那么个需求就是当用户异常断线的时候就应该清除她的在线状态.因为当时对于flush不够了解,尝试了各种办法,好像都没办法在我们开发机上面执行相应的代码.后来知道是flush的原因.我 ...
 - kittle 使用心得
			
1,字体编码格式: 解析excel表格时,出现乱码,两处修改:1, 2,
 - pom----Maven内置属性及使用
			
Maven共有6类属性: 内置属性(Maven预定义,用户可以直接使用) ${basedir}表示项目根目录,即包含pom.xml文件的目录; ${version}表示项目版本; ${project. ...
 - iOS学习之UIPickerView控件的关联选择
			
接上篇iOS学习之UIPickerView控件的简单使用 接着上篇的代码 http://download.csdn.net/detail/totogo2010/4391870 ,我们要实现的效果如下: ...
 - java程序员应该熟悉的20个有用的库(转)
			
优秀且经验丰富的Java开发人员的一个特点是API的广泛知识,包括JDK和第三方库.我花了很多时间学习API,特别是在阅读Effective Java 3rd Edition之后,Joshua Blo ...
 - hibernate 反向生实体类 and 为什么老是多一个id
			
hibernate 反向生实体类 and 为什么老是多一个id 2017年04月01日 20:32:51 阅读数:548
 - 优化mysql slave的同步速度
			
测试环境:Red Hat Enterprise Linux Server release 6.3 (Santiago)Server version: 5.6.22-log MySQL Communit ...
 - 面向对象的JavaScript-009-闭包
			
引自:https://developer.mozilla.org/cn/docs/Web/JavaScript/Closures 闭包是指能够访问自由变量的函数 (变量在本地使用,但在闭包中定义).换 ...
 - Python监控日志程序-乾颐堂
			
一个简易的日志监控的脚本,功能如下:1.windows环境2.当匹配日志关键字时会发出声音,匹配的关键字不同,播放的声音不同3.能做到实时响应 注意:是在win环境下哦 直接上代码吧 1 2 3 4 ...
 - mosquitto配置通过ssl通信
			
mosquitto配置通过ssl通信 摘自https://www.cnblogs.com/stin/p/9258211.html 注意项: For openssl >= 1.0.1 the va ...