Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed scale and offsets in the model file #6

Closed
GoogleCodeExporter opened this issue May 13, 2015 · 12 comments
Closed

Embed scale and offsets in the model file #6

GoogleCodeExporter opened this issue May 13, 2015 · 12 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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

@GoogleCodeExporter
Copy link
Author

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

  • Added labels: Priority-Critical

@GoogleCodeExporter
Copy link
Author

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

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Issue 19 has been merged into this issue.

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

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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

  • Added labels: Priority-High
  • Removed labels: Priority-Critical

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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
Copy link
Author

This issue was closed by revision r56.

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

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant