• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Get your art tools and paintbrushes ready and enter Hive's 34th Texturing Contest: Void! Click here to enter!

How can I change the bone and mirror it in animation

Status
Not open for further replies.
Level 21
Joined
May 29, 2013
Messages
1,566
Afaik, there is no tool that automatically mirrors animations. You can do that manually in War3 Model Editor (or even Notepad), but that's very tedious (I know from experience) and could take some time.

By the way, you can horizontally flip animated models with Matrix Eater.
Grunt.png
 
Level 21
Joined
May 29, 2013
Messages
1,566
@Hermit , just flipping the model caused some animations to glitch.
Strange, it works perfectly for me. Are you sure you're using the latest version?

Try checking "Show pivot points" and "Only show parents of active geosets" in the second tab of the View Controller (puruple button) before mirroring.
I wanted to flip only a few animations (only 2 I think)
You can't only flip two animations. This process flips the entire model and all of its animations.
 
Last edited:
Level 21
Joined
May 29, 2013
Messages
1,566
It didn't worked either. I'm using the Villager 255 animations and I needed to mirror the Defend animations so the model uses the shield on left hand instead of right.
I just tested it with that model and you're right, some animations become glitchy after mirroring. Sadly, I don't think there's a way to fix it. You could manually edit all vertices, nodes, translations, rotations, etc. However, there are thousands of them and that would take like a few months (ain’t nobody got time for that), so I think you should probably give up. :sad:
 
Last edited:
Level 21
Joined
May 29, 2013
Messages
1,566
I just wanted to change two animations, I would need to change them all to do so ?
It looks like this model has perfectly symmetric bones, so it might not be that hard after all.


You'll need:
- Magos' Model Editor
- A lot of patience
- Preferably some basic knowledge about animations

Make a copy of the model before doing anything.
Open the model in Model Editor.
Go to Windows -> Sequence Manager.
Find the animation you want to flip and open it.

You'll see two important values there. The values are in the ''Interval'', named ''From'' and ''To''. From is the starting (key)frame and To is the end frame of the entire animation.
Now open Notepad and paste them (or write them down somewhere), like this:
From: 12345
To: 54321

Close the Sequence Manager.
Go to Windows -> Node Manager.

