Bone animation

Blitz3D Forums/Blitz3D Programming/Bone animation

_33(Posted 2007) [#1]
Hello, I need to learn how bone animation works, and how to set up bones on a B3D model! :P Any help appreciated. I really liked the BIT model exampled made by tom in a forum little while back.

http://www.blitzbasic.com/Community/posts.php?topic=73124

Any tips appreciated.

Also, I can't find the source of this:
http://www.blitzbasic.com/Community/posts.php?topic=62559


Mortiis(Posted 2007) [#2]
Which 3d application do you use?

Generally it goes like this;
-Place bones (Rigging)
-Assign vertex to each bone (Skinning)
-Then animate!

I'm not an expert though.


_33(Posted 2007) [#3]
I want a 100% code solution, could use data statements. I'm just asking if that is easily feasible, and how would I go about?. Thanks Mortiis for tips.


Gabriel(Posted 2007) [#4]
There's no such thing as a 100% code solution, because you cannot create bones in code. The only way you could remotely do it wholly in code is to get the specs for the B3D format, and create one in code, then load it back in again. It's not pretty or practical, nor is it even technically 100% code, but it's the nearest you can get.

The B3D specs are here : http://www.blitzbasic.com/sdkspecs/sdkspecs/b3dfile_specs.txt

It gets a little more complicated when you throw bones and animation into the mix, but it's not an inherently difficult format to learn. I wrote a static exporter in a few hours. with animation and bones, figure on maybe a couple of days.

Even that doesn't really make sense, because it's not a coding discipline. You're going to need to be more specific about what you're trying to achieve. I mean, for example, trying to do human animation entirely in code is - in all likelihood - a road to very bad character animation. If human animation in code is what you mean, then it's far, far too complex a subject to explain over a forum. I'd suggest a book ( several, in all probability ) and something like Kinematics of Human Motion by Vladimir M. Zatsiorsky.

But maybe you're not talking about human motion. Maybe you're talking about something altogether more straightforward. But it's not easy to offer advice without knowing what it is you're trying to achieve.


Leon Drake(Posted 2007) [#5]
i agree i found its much easier to set up boned mesh in a 3rd party app then export to b3d.


_33(Posted 2007) [#6]
I fully understand the point Gabriel is making. But it's nothing really complex. I have in mind a couple simplistic creatures from the world of Marble Madness to start with.

One is a sort of slinky. So it needs a couple joints to flex and move it's cylinder body in all directions in a slinky fashion.

The other is a slime type creatures. It's like a puddle if you will. So I planned putting a couple bone (maybe 4) links at the extremities (x and z) of that thing so it will sort of move with an animation, a little like the original game.

So, yea I suppose I could load a modeler and try to put bones? Really this is all new to me. Maybe I should of posted this in the beginner forum and try to get this sort of stuff tutorialized.


Gabriel(Posted 2007) [#7]
The kind of objects you describe would be perfect for code-controlled bone creation, but unfortunately, Blitz3D doesn't allow it. Surprisingly few 3D engines do support it, now I come to think of it. Odd.

But yeah, you really have two choices. Create it in code, export it to B3D and then reimport it. Or ( perhaps the best of both worlds? ) create the mesh and the bones, assign the vertices to bones, all in your modeller, but don't actually animate. Then you can get the bones with FindChild() or GetChild() and then manipulate the bones as you wish. At this point, they're just entities, so you can position them, rotate them, scale them, whatever.


_33(Posted 2007) [#8]
What really got me to believe I could use this bone animation is Tom's example of the bit character from the world of Tron. Really amazing and simple way to use bones in the code. Unfortunately I have no clue how he made his B3D file to start with. I have the example and really I wish I could do the same!


Gabriel(Posted 2007) [#9]
Well Tom does have a few DLL's floating around for doing low-level stuff, so I guess it's possible one of those lets you create bones in code, but I haven't seen it if there is.

The link is dead now, so I can't download it for a proper examination.


syntax(Posted 2007) [#10]
ive always found several problems with animating in 3ds max which is the most widely used program where you must place bones in and then rig them through skinning (which is what i assume you are using considering how you stated the situation). what ive always done is made the model and set up the UV map in 3ds max and then rigging and animating in milkshape3d. and even if you need 3ds max files to load into the blitz program, milkshape3d has 3ds max as an exporting option. You will also dont need to install any dlls for this to work.


Dreamora(Posted 2007) [#11]
who told you that bs that you must use 3DS Max?
Fragmotion and the like are far superior I would say when it comes to animating for Blitz3D. Even character FX might be the better choice for Blitz3D.


Rob Farley(Posted 2007) [#12]
Personally I model and animate in Milkshape and skin with UU3D. Draw textures in Paintshop Pro 7


_33(Posted 2007) [#13]
Tom? :P


Mortiis(Posted 2007) [#14]
I suggest blender with this exporter http://gandaldf.altervista.org/b3dexporter.htm


Gillissie(Posted 2007) [#15]
Somehow I think it's possible to programmatically create and use bones. I don't know how, but the animation program PaceMaker was written in Blitz3D as far as I can tell, and it lets you create skeleton structures and assign vertices to them, with blended weighting, then immediately move a bone and see the results. It doesn't appear to be creating files and reloading them on the fly.


syntax(Posted 2007) [#16]
yes you can animate in code but its really only good for something like a playback walk though of a level or something. Im not positive but i kinda thought that the b3d files that some external animation programs export to work by changing what the program knew as bones into pivots and then parenting all the weighted vertices to the pivots and using the setanimkey command to do all the keyframes for the models.

not that what i said has anything to do with this thread really but its been on my mind also so i thought i might say it to see what you all say.

PaceMaker sounds just as good as milkshape. I guess it just depends on your preference.