HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Adding attack animation while running?

05-04-2006, 09:00 AM#1
vile
I want to add an attack animation while the Admiral Proudmoore model is walking. How can this be done?
05-04-2006, 10:12 AM#2
Rao Dao Zao
Not entirely sure.

I suspect it may involve copying the attack sequence keyframes for the upper body bones and key redistributing them into the walk sequence... Then anim-transfer the modified sequence into position.
05-04-2006, 11:46 AM#3
Alfred
Be more specific.

Do you intend to create a new animation, however it being the walk animation and the attack animation merged?
05-04-2006, 01:06 PM#4
Whitehorn
He posted it in the mdl editing forum. That would more than suggest he wants a custom animation.
05-04-2006, 02:08 PM#5
vile
Yes, I need a custom animation for that. Just one attack while he walks is enough, I can then loop it with triggers.
05-05-2006, 12:08 PM#6
Alfred
Quote:
Originally Posted by Whitehorn
He posted it in the mdl editing forum. That would more than suggest he wants a custom animation.

However, it will be hard to know if he wants to edit the existing one by *adding* an attack 'feature', or create a new animation basing on the 2. That way, it's harder for me to explain on how to do it.



Anyway Vile, if you're going to create a new animation on the model with the walk and attack, it's gonna be quite tedious and requires alot of patience (like when I did Axey model for Darky). This is solely because the walk sequence is shorter than the attack animation, therefore you need to 'quicken' the attack animation manaully when it's 'merged' with the walk animation.

First, on the sequence section of the MDL, create a whole new sequence naming it the animation you want (I believe you wanna activate the animation via triggers).

The sequence will be based off the walk animation:

Code:
	Anim "Walk" {
		Interval { 126667, 127433 },
		MoveSpeed 250,
		MinimumExtent { -172.896, -162.786, -41.1295 },
		MaximumExtent { 180.71, 161.956, 159.195 },
		BoundsRadius 245.283,
	}

Copy this and paste it as the last section, and replace the first '1' with a '2' (so you know the animation is placed way way back :))

Code:
	Anim "Walk 2" {
		Interval { 226667, 227433 },
		MoveSpeed 250,
		MinimumExtent { -172.896, -162.786, -41.1295 },
		MaximumExtent { 180.71, 161.956, 159.195 },
		BoundsRadius 245.283,
	}

From there, figure out which bones are the lower body ones by looking for the root bone, and start tracking down the chest, and from chest track down pelvis etc. Write their names down, because Blizzard sucks in labeling bones sometimes (and make sure note their helpers).

Once you have done that, start copying all the transformation (rotation, scaling, translation etc) on EACH lower body bone (legs, feet, pelvis etc.) within the 126667 and 127433 period, paste them over at the back of each transformation section. Replace the 1s with 2s.

Example:

