vauge
vauge

Reputation: 801

Animate an existing model with Java?

Imagine I have a model that I want to use in a LibGDX game project (as described here). Let's say, it's the model of a human. Now I want to do several animations with this human: I want him to raise his left/right arm, his left/right leg, to raise a single finger, and also all possible combinations of those animations.

My question is: Do I need to create a single animation for all of those movements outside of my Java code (which would mean I need a file for every single animation and would make my project extremly large), or is it somehow possible to create a model (e.g. by using Blender's Armature or something like that) that can be transformed inside my Java code?

Upvotes: 2

Views: 790

Answers (1)

Xoppa
Xoppa

Reputation: 8113

Assuming you're asking if you can include one or more animations with the g3db/g3dj file format. Yes you can. Just create your model, including the skeleton and animations. Export it to FBX (with animation enabled). Next, convert to g3db or g3dj (fbx-conv -f file.fbx). Load your model as described in the tutorial you referenced. Now you can animate your model using an AnimationController. If you want to combine multiple animations at the same time, you can use multiple AnimationControllers, as long as they don't affect the same bones.

Upvotes: 2

Related Questions