New file format loader written

I ported my loader for the .ms3d format (Not the .txt format currently being used). A single (but large) file that took 3545ms to load now takes 910 and FPS go from about 230 to 260 (with optimizations I can bring that 260 to around 320). Loading the same file twice, my load time remains at 910ms while the current implimentation takes 7000ms. My current loader also correctly animates normals. To round out the final features, I’m trying to figure out what the float in update(float) means. Currently I’m using System.curtime to keep track of timing, but am curious if the float passed into update is symetrical.



Also, to get these increases I had to redesign some of the file loading scheme. Here were my changes. Any input on “good/bad” or comments would be welcome


  1. I added a few functions in Geometry and TriMesh to support FloatBuffer sharing. So far it seems to work


  2. I created an abstract “Loader” class which my MilkshapeLoader inherits from. Files are loaded and information is stored by this loader. Users call fetchCopy() to retrieve a copy. I don’t need to reopen a file for the same thing. You can’t just copy the node because diffrent copies need their own of some things and diffrent of others. By allowing the “Loader” to hold file information, things like vertex original positions and joints (which won’t change at all) that aren’t part of the TriMesh but still are important can be kept once for multiple files.



    I also added a few functions to Quat,Matrix3f, and Vector3f and rewrote Matrix4f totally into a class called TransformMatrix. If you’re interested in the code, I can email it.

Sounds very interesting. I’d love to see the code.


2) I created an abstract "Loader" class which my MilkshapeLoader inherits from. Files are loaded and information is stored by this loader. Users call fetchCopy() to retrieve a copy. I don't need to reopen a file for the same thing. You can't just copy the node because diffrent copies need their own of some things and diffrent of others. By allowing the "Loader" to hold file information, things like vertex original positions and joints (which won't change at all) that aren't part of the TriMesh but still are important can be kept once for multiple files.


I like this.

Any help about what the float in "update(float)" means and how to convert that to time?

which update are you referring to?



But anyways, the float is the time (in secs) between frames.

I have a class that extends Controller to do joint animations. Ah time between frames mmm ok thanks.



I’m not sure how to give you my code. I’ve added things to base classes to optimize how they work with my loader.