Added animation system from jME2-OgreXML, going to improve it to fit jME3's design
Added skeleton and animation loading to ogre plugin
Import/Export support, binary and XML, using jME2's system. You can export models without materials only.
Canvas rendering, for LWJGL only. Using Display.setParent() method
This is more of a in-between release. The next will should have skeletal animation with ogre, collision detection/response, material references inside binary models, and applet demos for some jME3 tests.
Cool to see something like a packtool as in the past it was always a mess to me to get my application deployed.
And cool to see NO redcross on eclipse Nevertheless for the TestOgreAnim there is still a problem with the Buffer-Clone.
The BufferUtil gets an DirectFloatBufferU which is not supported by the "generic-clone". This one is not part of the java-api and I don't know where to find it. But it seems it is extedning FloatBuffer. So I patched BufferUtils and it "worked". With a big BUT(t)
public static Buffer clone(Buffer buf){
- if (buf.getClass() == FloatBuffer.class){
+ if (buf instanceof FloatBuffer){
return clone( (FloatBuffer) buf );
}else if (buf.getClass() == ShortBuffer.class){
return clone( (ShortBuffer) buf );
I just changed buf.getClass() == FloatBuffer.class to buf instanceof FloatBuffer. With this the testOgreAnim starts. The result a model without head. (Is that right?) No animation.
When Debugging the BufferUtils I also found out that there is in DirectFloatBufferU also a "viewedBuffer" (DirectByteBuffer). Maybe this does something different!? Sry, I have too less experiences yet with the Buffer-Stuff. Maybe that helped somehow!?
Actually I also started the walk-anim by adding this to the test-class:
((Model)model).setAnimation("Walk");
And it does something but I'm not sure what cause the model vanishes after a millisecond.
But nevertheless I'm glad the animation-stuff is coming now which makes jME3 more interesting for me.
For me JmeSigner is refusing to build under eclipse galileo
A workaround for this may be to lower the problem from an error to a warning
Windows -> Preferences -> Java -> Compiler -> Errors/Warnings
or (Project) Properties -> Java Compiler -> Errors/Warnings
Locate and expand "Depricated and restrivted API" and change the forbidden reference from error to warning. The project will now build ok, I'm not sure if this part of it will run ok tho - I haven't tested as I don't do applets
I optimized the softwareSkinUpdate method in the animation system and it's now 5 times faster. I used an array cache for vertices and bone weights since accessing data from native buffers is very slow. As a result the main loop now only has multiplications, additions and array access, no method calls.
It now takes .3 milliseconds to update a 10,000 verts model with 15 bones. With distance-based frameskipping and multithreaded animation you could have many models on screen without having to resort to hardware skinning.
EDIT: New version available in SVN with animation support.