Closed ffreyer closed 1 day ago
Attention: Patch coverage is 16.84783%
with 153 lines
in your changes missing coverage. Please review.
Project coverage is 62.15%. Comparing base (
cb8e494
) to head (fd36a88
). Report is 11 commits behind head on master.
Files with missing lines | Patch % | Lines |
---|---|---|
src/io/obj.jl | 16.84% | 153 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
🚨 Try these New Features:
This adds experimental support for #94. To cleanly support this we need changes in GeometryBasics to attach metadata to meshes that's not per vertex.
This adds a couple of things:
load("filename.obj")
now also reads "usemtl" commands and treats them like a vertex attribute. I.e. it maps the related material names to indices and generates faces for them so that a mesh can later be split into submeshes based on materialsMeshIO.split_mesh(mesh)
does the splitting based on material indices. It's not exported as I see it as an experimental feature. It's hard-coded to assume a mesh has normals, uvs and material ids for now. It returns a Dict mapping material ids to sub meshes.MeshIO.load_materials("filename.obj")
repeats some of the work of the main load function to provide amaterial id => material name
mapping and also loads the attached mtl file viaMeshIO._load_mtl("filename.mtl")
. I consider those experimental as well so they're not exported. The output is a nested Dict of the information in the mtl file.For example you can use this to load https://free3d.com/3d-model/girl-blind-703979.html. (This isn't using all the material settings specified in the mtl file so the shading doesn't match exactly. )