How do I re-use and duplicate my animated character?

I am currently wanting to do a scene where hundreds of green spacemen storm a building. I have modelled, rigged and animated a run cycle for a character, converted them to actions etc. What I would like to do now is import this character to the scene with the building, and make x number of instances of him which will all be animated by the same run cycle action, but each slightly offset in time. However, I am not making much progress at all with this task.

To begin with, I am just totally confused when it comes to Blender’s append/link-feature. As I might still want to finetune some parts of the model or the run cycles, using link rather than append seems to be the wise thing to do. However, right-selecting the object->spaceman and object->armature produces a model that, while animating smoothly, stays in place and cannot be moved in the building scene by any means. If this is how the link option works, then what is it meant for if you cannot move the character at all in the scene from which you link the character?

Using append is an option of course, but I somewhat like the idea of being able to edit the character at a later stage without having to modify the building scene.

Anyone who knows how to solve this?

For generating crowds I 'd do a search on the forum for harkyman’s python script … I think it’s called “Blender People” or something like that … or PM him . It involved using MySQL(also could be wrong …) which is an outside program for networking (something like Verse) and harkyman’s script . Personally I have never tried it as the above outside program could, if you don’t take precautions, leave your computer vulnerable online . And I was very inexperienced with Blender to try it at the time I read about it last fall …

But from the examples harkyman produced it seemed very worth the trouble to search it out . And would probably be easier then trying to append and link more then a few characters at a time …

Harkyman (aka Roland Hess) is the editor of the new “Essential Blender” book …

In the Library File (where the spaceman and his actions are) select all Objects related to him; Armature, Mesh(es), Target Empties, Curve(s) if he’s on a Path, lazers, guns etc… and make it a Group (Ctrl-G) and in F7, Object and Links tab, call it Spaceman.

Open the file with the building in and hit Shft-F1, click Link and navigate to the Spaceman file and choose the Group lib. MMB Spaceman.

Hit Spacebar >> Add >> Group >> Spaceman. Now you can duplicate him with Shft-D and place the duplicates where you want them. The walkcycle will be relative to the Empty that defines the Group.

Be prepared for major slowdown.

%<

okay, a couple options here I guess.
this is harkyman’s blender people website, that has the necessary programs and some demos.
http://www.harkyman.com/blender-people/

just a quick note, MySQL is a database system for managing data, blender people has nothing to do with networking and I’m struggling to find a substantial connection to Verse
anyways, you can investigate that and see if that what you want.

Another route you can try, which falls in line with your original question.
In the file with your character, put all your character objects and armature into a group and name the group. Have the run cycle activated on the character.
in the file with the building, instead of appending, you will want to do a relative link.
relative links require saving the blend file first so do that.
now, press shift-F1 to open the append menu. In the header, find the button “Link” and “Relative” and make sure that they are both activated, (append should be off).
now, instead of importing your character as objects, select Group, and import the group that you added your character too.

Nothing will appear on your screen immediately. To create an instance of the imported group, do Add->Group->filename->groupname
where “filename” will be the file you are linking from, and groupname is the name of the group.

This adds an empty with dupligroup activated. Copy this empty for as many characters as you want. To offset them, use the TimeOffset numerical slider in the Object buttons (bottom of the Anim settings panel)

for your needs, this may be sufficient.
Since we have relatively linked the character, if you go back and say, tweak the run cycle of the character in the original file, it will be reflected any file that links it. you can even change the model, materials, textures, etc.

here is some more information on linked libraries
http://wiki.blender.org/index.php/Manual/Using_Linked_Libraries

and you might find a needle of information in the haystack that is my post in this thread:
http://blenderartists.org/forum/showthread.php?t=99153

=====
read your post a little more carefully this time.

okay, it seems you know how to link.
The reason you are unable to affect objects you link is that everything is linked from the original file and you cannot change it unless…
you can make the objects that you import local. you can do this in the outliner, by selecting library objects (there should be a bright orange symbol next to linked objects)
right click->make local.
or go to their object panel and click on the orange linked button next to its name to make it local. This makes the object local so that you can give it an IPO etc. relevant data like meshdata etc will not be made local unless you do so explicitly.

a somewhat better way, (necessary in some cases) is to use proxy objects, described in the link I posted above.

In your particular case, I believe the imported Group method is the simplest way to encapsulate what you want, assuming you don’t go with a more elaborate setup. This is as I described above.

It can be hard to work your head around all these dependencies and whats getting linked from where, and what not. Hopefully this clears a little bit up but feel free to follow up If I have just been confusing.

