i can use many jmo models with skeleton with no errors on desktop but when i tried to the models on my android device, galaxy s2, it always show this error log.
[xml]E/AndroidHarness(10524): Exception thrown in Thread[GLThread 2488,5,main]
E/AndroidHarness(10524): java.lang.UnsupportedOperationException
E/AndroidHarness(10524): at java.nio.FloatToByteBufferAdapter.protectedArray(FloatToByteBufferAdapter.java:129)
E/AndroidHarness(10524): at java.nio.FloatBuffer.array(FloatBuffer.java:101)
E/AndroidHarness(10524): at com.jme3.animation.SkeletonControl.applySkinning(SkeletonControl.java:322)
E/AndroidHarness(10524): at com.jme3.animation.SkeletonControl.softwareSkinUpdate(SkeletonControl.java:283)
E/AndroidHarness(10524): at com.jme3.animation.SkeletonControl.controlRender(SkeletonControl.java:143)
E/AndroidHarness(10524): at com.jme3.scene.control.AbstractControl.render(AbstractControl.java:97)
E/AndroidHarness(10524): at com.jme3.scene.Spatial.runControlRender(Spatial.java:560)
E/AndroidHarness(10524): at com.jme3.renderer.RenderManager.renderScene(RenderManager.java:784)
E/AndroidHarness(10524): at com.jme3.renderer.RenderManager.renderScene(RenderManager.java:794)
E/AndroidHarness(10524): at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1117)
E/AndroidHarness(10524): at com.jme3.renderer.RenderManager.render(RenderManager.java:1168)
E/AndroidHarness(10524): at com.jme3.app.SimpleApplication.update(SimpleApplication.java:254)
E/AndroidHarness(10524): at com.jme3.app.AndroidHarness.update(AndroidHarness.java:430)
E/AndroidHarness(10524): at com.jme3.system.android.OGLESContext.onDrawFrame(OGLESContext.java:367)
E/AndroidHarness(10524): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1462)
E/AndroidHarness(10524): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)[/xml]
but when i’ve used jmo model with no skeleton it run normally there aren’t any errors.
the models that i’ve tested are Oto model and Ninja model from http://jmonkeyengine.googlecode.com/svn/trunk/engine/test-data/Models.
Can someone help me please. i’ve to use the models with animation support.
I have same problem when test on Samsung nexus s (android 4.0.4).
Can someone help me please.
Thanks
simple put, oto and ninja (especially for animation) weren’t designed for android, use models with less vertices, see if that helps
Thank wezrule for reply.
I’m not a designer, so I’m afraid of blender…
Do you have any model that suitable for android? I’ve only seen oto, ninja and simba on jme svn
Thanks & best regards
oto works on android though, I already have him working…it was not with android 4 though.
Are both of your device using android 4?
i’m gonna test it
Once again that might be a Dalvik gift… -_-
It’s fixed in last SVN.
There was an issues with ByteBuffers that are apparently not handled the same way on android 4.0 than with prior versions.
I tested the fix on desktop (win 7 64), android 2.3.6 and android 4.03 and it works fine.
Thank nehon.
I’ve fixed it by load mesh.xml instead of j3o.
But now I stuck in another problems:
- When I try to test : hello_terrain tutorial: https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:beginner:hello_terrain
- on my pc, I work fine.
- on android fone (samsung nexus s run 4.0.4) I can’t init HeightMap from Img : the following line return null.
heightmap = new ImageBasedHeightMap(heightMapImage.getImage(), 0.25f);
so when I put this line into try catch, the log cat show :
http://i527.photobucket.com/albums/cc358/chg76113/121.png
and the result is the terrain is flat
- Another question is: does jme on android support load dds for sky ? when I run some example invoke
rootNode.attachChild(SkyFactory.createSky(assetManager, “Textures/Sky/Bright/BrightSky.dds”, false));
the sky on device is black (of course on PC it work fine)
I also tried “BrightSky-mod.dds” of starcom in this topic http://hub.jmonkeyengine.org/groups/development-discussion-jme3/forum/topic/dds-sky-problem-on-android/, but It not work for me
What should I do ?
Thanks & best regards
There has not been a lot of testings with terrain on android
We’ll have to look into this, but the android todo list is already kinda crowded.
DDS files are not supported on android, you have to load 6 different images for skybox (SkyBoxFactory has a method for this)