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.

Improved PLY exporter

Postby JLouisB » Fri May 11, 2018 3:20 pm

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

Re: Improved PLY exporter

Postby JLouisB » Fri May 11, 2018 5:31 pm

And also to load the UV in the PLY loader :
https://www.dropbox.com/s/9e0uxtz1apfae ... patch?dl=0
JLouisB
 
Posts: 54
Joined: Tue Jul 24, 2012 12:36 pm
Location: France

Re: Improved PLY exporter

Postby devsh » Fri May 11, 2018 10:16 pm

Can we pull this into irrlichtBAW?
User avatar
devsh
Competition winner
 
Posts: 1890
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK

Re: Improved PLY exporter

Postby CuteAlien » Sat May 12, 2018 3:38 pm

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.freenode.net
Code snippets, patches&stuff: http://www.michaelzeilfelder.de/irrlicht.htm
Free racer created with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
User avatar
CuteAlien
Admin
 
Posts: 8533
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

Re: Improved PLY exporter

Postby JLouisB » Wed May 16, 2018 3:03 pm

Cool, thank you Cutealien.
I have answered to devsh, but yes, for anyone feel free to include it in any fork.
JLouisB
 
Posts: 54
Joined: Tue Jul 24, 2012 12:36 pm
Location: France


Return to Code Snippets

Who is online

Users browsing this forum: No registered users and 1 guest