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

Add submesh support #59

Open
abcthomas opened this issue Jan 10, 2019 · 2 comments
Open

Add submesh support #59

abcthomas opened this issue Jan 10, 2019 · 2 comments
Assignees
Labels

Comments

@abcthomas
Copy link

The parser currently only supports separating submeshes via 'usemtl' statements. However a large part of the OBJ format (and meshes in general) is the ability to split meshes into submeshes or 'groups' via the 'g' option.

Without this support the parser will currently provide single arrays of vertex attributes as opposed to separate arrays of attributes per group, for meshes without 'usemtl' statements.

@frenchtoast747 frenchtoast747 self-assigned this Jan 10, 2019
@frenchtoast747
Copy link
Owner

Thanks for bringing this to my attention. I'm not sure how I missed the groups when adding support for MTLs. It's right there in the spec 😞

@abcthomas
Copy link
Author

No problem! It shouldn't be much work I don't think as you've already got most of the logic in from the material support. I think it would be very similar by adding an indicesPerGroup that is a map in which the key is the group name or something.
You may also want to add object 'o' support, I think Mesh has a name attribute that isn't populated and implementing object support may be one way of solving this

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

No branches or pull requests

2 participants