Jump to content


Photo

Blender rig for standard male NPC


78 replies to this topic

#1 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1579 posts

Posted 02 August 2013 - 07:59 PM

You can find here an animation rig in Blender for the male NPC. If one wants to make animations for TDM in Blender this will be very helpfull.

Attached File  01.png   138.6KB   22 downloads

EDIT 2014.05.28: I also made a female version of the rig. It's a bit different than male version. See this post for details.
EDIT 2014.08.02: I did a small change to male rig. Link has been updated. Also added some new animations.


  • RPGista likes this

It's only a model... /// My channel on YouTube /// CGtrader , Turbosquid


#2 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1579 posts

Posted 02 August 2013 - 08:04 PM

Some basic things one has to know about it:

On layers 1, 6, 7, 8 there are different character models. On layer 3 there is a rig imported from the game. It looks like this:

Attached File  02.png   20.6KB   13 downloads

It's very difficult to animate so I made second rig, which you can find on layer 2:

Attached File  03.png   18.66KB   14 downloads

It's the same bones as the game model plus many more bones. Use this rig to make animations. Rig from layer 3 will automatically copy all of its movements.
To make it more tidy I hid most bones (you can still see them in edit mode). I also created custom models for some of the bones (those models are stored on other layer). This is how it looks with custom bone shapes:

Attached File  04.png   13KB   35 downloads

Use round bones to position hands (I will post here animated gifs; open them to see animations):

Attached File  05.gif   47.98KB   56 downloads

Use cube bones to position elbows and knees:

Attached File  06.gif   47.74KB   40 downloads

Pelvis bone has disabled rotation (it's important). Use it to position upper body:

Attached File  07.gif   69.98KB   29 downloads

Use Pelvis 2 and Hips to rotate hips:

Attached File  08.gif   79.76KB   31 downloads

Attached File  09.gif   62.26KB   26 downloads

You can move and rotate foot_ik_main and rotate roll_main to position legs:

Attached File  10.gif   83.22KB   25 downloads

Spine bones copy rotation of previous bone in chain so if you rotate the first one other will also slightly rotate in the same direction. You can turn it off if you wish:

Attached File  11.gif   67.95KB   20 downloads

The same with fingers:

Attached File  14.gif   50.23KB   20 downloads

More advanced option - drivers. There are sliders that define whether sertain bones will follow other bones:

Attached File  12.gif   190.07KB   29 downloads

That's usefull when you want hands to stay in place e.g. when character tries to push something heavy. The same with neck:

Attached File  13.gif   123.59KB   17 downloads

In order to export the animation you will have to first bake it. Chose the rig from layer 3 and press space bar and type in "Bake Action".

It's only a model... /// My channel on YouTube /// CGtrader , Turbosquid


#3 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36405 posts

Posted 02 August 2013 - 10:35 PM

This will be very useful for people using Blender; thanks very much!

#4 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5592 posts

Posted 03 August 2013 - 03:15 AM

It looks incredibly useful, but I don't have enough information how to use it.

I cannot export anything.
I made a simple test animation, I go to layer 3 and select the normal skeleton (looks like the one I've been animating previously).
Space, bake action, set the end frame, uncheck "Only Selected" to get all the data, Bake data: Pose. OK.
Select all the proguard* meshes. Select skeleton from layer 3. File/export/md5 exporter.

I get an error message "Object 'int' has no attribute 'animation data'."

Any ideas? The dopesheet shows all the movement information for the normal skeleton (layer 3) and exporting should work similarily to my workflow with the previous animations.
Clipper
-The mapper's best friend.

#5 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5592 posts

Posted 03 August 2013 - 05:20 AM

Running out of time now, but I have a feeling it might be related to that the normal skeleton is not visible in the dopesheet. Only your special rigging armature control is present there. That's the only big difference I am seeing between my working setup and your rigging blender.
Clipper
-The mapper's best friend.

#6 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1579 posts

Posted 03 August 2013 - 09:56 AM

I'm sorry, I have no idea why it doesn't work. MD5 exporter can be a pain in the ass. Anyway I packed a backup file I had which seems to work. Check the link in first post. One thing I know is important is to make sure that in both windows you have the same layers open. Even if in one window you have an action editor open it still matters (see animated gif):

Attached File  layers.gif   180.92KB   17 downloads

It's only a model... /// My channel on YouTube /// CGtrader , Turbosquid


#7 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5592 posts

Posted 03 August 2013 - 06:32 PM

Okay, now I got it to export... Not sure what I did, maybe adjusting the layers that are visible in the other window.

The anims seem to work ingame, but unfortunately the shadows wink off for the duration of the animation. Nothing seems to help with that.

What a shame. :(
Clipper
-The mapper's best friend.

#8 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1579 posts

Posted 03 August 2013 - 06:38 PM

Yes, the workaround for that I used was to import the md5.anim to Blender 2.49 and export again from there. That will fix the shadows.

It's only a model... /// My channel on YouTube /// CGtrader , Turbosquid


#9 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36405 posts

Posted 03 August 2013 - 06:46 PM

Sounds like it's not exporting the shadowmesh for some reason.

#10 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1579 posts

Posted 03 August 2013 - 06:48 PM

That's not it. Shadowmesh is in md5.mesh not in anim. Also, the shadow is there but it sometimes disappear. It's a really weird bug.

It's only a model... /// My channel on YouTube /// CGtrader , Turbosquid


#11 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5592 posts

Posted 04 August 2013 - 02:53 AM

Hooray! Got it to work.

Workflow:
1) Make anim with Arcturus' blender rig file (This runs in blender 2.63)
2) Export anim into md5anim. (If this animation file is now directly put into TDM, the shadows will be borked.)
3) Import the anim from step 2) into another version of blender that has an import script (blender 2.61). You need to have a md5 mesh open in the blender file, of course. Save the work into a blender file.
4) Open the blender file from step 3) in blender 2.63.
5) export.

Shadows are working, animation is working. I only need blender versions 2.63 (has an export script) and 2.61 (has an import script). Benefit is that one does not need to use much older versions of blender.

Theory: The presence of the Arcturus custom rig in the blender file somehow affects the md5 export, resulting in a shadow-defect in the animation file. One must import the animation and export it again from a blender file that has nothing else but the animation and the mesh. This generates a 'clean' animation file.

Looking at the working and shadow-problematic animation files with a text editor reveals that they are the same, except the "bounds"-part are different. (Frame command data is omitted, because they are the same)

Shadow-problematic:
Spoiler


Working
Spoiler


What this means, someone more wise can tell. Or then it is just a mystery that does not need to be solved, because we can sidestep it with some extra workflow.
Clipper
-The mapper's best friend.

#12 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5592 posts

Posted 04 August 2013 - 03:14 AM

Now, only one question remains:

I've noticed most of our animations start with the AI standing in a pose like this:
Posted Image

How can I get this pose as a starting point in Arcturus' rig? If I import an md5anim that has this pose into Arc's rig, I get a mess. If I open a blender file with this pose and copy the pose and try to paste it into Arc's rig, I don't get the same pose, but something incorrect.

How is the armature control linked to the normal armature in layer 3? Could one reverse the linking so that I could change the pose by pasting the starting-point-pose into the layer 3 skeleton and the armature control skeleton would adjust accordingly?
Clipper
-The mapper's best friend.

#13 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1579 posts

Posted 04 August 2013 - 03:47 AM

Possibly the best solution is simply to pose it manually as close as possible. It shouldn't be noticible in game if the difference is small since there's a couple of frames of blending between animations.

It's only a model... /// My channel on YouTube /// CGtrader , Turbosquid


#14 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5592 posts

Posted 04 August 2013 - 04:38 AM

Ah, true that. Thanks!
Clipper
-The mapper's best friend.

#15 onemars

onemars

    Newbie

  • Member
  • Pip
  • 1 posts

Posted 27 October 2013 - 04:34 PM

The link in the OP seems dead...

#16 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1579 posts

Posted 29 October 2013 - 01:30 PM

I edited the first post. After couple of days it will be deleted again. Somebody should put it on our servers.
  • onemars likes this

It's only a model... /// My channel on YouTube /// CGtrader , Turbosquid


#17 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 18642 posts

Posted 29 October 2013 - 02:07 PM

I can do that, file is only 700k (Is that the right file size..?)

As the file is so small it could be uploaded to our wiki with a small article based on your second post.

#18 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1579 posts

Posted 29 October 2013 - 02:15 PM

Yep, it's 5,21 MB after unpacking.

It's only a model... /// My channel on YouTube /// CGtrader , Turbosquid


#19 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5592 posts

Posted 01 November 2013 - 03:25 PM

Yes, the workaround for that I used was to import the md5.anim to Blender 2.49 and export again from there. That will fix the shadows.


Hey, it turned out my shadows are still borked during animations. The md5 exporter does something wrong with the newer versions of blender I am using.
One can analyze animation health with r_showskel 1, see below:

Healthy bounding box:
Posted Image

Bad bounding box during animation (is no longer a box, but a sheet, which probably causes the visibility problems for the engine):
Posted Image

Could you please write detailed instructions how I install the md5 import and export scripts to blender 2.49 and how I import and re-export the anims? I cannot use this version of blender at all, I cannot find even a way to install the scripts.

Thanks! If I don't figure this one out, I can as well quit my animation efforts as the results will be always borked because of the wonky md5 exporter. :.(
Clipper
-The mapper's best friend.

#20 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5592 posts

Posted 01 November 2013 - 04:52 PM

Fantastic news!

I found a md5 exporter script that works for Blender 2.68a.

The script is here:
http://arxendofsun.s...o_scene_md5.zip

Instructions here:
http://sourceforge.n...MD5%20exporter/

Quick guide:
1) In Arcturus' rig bake the action onto the bone system in layer three.
2) Properties editor / Scene / MD5 export setup
3) Set bone layer to 3. Choose all the bones in layer 3 and press the ADD SELECTED button.
4) select any part of the 3d mesh. (Part of the builder guard, the coat for example. Choose the mesh part ONLY, do not choose bones.)
5) File / export MD5. Remember to uncheck the REORIENT option.

Exporter works. It is seems to be more realiable than any exporter I've used thus far. Animation works. AI character bounds are correctly. No shadow anomalies.

All praise the Arx EOS Exporter!! This is truly heaven sent.
  • Springheel and Bikerdude like this
Clipper
-The mapper's best friend.

#21 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36405 posts

Posted 01 November 2013 - 06:39 PM

So does that mean you could start using blender motion capture libraries?

#22 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5592 posts

Posted 02 November 2013 - 12:56 AM

I do not know. What's preventing the usage of such libraries?
Clipper
-The mapper's best friend.

#23 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36405 posts

Posted 02 November 2013 - 07:12 AM

Arcturus was working on it a while back but was having exporting issues: http://forums.thedar...post__p__282407

#24 Sotha

Sotha

    Vertical Contest Winner

  • Active Developer
  • PipPipPipPipPip
  • 5592 posts

Posted 02 November 2013 - 07:29 AM

Maybe A should examine the new exporter and see if it solves the problems?

I only know it works with A's rig and solves the bounding box / shadow issues.
Clipper
-The mapper's best friend.

#25 Arcturus

Arcturus

    Advanced Member

  • Development Role
  • PipPipPip
  • 1579 posts

Posted 03 November 2013 - 10:48 AM

Arcturus was working on it a while back but was having exporting issues: http://forums.thedar...post__p__282407

The post you're referring to is old. Since then I managed to export mocap animations. The running and jogging animations are (highly) modified CMU mocap animations. The problem is, working with those mocaps is painful. Later in the same thread I struggled to get walk animations into Dark Mod. Since mocap has key frames on every frame, doing even simple corrections is very time consuming. Since then I created proper rig in Blender and I wouldn't want to use CMU library again. Much better would be to have a custom mocap system.

It's only a model... /// My channel on YouTube /// CGtrader , Turbosquid




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users