Bone/Skeleton Animation in Java (Java3D)?
Hi Java Folk,
I'm new to Java, but I've been working on creating a little 3D game applet as a hobby project. Anyways, I have created some 3D models for a player character (RPG-style game) and want to know if there's a way I can animate my character using bones (like how I animate models in Blender), and then just load various mesh/texture objects into different places in relation to the bone structure.
Doing this would enable me to create a walking animation one time, and then later add different clothing or equipment and have the character still follow the same walking motions. The only idea that I've come up with so far is to create the armature in Blender, and then save all the individual frames for each of the positions of the movement for each new item I create. From there I can create a behavior in Java (java3D) and show the frames in order. It sounds to me like a total pain in the ass - there must be a better way.
At the moment I am able to:
Load object files (.obj) into BranchGroups and translate them (move them around) or rotate them about an axis
I have an "okay" grasp of lighting in java3D
I have created one behavior that moves a cube when any key is pressed
Any help you could provide would be greatly appreciated! Even if it's just to tell me that I have to animate in blender and then create a behavior in java.
PS: I'm using Eclipse editor if it matters at all - also none of my applets ever work when I embed them in html files, but that's a whole other question...
Re: Bone/Skeleton Animation in Java (Java3D)?
I've some experience in Java3D. I don't see a simple way to use Blender in Java3D. One suggestion is to use JMonkey. It has all the ingredients you describe: it uses Blender, uses "Bones", has an on board physics engine and a lot of tutorials to make animations like you describe.
Java3D is much more primitive, but nice to practice 3D-programming. It is more shape- or loaded-objects-oriented (more than bones with a skin), but apart from using behaviors you can (like in JMonkey) use a physics engine (Open Dynamics Engine - home). A Good book is Killer Game Programming in Java (O'Reilly).
Character animation (with inverse kinematics and so on) is a different story that I only read about. Storing frames doesn't sound appealing, I agree.