karl- / pb_Stl

STL import/export for Unity, supporting both ASCII and Binary.
MIT License
180 stars 45 forks source link

Support for exporting meshes with 32bit index buffer format #27

Closed alberto-gglez closed 7 months ago

alberto-gglez commented 1 year ago

When using the STL exporter, the new meshes created in the CreateWorldSpaceMeshesWithTransforms method were using the default 16bit index format, resulting in incomplete models and/or with artifacts.

This PR just copies the original meshes's index format to fix the issue. Tested with some meshes with 32bit index format. So far has worked fine to me.

Before: image

After: image

karl- commented 7 months ago

Thanks for the contribution