Code:
	Rotation 367 {
		Hermite,
.......
		126667: { 0.070364, -0.265819, 0.178172, 0.944798 }, // start copy from here
			InTan { 0.0685033, -0.250116, 0.187087, 0.947496 },
			OutTan { 0.0685033, -0.250116, 0.187087, 0.947496 },
		126705: { 0.026791, -0.137996, 0.194621, 0.970753 },
			InTan { 0.0202892, -0.0719377, 0.21801, 0.97308 },
			OutTan { 0.0202892, -0.0719377, 0.21801, 0.97308 },
		126858: { -0.0843474, -0.271505, 0.00989768, 0.958683 },
			InTan { -0.111189, -0.405776, 0.0175666, 0.907014 },
			OutTan { -0.111189, -0.405776, 0.0175666, 0.907014 },
		126935: { -0.0501608, 0.0897206, -0.104906, 0.989156 },
			InTan { -0.0805641, 0.0975966, -0.121136, 0.984536 },
			OutTan { -0.0805641, 0.0975966, -0.121136, 0.984536 },
		127012: { 0.110148, 0.407787, -0.141338, 0.895322 },
			InTan { 0.14383, 0.5319, -0.155822, 0.819826 },
			OutTan { 0.14383, 0.5319, -0.155822, 0.819826 },
		127127: { 0.16597, 0.198271, -0.09835, 0.960973 },
			InTan { 0.164075, 0.233686, -0.102008, 0.952924 },
			OutTan { 0.164075, 0.233686, -0.102008, 0.952924 },
		127242: { 0.212042, -0.1661, -0.0320114, 0.962509 },
			InTan { 0.241585, -0.111457, -0.0264083, 0.963596 },
			OutTan { 0.241585, -0.111457, -0.0264083, 0.963596 },
		127318: { 0.116303, -0.559627, -0.00160542, 0.820542 },
			InTan { 0.0891052, -0.706386, -0.0287183, 0.701608 },
			OutTan { 0.0891052, -0.706386, -0.0287183, 0.701608 },
		127433: { 0.0703641, -0.265819, 0.178172, 0.944798 },
			InTan { 0.0644716, -0.229734, 0.197287, 0.950865 },
			OutTan { 0.0644716, -0.229734, 0.197287, 0.950865 }, //stop here
		133333: { 0.104823, -0.224453, 0.172426, 0.953364 },
			InTan { 0.106444, -0.226879, 0.171555, 0.952767 },
			OutTan { 0.106444, -0.226879, 0.171555, 0.952767 },
		133600: { 0.102992, -0.217473, 0.173968, 0.9549 },
			InTan { 0.103735, -0.220353, 0.173346, 0.954272 },
			OutTan { 0.103735, -0.220353, 0.173346, 0.954272 },
		133867: { 0.0981611, -0.198922, 0.177954, 0.958711 },
			InTan { 0.0987334, -0.201279, 0.177491, 0.958246 },
			OutTan { 0.0987334, -0.201279, 0.177491, 0.958246 },
		134167: { 0.0902185, -0.167886, 0.184268, 0.96422 },
			InTan { 0.0905842, -0.169747, 0.183972, 0.963916 },
			OutTan { 0.0905842, -0.169747, 0.183972, 0.963916 },
		134567: { 0.0777312, -0.117469, 0.193668, 0.970903 },
			InTan { 0.077276, -0.116023, 0.193975, 0.971051 },
			OutTan { 0.077276, -0.116023, 0.193975, 0.971051 },
		134833: { 0.0708112, -0.0885001, 0.198641, 0.973496 },
			InTan { 0.0699791, -0.0850782, 0.199219, 0.973743 },
			OutTan { 0.0699791, -0.0850781, 0.199219, 0.973743 },
		135000: { 0.0691666, -0.0814838, 0.199802, 0.97399 },
			InTan { 0.0684997, -0.0786404, 0.200269, 0.974174 },
			OutTan { 0.0684997, -0.0786404, 0.200269, 0.974174 },
		135133: { 0.0702482, -0.0861032, 0.199039, 0.973671 },
			InTan { 0.0697403, -0.0839792, 0.199393, 0.97382 },
			OutTan { 0.0697403, -0.0839792, 0.199393, 0.97382 },
		135300: { 0.0738747, -0.101421, 0.196458, 0.972451 },
			InTan { 0.0732784, -0.0993605, 0.196861, 0.972627 },
			OutTan { 0.0732784, -0.0993605, 0.196861, 0.972627 },
		135967: { 0.094007, -0.182775, 0.181292, 0.961712 },
			InTan { 0.0946918, -0.186083, 0.180729, 0.961116 },
			OutTan { 0.0946918, -0.186083, 0.180729, 0.961116 },
		136267: { 0.100895, -0.209448, 0.175713, 0.956596 },
			InTan { 0.101494, -0.211834, 0.17522, 0.956098 },
			OutTan { 0.101494, -0.211834, 0.17522, 0.956098 },
		136500: { 0.104082, -0.221627, 0.173053, 0.953992 },
			InTan { 0.104527, -0.223336, 0.172679, 0.953613 },
			OutTan { 0.104527, -0.223336, 0.172679, 0.953613 },
		136667: { 0.104823, -0.224453, 0.172426, 0.953364 },
			InTan { 0.105403, -0.226662, 0.171935, 0.952866 },
			OutTan { 0.105403, -0.226662, 0.171935, 0.952866 },
		136933: { 0.102992, -0.217473, 0.173968, 0.9549 },
			InTan { 0.103735, -0.220353, 0.173346, 0.954272 },
			OutTan { 0.103735, -0.220353, 0.173346, 0.954272 },
		137200: { 0.0981612, -0.198922, 0.177954, 0.958711 },
			InTan { 0.0989206, -0.202006, 0.177338, 0.958102 },
			OutTan { 0.0989206, -0.202006, 0.177338, 0.958102 },
		137467: { 0.0902186, -0.167886, 0.184268, 0.96422 },
			InTan { 0.0907457, -0.170393, 0.183846, 0.963811 },
			OutTan { 0.0907457, -0.170393, 0.183846, 0.963811 },
		137800: { 0.0777312, -0.117469, 0.193668, 0.970903 },
			InTan { 0.0775197, -0.117017, 0.193798, 0.970948 },
			OutTan { 0.0775197, -0.117017, 0.193798, 0.970948 },
		138000: { 0.0708113, -0.0885001, 0.198641, 0.973496 },
			InTan { 0.0696781, -0.0838179, 0.19943, 0.973831 },
			OutTan { 0.0696781, -0.0838179, 0.19943, 0.973831 },
		138167: { 0.0691666, -0.0814837, 0.199802, 0.97399 },
			InTan { 0.0685193, -0.0787236, 0.200256, 0.974169 },
			OutTan { 0.0685193, -0.0787236, 0.200256, 0.974169 },
		138267: { 0.0702482, -0.0861031, 0.199039, 0.973671 },
			InTan { 0.0697778, -0.0841375, 0.199367, 0.973809 },
			OutTan { 0.0697778, -0.0841375, 0.199367, 0.973809 },
		138400: { 0.0738746, -0.101421, 0.196458, 0.972451 },
			InTan { 0.0741317, -0.102807, 0.196256, 0.972326 },
			OutTan { 0.0741317, -0.102807, 0.196256, 0.972326 },
		139300: { 0.094007, -0.182774, 0.181292, 0.961712 },
			InTan { 0.0985306, -0.201247, 0.177623, 0.958249 },
			OutTan { 0.0985306, -0.201247, 0.177623, 0.958249 },
		140000: { 0.0932652, -0.17979, 0.181883, 0.962235 },
			InTan { 0.0919202, -0.174566, 0.182947, 0.963124 },
			OutTan { 0.0919202, -0.174566, 0.182947, 0.963124 },
		143333: { 0.104643, -0.223783, 0.172579, 0.953513 },
			InTan { 0.104896, -0.224755, 0.172366, 0.953295 },
			OutTan { 0.104896, -0.224755, 0.172366, 0.953295 },
		143500: { 0.102992, -0.217473, 0.173968, 0.9549 },
			InTan { 0.103408, -0.21909, 0.17362, 0.954548 },
			OutTan { 0.103408, -0.21909, 0.17362, 0.954548 },
		143767: { 0.0981611, -0.198922, 0.177954, 0.958711 },
			InTan { 0.098567, -0.200631, 0.177626, 0.958374 },
			OutTan { 0.098567, -0.200631, 0.177626, 0.958374 },
		144100: { 0.0902186, -0.167885, 0.184268, 0.96422 },
			InTan { 0.0908484, -0.170803, 0.183765, 0.963744 },
			OutTan { 0.0908484, -0.170803, 0.183765, 0.963744 },
		144500: { 0.0777312, -0.117469, 0.193668, 0.970903 },
			InTan { 0.077276, -0.116023, 0.193975, 0.971051 },
			OutTan { 0.077276, -0.116023, 0.193975, 0.971051 },
		144767: { 0.0708112, -0.0885001, 0.198641, 0.973496 },
			InTan { 0.069979, -0.0850781, 0.199219, 0.973743 },
			OutTan { 0.069979, -0.0850781, 0.199219, 0.973743 },
		144933: { 0.0691666, -0.0814837, 0.199802, 0.97399 },
			InTan { 0.0684841, -0.0785737, 0.20028, 0.974179 },
			OutTan { 0.0684841, -0.0785737, 0.20028, 0.974179 },
		145100: { 0.0702482, -0.0861031, 0.199039, 0.973671 },
			InTan { 0.0696092, -0.083425, 0.199485, 0.973859 },
			OutTan { 0.0696092, -0.083425, 0.199485, 0.973859 },
		145267: { 0.0738747, -0.101421, 0.196458, 0.972451 },
			InTan { 0.0732784, -0.0993604, 0.196862, 0.972627 },
			OutTan { 0.0732784, -0.0993604, 0.196862, 0.972627 },
		145933: { 0.094007, -0.182774, 0.181292, 0.961712 },
			InTan { 0.0949986, -0.187318, 0.180483, 0.960892 },
			OutTan { 0.0949986, -0.187318, 0.180483, 0.960892 },
		146267: { 0.100895, -0.209448, 0.175713, 0.956596 },
			InTan { 0.101365, -0.211335, 0.175327, 0.956203 },
			OutTan { 0.101365, -0.211335, 0.175327, 0.956203 },
		146500: { 0.104082, -0.221627, 0.173053, 0.953992 },
			InTan { 0.104527, -0.223336, 0.172679, 0.953613 },
			OutTan { 0.104527, -0.223336, 0.172679, 0.953613 },
		146667: { 0.104823, -0.224453, 0.172426, 0.953364 },
			InTan { 0.104823, -0.224453, 0.172426, 0.953364 },
			OutTan { 0.104823, -0.224453, 0.172426, 0.953364 },
	}
		226667: { -0.000248394, -0.0467458, -0.00430967, 0.998897 }, //enter new line, paste, replace all the first 1s with 2s.
			InTan { -0.000309182, -0.0837758, -0.00562261, 0.996469 },
			OutTan { -0.000309182, -0.0837758, -0.00562261, 0.996469 },
		226705: { -0.00111189, -0.252879, -0.0262943, 0.96714 },
			InTan { -0.00141009, -0.328425, -0.0345185, 0.943898 },
			OutTan { -0.00141009, -0.328425, -0.0345185, 0.943898 },
		226743: { -0.000743233, -0.147965, -0.0144646, 0.988887 },
			InTan { -0.000642054, -0.185377, -0.0153146, 0.982548 },
			OutTan { -0.000642054, -0.185377, -0.0153146, 0.982548 },
		226858: { -0.000306564, 0.458641, 0.0282391, 0.888173 },
			InTan { -0.000502627, 0.628762, 0.0388939, 0.776624 },
			OutTan { -0.000502627, 0.628762, 0.0388939, 0.776624 },
		226935: { 0.000724135, 0.212686, 0.016268, 0.976985 },
			InTan { 0.00123162, 0.215005, 0.0184109, 0.976439 },
			OutTan { 0.00123162, 0.215005, 0.0184109, 0.976439 },
		227012: { -0.000302533, -0.057345, -0.00531628, 0.99834 },
			InTan { -0.000650021, -0.138614, -0.0121438, 0.990272 },
			OutTan { -0.000650021, -0.138614, -0.0121438, 0.990272 },
		227050: { 0.000230807, 0.0518095, 0.00442775, 0.998647 },
			InTan { 0.000382981, 0.0316623, 0.00407842, 0.99949 },
			OutTan { 0.000382981, 0.0316623, 0.00407842, 0.99949 },
		227127: { 0.000367317, 0.381297, 0.0253254, 0.924105 },
			InTan { 0.00179161, 0.431013, 0.03123, 0.901803 },
			OutTan { 0.00179161, 0.431013, 0.03123, 0.901803 },
		227318: { -0.00900774, 0.756766, 0.0302692, 0.652923 },
			InTan { -0.010692, 0.872976, 0.0344588, 0.486426 },
			OutTan { -0.010692, 0.872976, 0.0344588, 0.486426 },
		227376: { -0.00611365, 0.453114, 0.0162377, 0.891284 },
			InTan { -0.00657588, 0.481551, 0.0171381, 0.876226 },
			OutTan { -0.00657588, 0.481551, 0.0171381, 0.876226 },
		227433: { -0.000248382, -0.0467458, -0.00430967, 0.998897 },
			InTan { 0.000883081, -0.141161, -0.0081201, 0.989953 },
			OutTan { 0.000883081, -0.141161, -0.0081201, 0.989953 },

}

