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) ...
随机推荐
- mybatis 传入集合参数遍历 查询总结
出自:http://blog.csdn.net/u013628152/article/details/51184641 1. findByIds(List ids) 如果参数的类型是List, 则在使 ...
- MySQL Innodb 神秘消失
问题描述: 早晨接到 Zabbix 报警,提示 Host: 10.10.1.2, MySQL 主从同步失败. 登录服务器查看具体情况. shell > mysql mysql> show ...
- json和jsonp的区别(转)
原文链接:http://www.cnblogs.com/dowinning/archive/2012/04/19/json-jsonp-jquery.html 前言: 说到AJAX就会不可避免的面临 ...
- 第五章 大数据平台与技术第11讲 MapReduce编程
在大规模的数据当中,需要分发任务,需要进行分布式的并行编程.Hadoop这样一种开源的大数据分析平台. Map阶段 Reduce阶段:相同的键把它聚集到一起之后,然后通过Reduce方式把相同的键聚集 ...
- haproxy 配置 说明
一.环境说明实验环境OS CentOS5.4192.168.0.14 proxy192.168.0.24 web1192.168.0.64 web2 官方地址:http://hapr ...
- yaml文件转properties和properties转yaml
首先要引入依赖 <dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> <artif ...
- 泛型、反射和抽象工厂结合解决多DB问题
- 633E Binary Table
传送门 分析 我们发现n特别小,所以可以从这里入手 我们记录出所有列中某一种状态的列有多少个 我们再记录出每种列最少有多少个1(原来的1的个数和取反后的个数去最小值) 于是我们可以得出对于所有列异或一 ...
- a Concise Sparse Matrix package
简明稀疏矩阵包 https://github.com/kulhanek/csparse https://github.com/kulhanek/csparse
- es学习-索引别名
别名不能重复,也不能喝索引名称重复.(一个索引可以创建多个别名) 语法: 添加一个别名: url:POST http://192.168.0.108:9200/_aliases/ 参数: { &quo ...