Open abcthomas opened 5 years ago
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 😞
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
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.