blender2ogre -> BufferOverflowException

Started by Alexey, June 15, 2011, 08:10:41 AM

Previous topic - Next topic

Alexey


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)

raft

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


Alexey

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 :

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)

raft

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..

Alexey

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

raft

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 ;)

Alexey

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

raft

i see. i'm glad you've found a solution