CesiumGS / obj2gltf

Convert OBJ assets to glTF
Apache License 2.0
1.7k stars 305 forks source link

Keep mixed attributes #161

Closed lilleyse closed 5 years ago

lilleyse commented 5 years ago

Improves on https://github.com/AnalyticalGraphicsInc/obj2gltf/pull/153 which deleted faces with mismatching attributes.

Now those faces are either added to an existing primitive with that same material/attribute combo or are added to a new primitive.

This doesn't actually fix a tracked bug but may prevent future bugs.

To do:

lilleyse commented 5 years ago

@OmarShehata since you were in this area recently would you mind reviewing?

OmarShehata commented 5 years ago

@lilleyse code looks good, tests are passing, the model correctly loads in the glTF validator, and it looks like the resulting glTF from this branch is slightly bigger, which I assume is the correct behavior since the previous was discarding too many things.

lilleyse commented 5 years ago

Thanks for the review @OmarShehata. I'm going to merge then.