Add loaders for OBJ+MTL and new UTF8 format #2399

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@angelxuanchang
Contributor
  • Add loader for OBJ+MTL files.
  • Add loader for updated version of UTF8 format.
  • Fix SceneUtils.cloneObject to also copy source.useVertexTexture for SkinnedMesh.
@angelxuanchang angelxuanchang Add loader for .obj files with textures, and newer version of UTF8 lo…
…ader.

Fix cloneObject to also copy source.useVertexTexture for SkinnedMesh.
5b2d8fb
@mrdoob
Owner
mrdoob commented Sep 9, 2012

Wow... This looks great!
Will have a closer look tomorrow :)

@alteredq
Contributor
alteredq commented Sep 9, 2012

@angelxuanchang Do you have a working compressor for this newer version of UTF8 format?

Long ago I wasn't able to compile it anymore on my Windows system, so that's kinda why UTF8 release tracking stopped.

If you have working compressor executable it would be good to add it somewhere here (also with sources), so that we would have match between compressor and loader:

https://github.com/mrdoob/three.js/tree/dev/utils/exporters/utf8

Edit: I tried the latest webgl-loader sources (r104). I'm able to compile the compressor (all 3 versions) and it seems to work ;).

@alteredq alteredq added a commit to alteredq/three.js that referenced this pull request Sep 10, 2012
@alteredq alteredq Added example of how to use new version of UTF8 format with UTF8v2Loa…
…der.

See #2399
1e24a04
@angelxuanchang
Contributor

I'm happy to hear that the latest webgl-loader is working for you. Sorry that I didn't include any examples for the OBJ/MTL or UTF8v2 loaders, but I see you are working on that. The MTLLoader only interprets a subset of MTL options, but I'm sure it can be improved if needed. Let me know if there are any issues.

@alteredq
Contributor

Looks pretty good so far. There are some small things here and there (e.g. what looks like dependencies on jquery), but we'll fix them as we keep using it.

Nice job, it's great you revisited UTF8 format, it's now in much better shape ;).

@mrdoob I guess we could drop old UTF8 support eventually. I don't know how much was it used in the wild. I think one of these model viewing / sharing sites used UTF8 though not sure they didn't cook up completely custom solution.

Or maybe we should keep both and use it for learning how to deal with external format updates. I expect Won will keep working on it, so there'll be differences later on.

@alteredq alteredq added a commit to alteredq/three.js that referenced this pull request Sep 10, 2012
@alteredq alteredq Removed jquery dependencies from MTLLoader and OBJMTLLoader. Cleaned …
…up code a bit, reformatted whitespace. Added example.

See #2399
12eecef
@mrdoob
Owner
mrdoob commented Sep 11, 2012

@mrdoob I guess we could drop old UTF8 support eventually. I don't know how much was it used in the wild. I think one of these model viewing / sharing sites used UTF8 though not sure they didn't cook up completely custom solution.

I would replace it right away really. If someone is using UTF8 format they probably know what they're doing. The less things we have to think about or update the better.

@mrdoob
Owner
mrdoob commented Sep 11, 2012

Merge in the dev branch.
Thanks a ton @angelxuanchang!

@mrdoob mrdoob closed this Sep 11, 2012
@alteredq
Contributor

I would replace it right away really. If someone is using UTF8 format they probably know what they're doing. The less things we have to think about or update the better.

Yup, just wanted to make sure a new way works, which now it should. I'll clean up the old stuff.

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