Zipped DAE Class for Papervision3D
In my on-going quest to improve load times when dealing with Collada (DAE) models in Papervision3D, I decided to write a DAE file cleaner (or optimizer) in Adobe AIR that will remove extraneous information from the DAE file that Papervision3D ignores anyway.
I do all my modelling in 3DS Max 2010 and it exports lights and so forth that are unused in pv3d and might as well be removed to save on filesize.
Additionally, and more to the point of what this post is all about, I have written a new class for Papervision3D which extends the DAE class and provides for loading zipped DAE files - this *really* crunches down the file size.
See example usage here and download a copy below!
import org.therossman.pv3d.DAEz; var autoPlayAnimation:Boolean = false; var DAEName:String = "MyColladaModel"; var loopAnimation:Boolean = false; var myDAE:DAEz = new DAEz( autoPlayAnimation, DAEName, loopAnimation ); // just like the standard DAE constructor myDAE.addEventListener( FileLoadEvent.LOAD_COMPLETE, onModelLoaded ); // same here for event listeners var zipFilename:String = "mymodel.zip"; var asyncParsing:Boolean = false; var myMaterialsList:MaterialsList = new MaterialsList(); // do whatever init with this you would normally do myDAE.loadZippedDAE( zipFilename, myMaterialsList, asyncParsing ); // this is the new method - very much the same but takes a sip filename
Download the DAEz class here!
And check back real soon for the DAE Cleaner utility!
DAE Cleaner Screenshot
Posted by Rossman @ 2010-02-07 10:53:06