when at the beginning i .setMesh(lodMeshes[xx]); to one of meshes in lodMeshes[] then start animation for the first time it plays ok. then at runtime while model in playing animation, again I call .setMesh(lodMeshes[xx]); with different mesh but animation stops playing.
So after changing mesh i tried to clear all anim channels and play animation again, but it does not play.
here is what i am doing in my CustomeLODControl:
nothing. just my simple outputs when going close/far from model
Found LODs on Models/Models/Characters/Doha/Doha.xbuf
Aug 29, 2016 12:25:30 AM com.jme3.animation.SkeletonControl controlRender
changed to LOD level 2
INFO: Hardware skinning engaged for Armature (Node)
changed to LOD level 1
changed to LOD level 0
changed to LOD level 1
changed to LOD level 2
changed to LOD level 1
changed to LOD level 0
changed to LOD level 1
changed to LOD level 0
BUILD SUCCESSFUL (total time: 33 seconds)
Wherever, Whenever you have problem with your code. The solution is just adding this line to first of your code : skeletonControl.setHardwareSkinningPreferred(false);
I guess the mesh as not been “prepared” for animation and lacks the proper buffers.
HW skinning uses 2 special buffers, but even software skinning needs the BindPosition buffer to be set properly.
I think we should investigate further the original issue with generating lod from an xbuf pipeline model.