惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
S
Securelist
博客园 - Franky
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
IT之家
IT之家
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
The Cloudflare Blog
云风的 BLOG
云风的 BLOG
N
News and Events Feed by Topic
AI
AI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Schneier on Security
Schneier on Security
Attack and Defense Labs
Attack and Defense Labs
Vercel News
Vercel News
腾讯CDC
Google DeepMind News
Google DeepMind News
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
Netflix TechBlog - Medium
量子位
S
Schneier on Security
Hacker News: Ask HN
Hacker News: Ask HN
Cyberwarzone
Cyberwarzone
S
Security Affairs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
N
News and Events Feed by Topic
T
Tenable Blog
PCI Perspectives
PCI Perspectives
MyScale Blog
MyScale Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cyber Attacks, Cyber Crime and Cyber Security
W
WeLiveSecurity
N
News | PayPal Newsroom
P
Proofpoint News Feed
O
OpenAI News
C
CERT Recently Published Vulnerability Notes
B
Blog
Cisco Talos Blog
Cisco Talos Blog
Microsoft Security Blog
Microsoft Security Blog
V
Visual Studio Blog
MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
A
Arctic Wolf
Y
Y Combinator Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Spread Privacy
Spread Privacy

博客园 - 千里马肝

模型数据作渲染优化时遇到的问题 depth and distance Linear or non-linear shadow maps? 实施vertex compression所遇到的各种问题和解决办法 【转】編譯Ogre1.9 IOS Dependencies及Ogre Source步驟及相關注意事項… 画之国 Le tableau (2011) 关于H.264 x264 h264 AVC1 解决Visual Studio 2010/2012的RC4011 warnings 解决Visual Studio 2010/2012在调试时lock文件的方法 神片和神回复 3DS Max 2014 features revealed 【西川善司】PLAYSTATION4图形讲座(后篇) [ 【西川善司】PLAYSTATION4图形讲座(前篇) 趣文:程序员/开发人员的真实生活 【转】25 things you probably didn't know about the 3ds Max SDK [讣告]“D之食卓”等代表作制作人饭野贤治逝世 楚汉传奇 【翻译】揭晓「Agni's Philosophy」幕后的"技术编" 【PS3/XB360】DEAD OR ALIVE 5 制作采访
vertex compression所遇到的问题
千里马肝 · 2014-03-21 · via 博客园 - 千里马肝

对于数据压缩,其实就是把浮点的32位精度,改用16位定点数来表达。

例如0.0 = 0,1.0 = 32767,-1.0 = -32767

这是一种有损压缩,会丢失一些精度,一般情况下是可以接受的。

当浮点数是-1至+1的范围,即-32767至+32767。

这时问题出现了,如果浮点的范围是几万,那么一些浮点如果是小数位后几位的数值,压缩后会变成0。

例如:0.0123,在上述情况下,最终存在unsigned short中其实是0或者1,解压后也是0。

发现问题的起因是手上有一个奇葩的模型数据,它的某一组UV竟然有3千万的大小,而其他的UV则是正常范围的几十或者是0-1。

压缩后,出现大面积的纹理走样。

通过思考后,发现原因是美术手上有一张大小可能是几十的贴图,他想贴到一个几十万甚至几百万单位大小的模型上,于是就简单粗暴得将UV值设置为很大。

但是其实想一想,即使再大一点的贴图,例如1000x1000大小的图,这时使用3千万的UV数值,这张图最后在屏幕上显示时只会变成纯色。

于是解决办法是在导出时,如果发现有这种奇葩数值,首先是红色LOG警告,然后将UV数值钳制在100以内,这样就不会因为变态数值而影响到正常的数值了。