Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / LIMBS ANIMATIONS and MODELS oh my!

Author
Message
TheeLord
16
Years of Service
User Offline
Joined: 23rd Jan 2008
Location: Chicago
Posted: 29th Jan 2011 04:03 Edited at: 29th Jan 2011 04:05
I am developing a MMO and I am actually about 6 months deep into development, have been doing very well and I plan on posting to the WIP forum in a couple more months. I have run into a big knowledge roadblock however when it comes to multiple body parts doing seperate animations and the correct way of doing armor attachment etc... REALLY need some help!

I have a testing model that is fully rigged and able to be animated properly. As shown below I split it up in to three different parts, the head, torso, and legs.


How am I supposed to correctly export and build this character in GDK? Also how am I supposed to attach the armor correctly? DarkGDK is supposed to do per-bone animations.. Is that something I need? If so, where can I find more information on that?

In fact, I cannot even get this to export the body parts individually with animation. I can get it to export the whole body with animation as a .x, but not an individual body part.

Please help!
Thank you
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 29th Jan 2011 04:55
Wait, why would you need to export an individual body part?

I haven't really used GDK/DBP enough recently to remember, but there should be a way to blend multiple animations, allowing you to specify the node at which one overrides the other. I'm just assuming though, since it's a necessity for any decent animation.
TheeLord
16
Years of Service
User Offline
Joined: 23rd Jan 2008
Location: Chicago
Posted: 29th Jan 2011 06:39
Oh wow, if that was the case, it would be perfect!!! Anyone know what he is talking about exactly? Thanks!
TheeLord
16
Years of Service
User Offline
Joined: 23rd Jan 2008
Location: Chicago
Posted: 29th Jan 2011 07:07
well this gets me thinking.. I will need multiple textures on the player models. So wouldn't the body parts need to be seperate objects or limbs to achieve this?
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 29th Jan 2011 15:40 Edited at: 29th Jan 2011 15:44
I don't think the default Dark GDK command set allows you to mix animations (except for interpolation between different animation phases but that's not the same thing). However, there is a plugin called Enhanced Animations which is designed especially for this purpose:

http://www.thegamecreators.com/?m=view_product&id=2077

Per-bone animation is also possible but then you need to program the animations and handle them from code, instead of pre-designing animations in the modeller.

