Bones - Skeletal and Pose Animations for jPCT/jPCT-AE > Bones

Making a 3d model move by code(user input).

(1/3) > >>

I am new to JPCT and till now I have displayed a 3D model made in blender in an android app. I have made the model in Blender with the bones attached to the mesh. Earlier I was using libgdx which made the joints of the bone rotate but it wasn't running along properly with my application. The 3d model i have displayed is in the format .3ds. I have not implemented any animations on the model because I don't need them. I need to rotate the joints of my 3d model based on the user input(by variable change). There will be about 5-7 joints in the model which will only rotate.
Thanks for the help.

have a look at ProceduralAnimationSample in samples folder

Do I have to use the Collada(.dae) format to import my models into android?
Also, I'm getting errors trying to open the collada file. I'm storing my model(.dae) in the asset folder in android. I'm passing "file:///android_asset/model.dae" as the URI of the model I want to load. But its showing File not found exception. Do I have to store the model file in the local storage of the android device(other than asset folder)?

--- Code: ---
ColladaImporter colladaImporter=new ColladaImporter().loadTextures(false);
        ColladaStorage colladaStorage=colladaImporter.load(uri.toString());//<---- File not found exception
        group=BonesImporter.importCollada(colladaStorage, 1f, new Quaternion().rotateX((float)Math.PI));

--- End code ---



--- Quote from: Rhnbmpl on November 09, 2017, 11:21:24 am ---Do I have to use the Collada(.dae) format to import my models into android?

--- End quote ---
no, you dont have to. also it's not suggested.

the preferred way is converting your model into Bones' native format on desktop (PC) then use that in android. this way;
1. will load much faster
2. have no runtime dependency for Collada/Ogre loader

I am getting the following error while converting the collada file to bones:

--- Code: ---abc@xyz:~/Desktop/Bones/scripts$ sudo ./ -in my_model.dae
Nov 13, 2017 5:02:46 PM com.ardor3d.extension.model.collada.jdom.ColladaAnimUtils buildAnimations
WARNING: No element-joint mapping found for element: <node id="Armature_1" name="Armature_1" type="NODE"></node>

Exception in thread "main" java.lang.IllegalArgumentException: ColladaStorage contains no skins.
at raft.jpct.bones.BonesImporter.importCollada(
at raft.jpct.bones.util.ArdorColladaImporter.loadGroup(
at raft.jpct.bones.util.ArdorColladaImporter.loadGroup(
at raft.jpct.bones.util.ArdorColladaImporter.main(

--- End code ---
Do I have to worry about the warning?
Do I have to put skins on my blender model before exporting to .dae?
And also how to import the resulting .bones generated file into the code taken from



[0] Message Index

[#] Next page

Go to full version