=======
EDIT:
grrr i write all that out and fligh beats me with a four line summary that says the same thing :mad:

I’m sorry man. We really need a list that shows who’s viewing.

%<

haha, that would be nice. wasn’t actually upset, just find it funny that I’m so long winded when the essentially the same amount of information can be conveyed with just a few sentences.

Not to take away from his thread but what is the benefit of linking instead of just appending?

lots.

consider working on an animation with multiple shots and settings, split between multiple different files, that use the same character.
The character is created and appended into every scene and file that needs it.

oops, apparently you made a mistake rigging the character, or decided you want to tweak materials etc. If you appended, each copy is unique, so to make the changes you either need to make the same changes in each and every one of the files, or re-append.

Now consider linking. instead of appending, you used relative links to your character from all the different files. To change anything about the character you enact those changes exactly once.
This is desirable. Even more so when working on a large project with multiple different people.

So basically, organization and facilitation of changes. There are many more cases than the one I described.

For small to medium sized projects, working on your own, one file with multiple scenes may suffice. nevertheless, organization is key to not wasting time and a necessity for collaboration.

some other moderately coherent thoughts here, (again, I linked to this earlier but it may have been buried)
http://blenderartists.org/forum/showthread.php?t=99153

Thanks guys! The group method seems to be what I aimed for. I finally have two spacemen running individually. :smiley:

I have glanced over Blender People and it seems to be a somewhat attractive solution,. (though having to use a custom build of an older version of Blender put me off a little) However, the scenarios it shows with armies killing off each other one soldier at a time doesn’t fit my goal very well. I want all the spacemen to run through the door and it is important that there are no ugly artifacts such as limbs passing through the wall or the like.

But maybe this is just a case of defining good boundaries for the army and putting an enemy soldier inside the building. It would be nice if the spacemen could also storm the building by jumping through the windows, which might be more problematic with Blender People.

My backup solution is to animate lots of spacemen for exactly as many frames as the run cycle lasts, and position them so that the animation can be looped indefinitely. I figure I can also try to cheat a bit by grouping several randomly placed spacemen. Since this is just a silly cartoon style animation, it doesn’t have to look very realistic, as long as it looks cool. They are already meant to run inside a building too small to fit all of them, adding a surreal touch to the animation. So it’s not entirely unacceptable for them to run in a line.

Anyways, I should research these worries on Blender People myself, just figured it would be best to know how to link stuff properly first. Not every scene will be a crowd-type scene anyway, so knowing how to do this the usual way will come in handy.

But if anyone has first-hand experience with using Blender People, please share your thoughts on it with me.

the only problem I have had with it is getting Mysql to configure.

Ok, it looks like I am again lost in the NLA labyrinth. I have chosen to animate stuff by hand rather than using Blender People, since the animation doesn’t have to be very realistic. Since my run cycle has been converted to an action which can be tweaked in the NLA editor, I figured that getting the spacemen to run inside the building would just be a matter of letting the run cycle execute and moving the “master” bone in the armature in two distant frames until the spaceman no longer slides on the ground.

However, as soon as I try to add a keyframe to the master bone, the run cycle executed will no longer be the action in the NLA editor, where the run cycle is set to loop a couple of times. The result is a spaceman that only executes one cycle in the run cycle, after which he slides forward in a numb pose.

What is happening here, and what is a good solution for the problem?

My .blend file can be examined at http://www.student.itn.liu.se/~miciw347/hus3.blend

And the spaceman character it links to is in this file: http://www.student.itn.liu.se/~miciw347/rymdeman.blend

Though now that I think about it, I can’t seem to find where inside hus3.blend the link to rymdeman.blend is defined. This would be good to know if the path changes, so I hope anyone can enlighten me on where to edit it.

only executes one cycle in the run cycle, after which he slides forward in a numb pose.

The runcycle is actually only 10 frames, but you have “master” keyed at frame 40. So he runs for 10 frames then has to wait (slide) till frame 40 before he can repeat the action. Don’t Pose the master bone, Keyframe the Armature Object (in Object mode).

You don’t have any links to outside Library files. You would find them in the Outliner (if they were there) in the header menu as Libraries, or in the OOPS window by clicking the orange, Library Data icon. You can edit it by Ctrl-LMB on the entry.

%<

Hmm, looks like I screwed it up earlier. I think I got it right now though. I can move an “empty” that moves both the armature and the mesh at once. However, I get no access to more low-level information.

You can edit it by Ctrl-LMB on the entry.

