Closed azymohliad closed 4 years ago
Looks like this is addressed by #15
In #15, the material libraries are loaded into a separate vector material_libs
and these materials are then referenced through Arc
s in each group.
Fixed by #15
Great! Thanks!
Greetings! So as I understand, the workflow to load materials data is: you go through the list of objects, then through the list of groups in the object, and if the group has the material - you load its data (textures, colours, etc). So if multiple groups link to the same material you end up duplicating all its data including textures, is it correct?
Is it possible to avoid this duplication?
For example
tobj
stores materials in a separateVec
and each mesh (group) than just contains material index asOption<usize>
, so you can go through this flat list of materials, load all their textures etc, and then if multiple meshes link to the same material you can reuse their loaded data.tobj
doesn't look as complete as this crate though.