Improved PLY exporter

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Post Reply
JLouisB
Posts: 67
Joined: Tue Jul 24, 2012 12:36 pm
Location: France

Improved PLY exporter

Post 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
JLouisB
Posts: 67
Joined: Tue Jul 24, 2012 12:36 pm
Location: France

Re: Improved PLY exporter

Post by JLouisB »

And also to load the UV in the PLY loader :
https://www.dropbox.com/s/9e0uxtz1apfae ... patch?dl=0
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: Improved PLY exporter

Post by devsh »

Can we pull this into irrlichtBAW?
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Improved PLY exporter

Post 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).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
JLouisB
Posts: 67
Joined: Tue Jul 24, 2012 12:36 pm
Location: France

Re: Improved PLY exporter

Post by JLouisB »

Cool, thank you Cutealien.
I have answered to devsh, but yes, for anyone feel free to include it in any fork.
Post Reply