That's for one of the lower body bones. Do the same for the rest.

The most tedious part comes in when doing for the attack animation for the upper body bones. First, note the difference between the starting keyframe and the ending keyframe, which is 1000. Then, find the difference between the starting keyframe and ending keyframe of the walk animation, which is 766.
Now, let's start with one of the bones.

Code:
	Rotation 46 {
		Hermite,
		30000: { 0.364204, 0.140309, 0.0464906, 0.919515 },
			InTan { 0.364251, 0.140335, 0.0464982, 0.919492 },
			OutTan { 0.364251, 0.140335, 0.0464982, 0.919492 },
		33333: { -0.364204, -0.140309, -0.0464906, -0.919515 },
			InTan { -0.36282, -0.139893, -0.0476028, -0.920068 },
			OutTan { -0.36282, -0.139893, -0.0476028, -0.920068 },
		33367: { -0.407165, -0.185423, -0.0572012, -0.892504 },
			InTan { -0.406779, -0.185955, -0.0588081, -0.892465 },
			OutTan { -0.406779, -0.185955, -0.0588081, -0.892465 }, // <- kay, note this one, use it to minus 33333 (starting frame number) and do the same for the rest, note them down on a huge piece of paper.
		33400: { -0.449775, -0.227549, -0.0612233, -0.861496 },
			InTan { -0.451344, -0.229388, -0.0623955, -0.860103 },
			OutTan { -0.451344, -0.229388, -0.0623955, -0.860103 },
		33433: { -0.484369, -0.261446, -0.0603221, -0.832703 },
			InTan { -0.487535, -0.264755, -0.0611245, -0.829746 },
			OutTan { -0.487535, -0.264755, -0.0611245, -0.829746 },
		33467: { -0.505222, -0.281531, -0.0560756, -0.813847 },
			InTan { -0.509636, -0.286543, -0.056793, -0.809283 },
			OutTan { -0.509636, -0.286543, -0.056793, -0.809283 },
		33500: { -0.508035, -0.281358, -0.0489154, -0.812616 },
			InTan { -0.51346, -0.288362, -0.0499813, -0.806665 },
			OutTan { -0.51346, -0.288362, -0.0499813, -0.806665 },
		33533: { -0.488565, -0.252854, -0.0374385, -0.834247 },
			InTan { -0.498914, -0.268464, -0.0418172, -0.82296 },
			OutTan { -0.498914, -0.268464, -0.0418172, -0.82296 },
		33567: { -0.42273, -0.159501, -0.00813197, -0.892072 },
			InTan { -0.431061, -0.17624, -0.0174038, -0.884773 },
			OutTan { -0.431061, -0.17624, -0.0174038, -0.884773 },
		33600: { -0.31011, 0.00511395, 0.0580937, -0.94891 },
			InTan { -0.308801, 0.000955402, 0.0483652, -0.949896 },
			OutTan { -0.308801, 0.000955402, 0.0483652, -0.949896 },
		33633: { -0.186451, 0.185631, 0.159658, -0.951465 },
			InTan { -0.177566, 0.194607, 0.156349, -0.951921 },
			OutTan { -0.177566, 0.194607, 0.156349, -0.951921 },
		33667: { -0.0883425, 0.321636, 0.266597, -0.904252 },
			InTan { -0.075013, 0.338097, 0.275661, -0.896702 },
			OutTan { -0.075013, 0.338097, 0.275661, -0.896702 },
		33700: { -0.0404693, 0.383539, 0.330372, -0.861461 },
			InTan { -0.0320241, 0.393536, 0.340019, -0.853517 },
			OutTan { -0.0320241, 0.393536, 0.340019, -0.853517 },
		33733: { -0.0259874, 0.40274, 0.35324, -0.844006 },
			InTan { -0.0246726, 0.404118, 0.354656, -0.842792 },
			OutTan { -0.0246726, 0.404118, 0.354656, -0.842792 },
		33767: { -0.0167339, 0.415998, 0.370065, -0.830493 },
			InTan { -0.0156253, 0.417172, 0.371473, -0.829295 },
			OutTan { -0.0156253, 0.417172, 0.371473, -0.829295 },
		33800: { -0.0119053, 0.42434, 0.381063, -0.821331 },
			InTan { -0.0109704, 0.425367, 0.38242, -0.820181 },
			OutTan { -0.0109704, 0.425367, 0.38242, -0.820181 },
		33833: { -0.0108139, 0.428493, 0.38656, -0.816607 },
			InTan { -0.0100263, 0.429419, 0.387834, -0.815526 },
			OutTan { -0.0100263, 0.429419, 0.387834, -0.815526 },
		33867: { -0.0128724, 0.428922, 0.386946, -0.81617 },
			InTan { -0.0122109, 0.429781, 0.388112, -0.815174 },
			OutTan { -0.0122109, 0.429781, 0.388112, -0.815174 },
		33900: { -0.0175763, 0.425894, 0.382651, -0.819685 },
			InTan { -0.0170235, 0.426711, 0.383694, -0.818784 },
			OutTan { -0.0170235, 0.426711, 0.383694, -0.818784 },
		33933: { -0.0244891, 0.419542, 0.37413, -0.826687 },
			InTan { -0.0240326, 0.420327, 0.375039, -0.825889 },
			OutTan { -0.0240326, 0.420327, 0.375039, -0.825889 },
		33967: { -0.03322, 0.40992, 0.361853, -0.836615 },
			InTan { -0.0325381, 0.411393, 0.363293, -0.835293 },
			OutTan { -0.0325381, 0.411393, 0.363293, -0.835293 },
		34033: { -0.0546968, 0.381025, 0.327947, -0.862716 },
			InTan { -0.0538713, 0.383663, 0.329931, -0.86084 },
			OutTan { -0.0538713, 0.383663, 0.329931, -0.86084 },
		34100: { -0.079241, 0.340027, 0.28477, -0.892753 },
			InTan { -0.0790927, 0.341097, 0.285342, -0.892176 },
			OutTan { -0.0790927, 0.341097, 0.285342, -0.892176 },
		34133: { -0.0918035, 0.315615, 0.260871, -0.907692 },
			InTan { -0.0900298, 0.320221, 0.264885, -0.905091 },
			OutTan { -0.0900298, 0.320221, 0.264885, -0.905091 },
		34167: { -0.111165, 0.271826, 0.220132, -0.930212 },
			InTan { -0.107249, 0.278968, 0.22536, -0.927301 },
			OutTan { -0.107249, 0.278968, 0.22536, -0.927301 },
		34200: { -0.145235, 0.197359, 0.156773, -0.956754 },
			InTan { -0.141011, 0.201506, 0.157975, -0.956324 },
			OutTan { -0.141011, 0.201506, 0.157975, -0.956324 },
		34233: { -0.194103, 0.103659, 0.0864871, -0.971648 },
			InTan { -0.19063, 0.104224, 0.0842406, -0.972472 },
			OutTan { -0.19063, 0.104224, 0.0842406, -0.972472 },
		34267: { -0.25357, 0.00598544, 0.023724, -0.967008 },
			InTan { -0.252268, 0.0029317, 0.0192915, -0.967461 },
			OutTan { -0.252268, 0.0029317, 0.0192915, -0.967461 },
		34300: { -0.314374, -0.0796497, -0.02175, -0.945702 },
			InTan { -0.316298, -0.0857109, -0.0268934, -0.944397 },
			OutTan { -0.316298, -0.0857109, -0.0268934, -0.944397 },
		34333: { -0.364204, -0.140309, -0.0464905, -0.919515 },
			InTan { -0.366387, -0.144503, -0.0494205, -0.917844 },
			OutTan { -0.366387, -0.144503, -0.0494205, -0.917844 },

Do as said in the code tag, then copy the entire attack transformation like you did for the walk animation on the lower body bones. From here, you need to start editing the key frame numbers. You get 34 from the instruction in the code tag earlier. Do a 34/1000 x 766, you'll get a 26 approximately. Now, add 26 to the new starting frame key of the 'walk 2' animation, which is 226667 and you'll get 226693. Replace the newly pasted first key frame number with 226667, next with 226693, and the yet next with y/1000 x 766 + 226667. Where y = the subsequent key frame number for transformation.

Do the same for every upper body key bone, and you'll be done. Sorry if the explanation isn't clear enough, because I am raiding in WoW while typing this. I do assume you have quite a good grasp in basics of how animations work in this explanation. Please feel free to message me on MSN for queries.

EDIT: Make sure you fix up the GeosetAnim section as well. I believe you know how to do that.

EDIT2: If you intend to do it in a faster way, do not ask me how as I never depended on tools. Ask the majority who claim to be good in MDL but however rely heavily on tools.