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

推荐订阅源

MongoDB | Blog
MongoDB | Blog
Recorded Future
Recorded Future
Jina AI
Jina AI
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
F
Fortinet All Blogs
人人都是产品经理
人人都是产品经理
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research
L
LangChain Blog
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
The GitHub Blog
The GitHub Blog
Vercel News
Vercel News
博客园 - 【当耐特】
雷峰网
雷峰网
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
I
InfoQ
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News
Security Latest
Security Latest
有赞技术团队
有赞技术团队
L
Lohrmann on Cybersecurity
P
Proofpoint News Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
P
Privacy & Cybersecurity Law Blog
Scott Helme
Scott Helme
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
Hacker News - Newest:
Hacker News - Newest: "LLM"
NISL@THU
NISL@THU
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
B
Blog RSS Feed
Cyberwarzone
Cyberwarzone
K
Kaspersky official blog
F
Full Disclosure
Martin Fowler
Martin Fowler
Spread Privacy
Spread Privacy
D
Docker
C
Cisco Blogs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page

博客园 - 千里马肝

模型数据作渲染优化时遇到的问题 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以内,这样就不会因为变态数值而影响到正常的数值了。