Actually, trying this just gives me an error message saying “can’t edit external lib data”. Is this wrong then?

Since I have no access to low-level information, I have to set up the spaceman to execute the run cycle repeatedly in the NLA editor inside the .blend file containing the spaceman. However, this means that all spacemen will run identically. I solved this by noticing the "TimeOffset " field in the “Anim settings” section for the empty, which allows me to do what I want.

Still, I have the problem that I will need to use a few more actions for the spaceman (to let some spacemen jump through the window, one fire his weapon etc) and saving a separate .blend file for every move the spaceman is supposed to execute again seems to be a bad solution if I want to tweak the spaceman later on. How is it possible to solve this problem?

Thanks a lot for helping out. These techniques sure aren’t easy to find out on your own, even after reading the manual.

not being able to access low level info is correct.

One thing you can do is use a proxy object. select the empty, and press Ctrl-Alt-P. This pops a list of all objects in the group. select the armature. The armature is now a proxy object and you can edit its actions locally. This is useful for say linking a single character in multiple shots. empty for simple access to the entire character, but you can still control the armature.

However, due to the implementation, or the implementation not being complete yet (I seem to recall the blender.org site mentioning something in the featurelist about this still being worked on). if you make proxy objects for several different instances of the same group, they will always use the same action, even if you make the actions unique in the editor. So it will really only work for one, or where all instances move exactly the same, or with some offset using timeoffset.
If you are using a unix based system there is a sketchy hack/workaround that involves the use of symbolic links, and having many different symbolic links to the one library file.
Anyways, once that ability is ironed out it should be easier.

for right now:
No need to have different files. you can duplicate your character in the one file and simply put the duplicated version into a different group. note that, by default, actions are linked on duplication so you will need to make them unique in the action/IPO editor.

yeah, definitely these feature are the quieter ones, but crucial for large projects. Like with making miniature models or something, its more interesting to look and talk about the shiny pieces than the glue holding it together, but without it you’re just looking at a pile of junk.
right now we’re using elmer’s glue, but hopefully we’ll be using rubber cement or superglue soon enough.
heh, I love terrible analogies :slight_smile:

as a complete offhand comment, I once glued my fingers together with super glue while making a model. That was not fun.

[QUOTE]
You can edit it by Ctrl-LMB on the entry.

Actually, trying this just gives me an error message saying “can’t edit external lib data”. Is this wrong then?

[/quote]

Open the Outliner and select “Libraries” in the Header Menu. Ctrl-click on either the Icon or the Path. Obviously you need to have linkable data at the destination of the new Library in the path you type in.

%<

Hey guys,

I’m actually in a similar situation in our project, as in I need to use multiple identical characters too. We did all the grouping and stuff, but when I link to that group in my scene the materials won’t follow and all I get is a gray character. And now, even if I only try to bring the objects that make up the character the materials stay behind.

I have some much to learn it seems, but do you have any idea what’s causing this?

to clarify: we have one file where the character is, and then a scene/scenes where we need him multiplied. The linking worked before just fine when we only needed one of those characters but now even that doesn’t work, tho we only changed the library file to include the group.

thanks!

j

a minor bug. sometimes, when linking a group, the materials wont show up immediately. save the file and reopen and the materials should now be active.

happens to me about half the time.

haha! can’t believe I almost lost my head because of that. all this time I thought there was something wrong with me :smiley:

on a different note, the applied scaling for the armature doesn’t follow through when linked. Do you have any idea what for? It is 1 in the library file, but 0.3 (just how it was scaled originally) when linked.

strange indeed, huh?

thanks, btw. you’ve already saved half of my day :slight_smile:

ah. never mind, I think we got it. so it happened that my mate didn’t apply the scaling in object mode, and since this is first time for us with these issues, neither really knew where the problem lied :stuck_out_tongue:

Hey, I can’t get it working.

There’s this character I need to have multiple copies of. It has been grouped and linked to the scene.

The thing is, I had to make a proxy for the first copy’s armature since I need it to follow a path (and a simple forward looping walkcycle only works when I can assign the off-set bone too) and now no matter what I do (assigning different actions to different emptys etc.), all the other copies follow its animation. And even the TimeOffset doesn’t work.

I tried putting one copy to another group, but I might be too new to all those group-things to really know what I’m doing. But still, it didn’t really work. Everything I do ends up all the copies following the first one. And no, there’s no walkcycle-action in the library file, since I need to have more flexibility in these scenes. What am I not getting? :confused:

Thanks again.

j