sprockets A:M Decaling Screen frosted donut medals buildings Rubik's Cube Nidaros Cathedral Tongue Sandwich
sprockets
Recent Posts | Unread Content | Previous Banner Topics
Jump to content
Hash, Inc. - Animation:Master

Recommended Posts

Posted

Finishing a walk cycle (i.e. mirroring the left half to the right half) is tedious--there's a ton of copy bones/shift timeline/paste mirrored work involved, and that's assuming everything goes well. If you're unlucky enough that you need to tweak an existing walk cycle, you aren't going to want to use the "key skeletal" filter for fear of overriding existing keyframes, which means you're going to be spending a long time copying and pasting individual bones so you don't mess up the rest of the cycle.

 

But there's no reason this process can't be automated! All the necessary information is right there in the action file--all it should take would be a simple script.

 

I'm willing to build this script myself, but there's just one problem. I only know two scripting languages: Applescript and Javascript. Applescript is Mac-only and Javascript isn't really suited for manipulating large amounts of text, thus neither one is really a good choice for a utility like this. Ideally the language used would be Perl or some other server-side scripting language that would allow this Walk Cycle Flipper to live on a server somewhere for all to enjoy. (Unless someone wants to make it into a proper plug-in, which is fine by me.)

 

I can spell out what this script would have to do:

 

1. Scan the .act file for any bones that have "left" or "right" in their names. Store this list.

 

2. Prompt the user to choose which side--left or right--will be used as a basis for mirroring. (For this example, let's use "left.")

 

3. Show the bone names to the user in the form of a checklist. Allow the user to uncheck those bones which should be ignored by this script.

 

4. Have the user specify the length, in frames, of one stride. (This number would be half the total length of the walk cycle. For the purposes of this example, let's say it's 30.)

 

5. Copy all the checked "left" bones' keyframe, transformation and rotation values, and store them.

 

6. Offset the "left" keyframe values by the stride length, with wrapping. (A keyframe at 15 --> 45; a keyframe at 36 --> 6.)

 

7. Invert all the stored X-transformation values. Invert all the stored Y-rotation and Z-rotation values.

 

8. Write the stored values into the "right"-side bones.

 

9. Save the file.

 

Can anyone help me with this? I'm pretty sure it would be a really valuable utility...

  • 1 month later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

I could probably help with it. ^-^ It'd be a really nice feature to have in Hash -- Blender's got it, and it's wonderful for walk cycles.

 

First things first, you'll want to pick a proper language; while Javascript would work fine, there isn't a nice implementation of it outside a web browser. I recommend Python mixed with Platypus (if that site ever goes back up) for prototyping, moving to a real plugin at a later date.

 

You know where to find me.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...