siebeneicher / webgl-loader

Automatically exported from code.google.com/p/webgl-loader
0 stars 0 forks source link

Utf8 model got 'deviance' at UV seam? #40

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, I'm working in a project use Three.js with your webgl-loader (utf8).

Your extension is super amazing with about 20 time smaller, i never can imagine 
that, but when i almost done my project so i realize this problem: 

Utf8 model got 'deviance' at UV seam? 

Please look at this question i'm asking in Stackoverflow: 

    http://stackoverflow.com/questions/22129257/utf8-model-got-deviance-at-uv-seam

Can you see and fix this problem please, i'm waiting for this to publish my 
project?  

Thank you very very much.

Original issue reported on code.google.com by user972...@gmail.com on 4 Mar 2014 at 2:38

GoogleCodeExporter commented 9 years ago
tl;dr: there's a potential workaround by fudging decodeOffsets.

Cross-posted here: 
https://github.com/mrdoob/three.js/issues/4526#issuecomment-36589012

Yeah, so there's a bug in the float quantization, where things can be off by 
half a quantized bucket. It is most visible in texture seams, because you can 
have arbitrarily bad errors when your texcoords are off, whereas positions and 
normals have visible errors proportional to numerical error (which is actually 
quite small).

Note that even fixing float quantization won't necessarily completely fix this 
problem; the real solution is to basically morph the texture from the float UVs 
to the quantized UVs.

Unfortunately, I'm traveling a lot this month, and won't be able to directly 
address this issue. One bit of advice: you can minimize the look of the seam by 
hacking the JSON manifest file. decodeOffsets are usually 0 for UVs. Try making 
it some small fractional value, like something from +/- 0.25-0.75 as a 
workaround. Sorry! This is the best I can do for now.

Original comment by wonchun on 4 Mar 2014 at 9:13