PDA

View Full Version : Instancing Rigged character with offset keyframes


jaygarrison3d
12-09-2010, 08:40 PM
Ok, I've found several discussions on this topic, but either way over my head, or inapplicable to my situation.

Basically I have this one creature, that I want to fill the sky with. He has a looping animation and instances fine to my particles. The catch is that I want to offset the individual animation so that they're wings aren't flapping in unison.

Yes, I know I can duplicate a sequence of poses, but the character is fairly detailed, has fur, driven by bones and is fairly long.

So is there a way to randomly assign the start frame to reference the instance per-particle? I keep seeing similar things but particles are really just not my thing.

And please talk to me like i'm 4. I don't consider myself a Maya noob, but when it comes to mel and particles i'm a babling retarded baby. :argh:

wallabee
12-09-2010, 10:10 PM
Maya's instancer instances geometry, not rigs.

What that means is that you can't interact with the rig through the instancer. What you want isn't possible, technically.

From your post I gather you already know this, but the best solution for your problem is to duplicate the rig and offset the animation. Do that a couple times, instance all the duplicated rigs, create an objectId per particle attribute, set that on createion to a rand(#) where # is the number of duplicated rigs.

There are even more janky, complicated ways of doing this but I'd start there.

jaygarrison3d
12-09-2010, 10:24 PM
Maya's instancer instances geometry, not rigs.

What that means is that you can't interact with the rig through the instancer. What you want isn't possible, technically.

From your post I gather you already know this, but the best solution for your problem is to duplicate the rig and offset the animation. Do that a couple times, instance all the duplicated rigs, create an objectId per particle attribute, set that on createion to a rand(#) where # is the number of duplicated rigs.

There are even more janky, complicated ways of doing this but I'd start there.

Yeah I think we're on the same page. I'm wondering if I cache and merge the geometry. I'm trying to see if it can assign each instance a time step of the animation based on it's particle ID. So I guess I was getting close but I think you're right, not possible.

I think you're idea is the best. If you could indulge me in a step by step? I think I follow what you're suggesting, I'm just bad at the syntax. If my particle was called say "particle" and I had 5 versions of my creature animated titled "creature_1, creature_2... etc" What would that expression look like?

I'll do my best to figure it out. I know just enough to get myself into trouble with this stuff.

jaygarrison3d
12-10-2010, 03:55 AM
Mr. Wallabee you're a life saver...

Here's the steps I came up with.

Animate character
Duplicate with input graph X amount of times. More copies means more randomness.
Offset animations in graph editor, set keyframes to loop.
Instance to particles (Generated however best suiting your crowd, flock, etc.)
Set instance to Cycle
Set particle Cycle Options "Age" paramater to Particle ID.

If i'm leaving anything out or if anybody knows a way to improve on please let me know!

Thanks again.

wallabee
12-10-2010, 08:52 PM
Go to your per particle attributes on the particle and do an add per particle attribute. Call it objectId and make it a float. Then right click in the text area for that new per particle attribute and add a creation expression.

In there do an "objectId = rand(5)" where 5 is the number of instances. Then scroll down to the instancer section and set your objectId to your new attribute, objectId.

Sorry, I'm on a Houdini machine at work, no Maya to test this with. Going off of my memory ..

wallabee
12-10-2010, 08:57 PM
Sorry, I meant change your Object Index under your Instancer settings to ObjectId.

CGTalk Moderation
12-10-2010, 08:57 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.