Page 1 of 1

Improved PLY exporter

Posted: Fri May 11, 2018 3:20 pm
by JLouisB
Hi,

I have worked a bit the PLY exporter for one of my project, so there is the patch with the modifications :
https://www.dropbox.com/s/z977sd2bnhdzp ... patch?dl=0

Changes :
- Support for UV and vertex colors
- Support for binary PLY files export with the EMWF_WRITE_BINARY flag
- Fix for the meshes with 32 bits index

It might be nice if the changes could be incorporated into the trunk.


Also, about the flags of the mesh writers, I have modified 2 things because it's currently a bit confusing :
- The only utilisation of EMWF_WRITE_COMPRESSED is in the STL exporter, and it's used as a flag to export a binary STL, but it's not really a compression STL is an uncompressed format, it's juste the binary version of the file format, so using EMWF_WRITE_BINARY instead of EMWF_WRITE_COMPRESSED is less confusing
- The other flags arn't used at all, so I have simply removed them

These modifications are in a second patch :
https://www.dropbox.com/s/acs6f8697yqoo ... patch?dl=0

Also it can great to apply these changes to the trunk

Re: Improved PLY exporter

Posted: Fri May 11, 2018 5:31 pm
by JLouisB
And also to load the UV in the PLY loader :
https://www.dropbox.com/s/9e0uxtz1apfae ... patch?dl=0

Re: Improved PLY exporter

Posted: Fri May 11, 2018 10:16 pm
by devsh
Can we pull this into irrlichtBAW?

Re: Improved PLY exporter

Posted: Sat May 12, 2018 3:38 pm
by CuteAlien
Thank you. Patches are applied to svn trunk in revisions 5607-5609.

I didn't fully apply the patch for the EMWF_ flags. Reason is that enums should never ever change their value once they are used in a library interface. For example they might be used already in custom exporters or existing config files or tools. But I allowed STL writer to also use the binary flag now (no idea why it used compressed ... but won't hurt to keep that around for downward compatibility).

Re: Improved PLY exporter

Posted: Wed May 16, 2018 3:03 pm
by JLouisB
Cool, thank you Cutealien.
I have answered to devsh, but yes, for anyone feel free to include it in any fork.