SuguruSasaki / webgl-loader

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

Embed scale and offsets in the model file #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This is to be able to reconstruct original size and world location of the model.

For the moment, this has to go in a different channel (for three.js we dump 
scale and offsets to console in compressor and copy-paste it into our loader), 
it would be nice if UTF8 file was self-contained.

Original issue reported on code.google.com by postfil...@gmail.com on 13 Aug 2011 at 1:45

GoogleCodeExporter commented 8 years ago
Yeah, I need to really figure out a good way to deal with metadata v. data. I'm 
thinking of having a JSON header at the beginning of the model that gets 
extracted. Or coming up with a container format that's otherwise JS-friendly.

Original comment by wonchun on 13 Aug 2011 at 7:55

GoogleCodeExporter commented 8 years ago
Oh, and really, things like the bit-allocation should be user-driven. This is 
definitely related to the texcoord issue.

Original comment by wonchun on 13 Aug 2011 at 8:15

GoogleCodeExporter commented 8 years ago

Original comment by wonchun on 13 Aug 2011 at 8:30

GoogleCodeExporter commented 8 years ago

Original comment by wonchun on 14 Aug 2011 at 5:43

GoogleCodeExporter commented 8 years ago

Original comment by wonchun on 18 Aug 2011 at 3:45

GoogleCodeExporter commented 8 years ago
Issue 19 has been merged into this issue.

Original comment by wonchun on 5 Sep 2011 at 9:46

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
So there are larger issues about what the _right_ thing to do is, but the 
_quick_ thing is to just dump out some JSON. That should be pretty easy to do 
(so easy, you can do it yourself if you don't want to wait for me).

Stagedown, also please check the existing issues before you post a new one, and 
try to keep the content of your posts content-full.

Original comment by wonchun on 5 Sep 2011 at 10:14

GoogleCodeExporter commented 8 years ago
It is not ideal, but r31 helps the situation by dumping some useful JSON to 
stdout. Check the change description for more details on how to use the JSON to 
reconstruct the original scale and position of the source mesh.

Original comment by wonchun on 6 Sep 2011 at 12:26

GoogleCodeExporter commented 8 years ago
That's really not ideal solution. Did you plan to improve situation and make 
coordinates support builded into models?

And how we can use this json? I don't mean "subtracting" or "multiplying", we 
read this in revision log message, i mean practically, how we can apply this 
json to converted models?

Original comment by stagedown@gmail.com on 6 Sep 2011 at 8:26

GoogleCodeExporter commented 8 years ago
I know it isn't ideal, but something is better than nothing, I hope! Here's a 
quick suggestion; some variant might work better. You can collect all the JSON 
output for each mesh into a dict, where the key is the URL. Then your loader 
goes through all the URLs, and applies the offset/scale transform either to the 
attributes themselves or to a matrix transform.

And yeah, I definitely plan on doing something better. I just need to figure 
out _what_. If you have suggestions, please contribute.

Original comment by wonchun on 6 Sep 2011 at 5:27

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r56.

Original comment by wonchun on 11 Oct 2011 at 10:36