Individual nodes (there's only one of them) are nodes like: Bone_Root, Bone_Pelvis, Bone_Chest, Bone_Head...

For every individual node (bone or helper) I mentioned above:
Right click the node and select "Edit Node".
Click the "Translation" button.
Scroll down until you find the starting frame of the animation you want to flip.
It will look like this (but with different numbers):
12345: { 3.8926, -1.27079, -20.5004 }

Now you need to reverse the sign of the second number in brackets. If the number is positive, add - in front of it. If the number is negative, delete the minus. If it's 0, don't do anything.
So in my example above, -1.27079 should be changed to 1.27079.
If "Interpolation Type" is set to "Bezier" or "Hermite", next two lines/rows are indented and stard with InTan or OutTan, so you should do the same thing (reverse the sign of the second number in brackets).
Do the same thing in every row that starts with a frame number that is contained in the interval of the animation (between 12345 and 54321).
Do this until you're done with the row that starts with the last frame of that animation (e.g. 54321) and it's InTan and OutTan (if there are any).
When you're done, click OK.
Now click on "Rotation" (it's below "Translation").
Do the same thing here, but instead of reversing the sign of the second number, reverse the sign of every first and third number in { } in every row that starts with a frame that is contained in the interval of the animation.
When you're done click OK (two times).

Some nodes have a matching counterpart on the opposite side that usually has the same name, but with a different tag (L-left, R-right):
Bone_Leg1_L = Bone_Leg1_R
Bone_Leg2_L = Bone_Leg2_R
Bone_Foot_L = Bone_Foot_R
Bone_Arm1_L = Bone_Arm1_R
Bone_Arm2_L = Bone_Arm2_R
Bone_Hand_L = Bone_Hand_R

It's good to have another unedited copy of the same model opened simultaneously (in a new Model Editor Window), when you're editing nodes with matching counterparts.
Right click the node and select "Edit Node".
Open "Translation" and scroll down until you find the starting frame of the animation you want to flip.
Replace all rows (that start with a frame number that is contained in the interval of the animation) with matching rows from the node's counterpart from the unedited copy of the same model. E.g. if you have opened "Bone_Arm1_R", you need to replace all of it's translations (and rotations) that happen during that animation interval with translations (and rotations) of "Bone_Arm1_L".

After replacing them you also need to reverse the signs, just like with individual nodes:
-for translations: reverse the sign of the second number inside { } in every row that starts with a frame that is contained in the interval of the animation.
-for rotations: reverse the sign of the first and third number inside { } in every row that starts with a frame that is contained in the interval of the animation.

It will work if you manually connect the bones in the import menu. For example you need to import bone hand r to bone hand l.
What do you mean? Just to clarify - Most animations work after flipping the model, but some look glitchy, like their rotations weren't mirrored correctly.
 
Last edited:
Level 61
Joined
Dec 29, 2014
Messages
2,034
It looks like this model has perfectly symmetric bones, so it might no be that hard after all.


You'll need:
- Magos' Model Editor
- A lot of patience
- Preferably some basic knowledge about animations

Make a copy of the model before doing anything.
Open the model in Model Editor.
Go to Windows -> Sequence Manager.
Find the animation you want to flip and open it.

You'll see two important values there. The values are in the ''Interval'', named ''From'' and ''To''. From is the starting (key)frame and To is the end frame of the entire animation.
Now open Notepad and paste them (or write them down somewhere), like this:
From: 12345
To: 54321

Close the Sequence Manager.
Go to Windows -> Node Manager.

Individual nodes (there's only one of them) are nodes like: Bone_Root, Bone_Pelvis, Bone_Chest, Bone_Head...

For every individual node (bone or helper) I mentioned above:
Right click the node and select "Edit Node".
Click the "Translation" button.
Scroll down until you find the starting frame of the animation you want to flip.
It will look like this (but with different numbers):
12345: { 3.8926, -1.27079, -20.5004 }

Now you need to reverse the sign of the second number in brackets. If the number is positive, add - in front of it. If the number is negative, delete the minus. If it's 0, don't do anything.
So in my example above, -1.27079 should be changed to 1.27079.
If "Interpolation Type" is set to "Bezier" or "Hermite", next two lines/rows are indented and stard with InTan or OutTan, so you should do the same thing (reverse the sign of the second number in brackets).
Do the same thing in every row that starts with a frame number that is contained in the interval of the animation (between 12345 and 54321).
Do this until you're done with the row that starts with the last frame of that animation (e.g. 54321) and it's InTan and OutTan (if there are any).
When you're done, click OK.
Now click on "Rotation" (it's below "Translation").
Do the same thing here, but instead of reversing the sign of the second number, reverse the sign of every first and third number in { } in every row that starts with a frame that is contained in the interval of the animation.
When you're done click OK (two times).

Some nodes have a matching counterpart on the opposite side that usually has the same name, but with a different tag (L-left, R-right):
Bone_Leg1_L = Bone_Leg1_R
Bone_Leg2_L = Bone_Leg2_R
Bone_Foot_L = Bone_Foot_R
Bone_Arm1_L = Bone_Arm1_R
Bone_Arm2_L = Bone_Arm2_R
Bone_Hand_L = Bone_Hand_R

It's good to have another unedited copy of the same model opened simultaneously (in a new Model Editor Window), when you're editing nodes with matching counterparts.
Right click the node and select "Edit Node".
Open "Translation" and scroll down until you find the starting frame of the animation you want to flip.
Replace all rows (that start with a frame number that is contained in the interval of the animation) with matching rows from the node's counterpart from the unedited copy of the same model. E.g. if you have opened "Bone_Arm1_R", you need to replace all of it's translations (and rotations) that happen during that animation interval with translations (and rotations) of "Bone_Arm1_L".

After replacing them you also need to reverse the signs, just like with individual nodes:
-for translations: reverse the sign of the second number inside { } in every row that starts with a frame that is contained in the interval of the animation.
-for rotations: reverse the sign of the first and third number inside { } in every row that starts with a frame that is contained in the interval of the animation.


What do you mean? Just to clarify - Most animations work after flipping the model, but some look glitchy, like their rotations weren't mirrored correctly.
Nevermind, I meant something else. When you want to add additional animation from the same model but with flipped animations/bones.
 
Level 11
Joined
Oct 9, 2015
Messages
721
I'll try it out and post the results. I wanted to ask how can I add a the flipped animation as a new animation, so I have the original and the flipped one...

EDIT: Somehow the Bone_Root numbers can't be negatived, I can't add the (-) sign on it. It's an node with an ! sign on it instead of a blue bone picture. what I'm doing wrong ?
 
Last edited:
Level 21
Joined
May 29, 2013
Messages
1,566
I wanted to ask how can I add a the flipped animation as a new animation, so I have the original and the flipped one...
You can duplicate the animation with Matrix Eater before flipping it. First, make a copy of the model. Then, go to File -> Simple Import and import that animation from the copied version.
EDIT: Somehow the Bone_Root numbers can't be negatived, I can't add the (-) sign on it.
That's odd. You can try to do it with notepad. You need to use MDLX Converter to convert the model from .mdx to .mdl, so it can be opened with notepad.
It's an node with an ! sign on it instead of a blue bone picture.
Yes, "Bone_Root" nodes are usually helpers, not bones (although they are called bones). Unlike bones, helpers can't have any vertices attached to them, but they can move, rotate and scale other bones (and helpers) that are attached to them.
 
Last edited:
Level 28
Joined
Jun 20, 2013
Messages
769
Well, there are ways to repair the gitch on the model but is the boring method.

Open the Original model in magos, find the bone glitched, copy the information from the sane model and paste it on the bugged model. I reported this to Retera, the mirror process "eat" information.
 
Level 11
Joined
Oct 9, 2015
Messages
721
I'm doing it throught note pad, the model didn't opened after the adition until I realized I had to change the number of translations on that node to match what I had added. I have changed two animations so far (Stand Defend and Walk Defend) and I'm working on the third (Attack Defend) but things are getting a little complicated as the arms are somehow glitchy, I'll try to figure it out! @Hermit you looks like someone who knows a lot about animations, do you by any means takes requests? I already have an thread on the requests forum, it must be buried deep under the forum as it didn't had any response in several months...
 
Level 21
Joined
May 29, 2013
Messages
1,566
I have changed two animations so far (Stand Defend and Walk Defend) and I'm working on the third (Attack Defend)
It's good to hear that you're learning and making progress.
@Hermit you looks like someone who knows a lot about animations
Not really. I've just been editing models for a few years and learned some things. If someone knows a lot about animations, it's BlinkBoy.
do you by any means takes requests?
Sorry, I'm really busy, so I don't take requests.

You have one more option. You can combine two separate models and make the flipped model only visible in certain animations. This video shows you how to combine models, but that will drastically increase (double) the model's file size.
 
Level 11
Joined
Oct 9, 2015
Messages
721
@Hermit , do you know how can I merge two animations? for example I want the lower body (legs) animation from the "walk" animation to combine with the upper body (chest, arms) animation from Attack Morph 4 , how can I merge the lower body party of an animation with the upper body from another animation ? To be clear, I want to have an walking attack animation.
 
Level 21
Joined
May 29, 2013
Messages
1,566
@Hermit , do you know how can I merge two animations? for example I want the lower body (legs) animation from the "walk" animation to combine with the upper body (chest, arms) animation from Attack Morph 4 , how can I merge the lower body party of an animation with the upper body from another animation ? To be clear, I want to have an walking attack animation.
In this video, all leg motion from Attack animation was imported into Attack upgrade animation while the rest of the animation (motion of arms, chest, head, etc.) remained unchanged. That part comes after 8:15, but I suggest that you watch the whole video. By the way, a walking attack will surely require a lot of triggering to work properly.
 
Last edited:
Status
Not open for further replies.
Top