www.jpct.net

Bones - Skeletal and Pose Animations for jPCT/jPCT-AE => Bones => Topic started by: Alexey on June 15, 2011, 08:10:41 am

Title: blender2ogre -> BufferOverflowException
Post by: Alexey on June 15, 2011, 08:10:41 am
Code: [Select]
Exception in thread "main" java.nio.BufferOverflowException
at java.nio.Buffer.nextPutIndex(Buffer.java:495)
at java.nio.DirectFloatBufferU.put(DirectFloatBufferU.java:250)
at com.jmex.model.ogrexml.OgreLoader.loadVertexBuffer(OgreLoader.java:381)
at com.jmex.model.ogrexml.OgreLoader.loadMesh(OgreLoader.java:625)
at com.jmex.model.ogrexml.OgreLoader.loadModel(OgreLoader.java:225)
at com.jmex.model.ogrexml.OgreLoader.loadModel(OgreLoader.java:177)
at bones.samples.OgreSample.createAnimatedGroup(OgreSample.java:38)
at bones.samples.AbstractSkinSample.initialize(AbstractSkinSample.java:79)
at bones.samples.OgreSample.initialize(OgreSample.java:57)
at bones.samples.AbstractSample.loop(AbstractSample.java:86)
at bones.samples.OgreSample.main(OgreSample.java:74)
Title: Re: blender2ogre -> BufferOverflowException
Post by: raft on June 15, 2011, 12:10:30 pm
hard to say someting certain from that stack trace. try some other Ogre viewer and see if that successfully loads your model. if you cant find a viewer (dont know your platform) you can also use ogre command line tools (OgreXMLConverter or OgreMeshUpgrader) to see if your file is valid

Title: Re: blender2ogre -> BufferOverflowException
Post by: Alexey on June 15, 2011, 02:46:37 pm
Thank you for reply! I convert xml to .mesh by OgreXmlConverter (from tools), it show  "WARNING: vertex count (9900) is not as claimed (1788)", i don't know why, but now i change <sharedgeometry vertexcount="9900"> in XML and try run :

Code: [Select]
Exception in thread "main" java.lang.IllegalArgumentException: No controller found in OgreEntityNode. Means there is no skeleton or pose animation!
at raft.jpct.bones.BonesImporter.importOgre(BonesImporter.java:132)
at bones.samples.OgreSample.createAnimatedGroup(OgreSample.java:42)
at bones.samples.AbstractSkinSample.initialize(AbstractSkinSample.java:79)
at bones.samples.OgreSample.initialize(OgreSample.java:58)
at bones.samples.AbstractSample.loop(AbstractSample.java:86)
at bones.samples.OgreSample.main(OgreSample.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Title: Re: blender2ogre -> BufferOverflowException
Post by: raft on June 15, 2011, 02:59:58 pm
that means there is no animation in your xml file as the exceptions says ;)

btw, if that exporter even writes vertex count false, i wouldn't trust it much..
Title: Re: blender2ogre -> BufferOverflowException
Post by: Alexey on June 17, 2011, 01:29:23 pm
I reexport model with animation, change manually vertex count again, after that found null pointer in SkinHelper.asArray(mesh.getTextureCoords().get(0).coords)  (BonesImporter.class) - 0-key value some reason was null, get(1) ... and finally i saw model on screen... but as 1 mesh without submeshes. So i hope next release will be better.
But now i solved the problem in next way - bender 2.57 -> collada .dae -> blender 2.49 (with it ogre exporter) -> create bones etc -> make animation actions/ shape keys -> export to ogre mesh  ;D
Title: Re: blender2ogre -> BufferOverflowException
Post by: raft on June 17, 2011, 01:45:10 pm
if i get you correct you use collada to export from blender 2.57 to 2.49, right? why is that, 2.49 works better than 2.57?

anyway, if it works that way ;)
Title: Re: blender2ogre -> BufferOverflowException
Post by: Alexey on June 17, 2011, 01:53:00 pm
For 2.49 exporter work good.  Model was made in 2.57, when i try open it in 2.49 blender crash, so i mast use intermediate format for import model to 2.49
Title: Re: blender2ogre -> BufferOverflowException
Post by: raft on June 17, 2011, 01:58:08 pm
i see. i'm glad you've found a solution