AFAIK what is a bone in the modeller should become a limb in Dark GDK (but someone correct me if I've said something stupid here) so you can change textures on body parts with dbTextureLimb. The best is to load your model in Dark GDK and check if you have limbs in it, for example with the dbPerformCheckListForObjectLimbs command, see the help.

For attaching armor and other accessories, experiment with the dbGlueObjectToLimb command.
Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 29th Jan 2011 17:09
Check out the darkbasic pro posts i had a post over there which was to support animation through the limbs.

ALLAH IS THE GREATEST
May he forgive me
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 30th Jan 2011 07:43
Like Mireben said, as far as I know, DGDK does not support animation blending natively. If you've got some extra cash, it might be worth your while to check out Enhanced Animations, as I think it provides what you want.

However, to avoid it, you could do what I think you've been trying to do, which is to export the three parts of the model separately and move them all together in DGDK so it looks like a complete model, while allowing each part to play a different animation. In order to do that, I think you'll need to use the Export Selected option of the DirectX Exporter to export each section. While doing this, make sure you also select the Armature object each time you export.

If that doesn't work, I'll have to toss around some more ideas in my head, but I think that should do it. Lemme know!

Cetobasilius
14
Years of Service
User Offline
Joined: 29th Dec 2009
Location: Mexico
Posted: 30th Jan 2011 09:20 Edited at: 30th Jan 2011 09:35
for permutations, or armor addons, you can use the dbGlueObjectToLimb command. works like a charm, i am using it in my game, however i have not used real models, but here is an example of the command:


i exported the model as a single one, but the bone data still remains on the object. note that i exported to .x format. i can attach any other model to any place i wanted of the model. and the model is animated, which moves the boxes along with how the model moves.

As for blending animations, Enhanced Animations is the one, but i dont think thats what you need exactly.

DarkGDK natively supports animations. you can use dbPlayObject, or dbLoopObject, and there is a command to set the animation speed.to play the animation on the model you simply state from what to what frame you wanna play it and, oh well you get the picture.

on another hand, you can export your model with no model (lol i know it sounds wierd) what i mean is erase the "physical" part of your model, but the bone data will be exported. you can then add custom heads, arms, shoes, torso, etc, you get the idea. right now i am doing something similar. just use the models skeleton and other models to model it. oh well, hope this is helpfull to you in some way

hi

Attachments

Login to view attachments
TheeLord
16
Years of Service
User Offline
Joined: 23rd Jan 2008
Location: Chicago
Posted: 30th Jan 2011 09:51 Edited at: 30th Jan 2011 09:52
I have purchased advanced animation, will see what I can do with that, if I could blend animations from my bone data I think that will work perfectly.

Kira, I tried all sorts of combinations of exporting. I used two different versions of your export script (2.49 and 2.56) and also the one that comes with blender in 2.49. I also tried with each of these exporting a single piece of the model (legs or torso) with the entire armature which didn't work, then tried with each version exporting a single piece with just the bones that lie underneath which did not work either. If I didn't export the entire model and entire armature I did not get any animation. There must be a way to do this I would think...

Cetobasilius, dbGlueObjectToLimb will work well for things like boots, helmet, shield, sword etc.. but for objects that need deformation I will need to have them pre-animated in my modeling program right? I will also try to export the bone data alone and attach models to it.. I will see if that works at all.
haliop
User Banned
Posted: 30th Jan 2011 14:31
i did it before
you build the model in blender , but you will need to seperate it into limbs.
you exctract the entire model, this model in GDK will have limbs, like head , hands , legs etc..
the bones will also be exctracted using the correct DirectX exctractor found here on the 3D section in the main forum , you can always ask their.


about animation blending for induvidual limbs.. that is not possible with what DarkGDK presents, you may need to code it yourself , or , create induvidual body parts as objects , or just use the same model you already have , seperate the limbs and bones when you are finished with all the animations you want , then export induvidual object , that object will be the current selected in blender.
but then again you will need to code it in GDK to somehow Glue the objects together just like you would do with an anmiated weapon like the M16 or anyother object that has animations .

once you have induvidual objects glued together where each will have induvidual bones / animations , you will be able to blend it easly.
but if you animate the entire body with one bone structure , you will have to recode how animations will work under Dgdk.

i would suggest the second one , induvidual objects with induvidual bones and induvidual animations , it can be done if you animate first , seperate everything after you are pleased with it (dont forget to save a backup of the original), export selected objects , load them , glue them , animate as induviduals , then you could blend using the frames that are already inside them.

on a diffrent approach , a more advanced approach is to do all the animations inside GDK , move , rotate , size , offset object limbs where the object is the entire body seperated into limbs but act as one.

when you export a bocy with animations and bones from blender
you will recive this:
object - body .
limb 0 .. 10 = head , torso , legs, hands , fingers, foor
10 - 20 - head bone , torso bone , legs bones etc...

when you rotate , size or anyother thing with this approach , you will have to change the bone limbs and not the actuall limbs, i dont know why but its just how it works.

animation blending is very prectige , since most games, developers use a combination of procedual and coded algorithems to animate.

the more advanced developers such as Ea Sports for example use their own Animation Suit programs i dont remmber its name , but those animations are awesome becouse , it uses
Procedual , Bone Algorithems , blending , Physics of each bone and joint and sometimes even athmosphere and special gravity diffrences such as when a player is falling down or even trying to get up , the only thing to remmber here , is that there are nomberos ways to do it , you can always search google for animation blending before purchasing anything cause you may find libraries that are first free second so advanced that they may offer a way to handle a ready body model with limbs and to do what you want to do with blending for induviduals.

anyway you look at it , animation blending of induviduals are much better then just procedual cause you can get some really awesome results that will look real , feel real and will give you the prectige of a very good animator / programmer.

hope you will find your best approach , sorry if i wrote too much got excited by this
TheeLord
16
Years of Service
User Offline
Joined: 23rd Jan 2008
Location: Chicago
Posted: 30th Jan 2011 18:37
Wow thanks Haliop. You gave me a lot to think about and try! I moved on to different aspects of the game for now and will return to this in a few weeks when I am less frustrated with it lol. I will need to come back here and post my final solution for sure. Or let you all know if I have more problems.

One question Haliop, you say near the top of your lecture that
Quote: "you exctract the entire model, this model in GDK will have limbs, like head , hands , legs etc..
the bones will also be exctracted using the correct DirectX exctractor"


So if I was to seperate the objects and bones into different objects and export the entire object as one, it should create different limbs for each seperate object in the modelling program? It doesnt seem like it would be that intelligent..
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 30th Jan 2011 18:54
Hmm, I really don't know why exporting each piece with a copy of the entire armature didn't work... it's really just like exporting any object with an armature. Very strange. I'd have to poke around the .blend file.

As for the creation of separate limbs on export, each object/bone in Blender becomes a limb in the DirectX format (actually, they become "frames", which are interpreted as limbs in DGDK/DBPro).

Let me know if I can answer any other DirectX format questions

TheeLord
16
Years of Service
User Offline
Joined: 23rd Jan 2008
Location: Chicago
Posted: 30th Jan 2011 23:23
Here is the .blend file. If you want to have a look at it and let me know what you think, please do. And yes, the modeling techniques used arent great, but it was a very quick mockup for testing purposes.

Attachments

Login to view attachments
Parry
AGK Developer
14
Years of Service
User Offline
Joined: 16th Dec 2009
Location: Swampstone
Posted: 31st Jan 2011 00:17 Edited at: 31st Jan 2011 00:18
This is neat, We are working on the exact same thing. I just finshed up (well almost, still a few bugs to make it work with everything else) adding this to my MMO which I been working on for almost 2 years now. I was thinking about posting a program (with code) I wrote demostrating attaching entire sets of armor on a character model on these forums. It would also demostrate moving with animations while wearing these items.

Incase you may be interested (if you havent found it yet), google a program called MakeHuman, it makes 3d models of humans, very useful.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 3rd Feb 2011 22:30
@TheeLord

Here's a little bit of background in terms of animation that is general and applies to direct x. I believe DGDK is based on direct x so the information should be relative. It may help you understand what your goals are.

Some of the earlier 3d animation techniques that are still relevant today involved having separate meshes for each part of a scene. The scene would have a root object or reference point to which all of the other objects would be translated or rotated relative to this root. This led to a hierarchical structure where child objects could be linked to parent objects and eventually to the root. This meant a room, for example, containing a couch, a rug, tables, lamps, etc. could be translated or rotated in whole by simply translating the root object or point. Because of the linked relationships between the child objects, the parents, and the root, it wasn't necessary to individually recalculate the positions and orientations of all the individual meshes that made up the scene.

In the direct x file format, I believe since version 3.02, specific animation key types were developed to be included in the file format that easily utilized this 'scene type' animation (A more formal term would be articulated structural animation or hierarchical animation though bone animation is laid out in a hierarchy).

The early versions of dark basic only used this type of animation, where a limb would be defined as an individual mesh and linked to a parent mesh and/or eventually to a root. The 'scene' could be a character object where the limbs are arms and legs. Each individual mesh, could be manipulated on it's own : scaled, positioned, or rotated - and each maintained it's relative position, size, and orientation to it's parent.

This works great for mechanical objects, or for joints where it doesn't matter if a gap or an overlapping of meshes is observed. But for organics like humans or animals, it's not ideal. Here is where skeletal animation comes in. The scene animation described above needs no skeleton - in fact it shouldn't have one.

But to make a more realistic organic, you want a single mesh to bend at the joints instead of having two separate meshes. For this to occur, all of the individual vertices that make up the whole mesh are mapped to various 'bones'. A bone is really a matrix that describes the translation, scale, and rotation of the vertices assigned to it. The vertices may have a weight, so that they all don't bend or move to the same extent.

Since direct x version 8.1, the file format not only contains key types to handle scene animation, but introduced another key type to be able to handle bone animation.

To make a longer story shorter, you have the option of designing your models to use either type of animation. If you use the scene type (articulated structural animation) you would not use a skeleton. You would create a series of meshes and link the meshes themselves in a series of parent and child relationships. If you use bone animation, you would have a skeletal structure and a single mesh that has the bones linked to vertex groups.

It is possible to use both types of animation at the same time. It all depends on how you build the animation and you model(s). There's so much focus on bone animation today that I think a lot of new animator hobbyists don't even realize that scene animation exists and end up rigging skeletons for things like vehicles, gear systems, robots, or pistons - where a skeleton is more of a hindrance.

Quote: "In fact, I cannot even get this to export the body parts individually with animation. I can get it to export the whole body with animation as a .x, but not an individual body part."


As far as exporting from blender, If the object is divided into individual meshes, I think Kira Vakaans exporter exports the direct x file to contain the definition of the individual meshes. If these are linked in a hierarchy, they will be contained within their own frames but the object will be exported as one thing (with individual limbs). If it is a skeleton and a single mesh, then the obejct will be exported with the skeleton and be animated.

Quote: "well this gets me thinking.. I will need multiple textures on the player models. So wouldn't the body parts need to be seperate objects or limbs to achieve this?"

No. If you make a model, you can apply multiple textures to various faces during UV editing. The direct x file contains references to the faces and that have a specific texture/material. When you load the file into direct x (DGDK) , this object information is loaded into memory and your object will be textured correctly (if you set it up correctly when you did your UV editing!).

Enjoy your day.
TheeLord
16
Years of Service
User Offline
Joined: 23rd Jan 2008
Location: Chicago
Posted: 9th Feb 2011 07:47
Thanks Latch, still need to figure out how to do animation blending and stuff, but I will need to look over enchanced animation once I get it downloaded and installed.
TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 9th Feb 2011 18:16 Edited at: 9th Feb 2011 18:30
Hi TheeLord, I'm seeking to do exactly what you are doing. I call the System, Modular Entity Construction hierarchical Sets (MEChS) and intend to extend MEChS to every type of game entity: Building/Structures, Trees & Plants, Character Head & Body, Firearm Weapons, Melee Weapon, Props & Furniture, Vehicle/Crafts/Machines. With that said, I've done some R&D with character construction & animation with Skeletal Animation using BVH Motion capture data, physics, path-finding algos, and other procedural techniques.

Following Latch's post, is a key factor to assigning different animations to limbs are the joint labels and their positions in the hierarchy. These have to match between the animation data and the skeleton. If these do not match, you have to devise a method to remap animation data to the skeleton by label/position to match (or get a close as possible).

I haven't perform much R&D with run-time Animation Blending, but, I would speculate it uses the interpolation calculations animation applications use during design time. I would also speculate basic interpolation formulas easily to implement and can get job done with a known start/stop coordinates.

I'm very interested in your progress so please continue to share your progress.

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 10th Feb 2011 09:16
@TheeLord
From the context of the posts and what you were originally asking, the term "blending" animations has come up. I'm thinking that you are looking for a way to correctly export your animated characters and be able to add armor or other items like weapons and such and make sure each limb/bone is moving the way you want.

Blending animations is something quite different. This is the overlapping of simultaneous animations for the same set of bones/limbs over the same frames. For example, if you had a walk animation, you might loop this. You might also have a limping animation. What you would do is continue to loop the walk animation and "blend" in the limp animation based on a weight. What you get is the character walking but at the same time that animation is influenced by the limping. As the character heals, you reduce the influence of the limp animation and the movement of the character eventually smooths out to the looped walking animation.

I'm guessing you aren't looking for blending animations, but simply want to be able to export your animated characters correctly for use in DarkGDK. Am I mistaken?

Enjoy your day.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 10th Feb 2011 14:34 Edited at: 10th Feb 2011 14:35
I think the terms might differ depending on your background and the software you use.

Blending from one animation to another is usually called tweening, while certain engines will use blending to refer to multiple concurrent animations on separate channels.



Support a charitable indie game project!
TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 10th Feb 2011 20:59
I believe Animation Blending is achieved using Tweening and I would personally prefer to use the technique Latch describes to both overlap and smooth out animation transitions. Then it would simply be a matter of how fast one adjusts influence of one animation for over another to achieve desired effect. IMO, the term Blending sums up the end result, so I would not get caught up in the semantics.

Cetobasilius
14
Years of Service
User Offline
Joined: 29th Dec 2009
Location: Mexico
Posted: 10th Feb 2011 22:33 Edited at: 10th Feb 2011 22:38
well, he actually says
Quote: "when it comes to multiple body parts doing seperate animations and the correct way of doing armor attachment"

You might need to use a Blender tutorial on how to animate your objects since i see that you use blender for animating. you can simply use dbLoopObject or dbPlayObject for animations if you dont have the money for enhanced animations, however Enhanced Animatons has some examples that may help you out on "blending" animations, or transitioning from one animation to another smoothly.

Once you have your models skeleton attached to the skin and done some animations, armor attachment is easy. just use dbGlueObjectToLimb specifiying on which bone you want your armor attachment.

EDIT: watching your screenshot carefully, i see not all the bones are attached to each other. the .x format has some trouble when animation is done that way, in fact,i did it a while ago and the separate bones did not even move. so i would suggest you have all of your model bones connected to each other, including the root bone. tell us if that works.

hi
TheeLord
16
Years of Service
User Offline
Joined: 23rd Jan 2008
Location: Chicago
Posted: 13th Feb 2011 06:05
@Latch I actually need both working, I need to be able to animate different body parts seperately, attach armor and weapons etc... and also preferrably be able to do animation blending.. Though blending (as you explain it) is a secondary concern.

@Cetobasilius I will need to do some tests with Limbs, I haven't touched them at all.. But I'm sure dbGlueObjectToLimb will not help me with armor that needs to deform. All the bones are parented correctly I believe.

I will try some of the export techniques in the above posts, will need to get back to you all and let you know how the exports went. I also did purchase Advanced Animation, haven't had any time at all to play with it yet though. I've been busy working on other systems.
Like I said, in a couple months I will post to WIP and try to get some more help with the project, below are some "in game" screenshots though of some progress.

http://www.freeimagehosting.net/uploads/th.7bbf38223c.jpg
http://www.freeimagehosting.net/image.php?78d5644f42.jpg
Cetobasilius
14
Years of Service
User Offline
Joined: 29th Dec 2009
Location: Mexico
Posted: 13th Feb 2011 12:33
if you need armor attachments that will need to deform, it will be as simple as to animate them with their own bones. imagine, your character grabbing another one using dbGlueObjectToLimb, you are able to animate both objects simultaneously, while one is being affected by the other one. will be adding this to my engine soon and maybe i make a sample. why dont you share your models? maybe we can help you with something. will try animating a glued object and see how it goes. will post later

hi
TheeLord
16
Years of Service
User Offline
Joined: 23rd Jan 2008
Location: Chicago
Posted: 13th Feb 2011 17:49
I actually did post it above in a reply about halfway up here.. As I said, it's not a great model at all, is just a placeholder, but the armature should have been made correctly.
TheeLord
16
Years of Service
User Offline
Joined: 23rd Jan 2008
Location: Chicago
Posted: 10th Apr 2011 10:37 Edited at: 10th Apr 2011 10:40
Ok so I'm starting to revisit this.. here is where I'm at.

If I select the skeleton and one of the body parts and try to export just that (using "Export>Selected Objects"), it exports the entire body and animates it.

If I actually delete all objects in the scene besides that one body part and then export that and the skeleton it exports correctly.

If I only select the one body part and do not select the armature and export selected objects it exports the one body part only but without animation of course.

Seems like the exporter might have issues?
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 11th Apr 2011 05:06
Actually, that behavior sounds normal. I'm assuming each body part is a child of the armature object? Currently, the exporter exports all children of a selected object as well.

I don't really remember what my logic was behind that, but maybe I should change it in future releases. Actually, yeah, I think I'm gonna go change that right now.

Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 11th Apr 2011 06:09
Alright, now the exporter does not export the children of selected objects when the Export: Selected Objects option is used. Depending on how up to date your build of Blender is, you might consider downloading a more recent one from graphicall.org, as the new script will probably not work on the older builds of 2.56.

Neotron
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: I am in an underworld , making a E.Army
Posted: 11th May 2011 14:24
Hey can someone plz post a code that is similar to what enhanced animation plugin does. Or atleast just tell us how to animate the individual bone. I am making a FPS type game and although the player doesnt need to see his legs or any other part , but it will still be nice to see other models with their individual limbs animating.
I remember that i used to do this type of effect in darkbasic pro but now in dark gdk i am feeling lost. Any help could solve this post.

ALLAH IS THE GREATEST
May he forgive me

Login to post a reply

Server time is: 2024-10-02 17:21:04
Your offset time is: 2024-10-02 17:21:04