PDA

View Full Version : [How-To]Matrix Animations



Darkbladecr
26th Feb 12, 4:52 PM
There is this option in OE called Add new Matrix animation, this has generally been a mystery as to what it really does. I have been working on getting custom animations for the M1919A4, which relic for some reason left and did not pack into the Release of CoH.

http://img850.imageshack.us/img850/6136/30calm1919.jpghttp://img545.imageshack.us/img545/3668/30cal.jpg

Also additionally there is the same thing for the 50cal_tripod:

http://img708.imageshack.us/img708/8152/50caltripod.jpg

Now what Matrix animations do is allow you to combine complex 'stationary' animations together and let them be affected by more than one variable so that you get a smooth transition and good animation. Let me explain, when you have the default HMG you have the model able to aim horizontally for about 90 degrees in total and vertically for 40 degrees in total. With the way animations are done, and so that there are no conflicts, it would be impossible to animate the soldier to aim horizontally and vertically (with 2 animations) at the same time without causing conflicts in bone placement and rotation. What relic has created is a very smart system, where the Engine will take these animations 'stills' and combine them in how it thinks it should be animated.

http://img836.imageshack.us/img836/7812/matrixanimation.jpg
http://i483.photobucket.com/albums/rr199/Darkbladecr/th_aiming_done.jpg Click for video preview (http://s483.photobucket.com/albums/rr199/Darkbladecr/?action=view&current=aiming_done.mp4)

So as you can see there are various stills that are done and these are combined for the full animation. What relic did was add one center animation, and then 5 variants of height for the left and right side (center, 2 upper, 2 lower aiming). Not exactly sure how far you can go with these matrix andimaitons by adjusting them and adding animations to the 'stills', as you can see in the video above, it is also possible to add a recoil style animation as well.

http://img840.imageshack.us/img840/3238/matrixsetup.jpg

So I added 2 variables the HMG horizontal (angle) and HMG vertical (tilt), and then applied the animations to the setup, and adjusted the center and radius of the animations. The way this works is that the 2 variables will be setup in a 2D plane, and the centers = points in the plane along the x-axis and y-axis, the radius designates where the animation will influence.

Be careful when doing this Matrix setup in OE, since if you add half your animations and set them up, and then try to add more you will get invalid animation errors, and crash the game when you try to use the .rgo

http://img10.imageshack.us/img10/5153/errorxs.jpg

Here are the source files (http://www.mediafire.com/?l2o2368bl11p7ai) so you can see for yourself, however don't try burning this and adding it to your mod, I will setup a public release with Eliw00d this week!

eliw00d
26th Feb 12, 5:02 PM
Great tutorial!

Thanks again for all the help with regards to the M1919A4 and M2HB. :)

Copernicus
26th Feb 12, 5:02 PM
Awww, when I read the title I was looking forward to some cool slowmo bullet-dodging animations :(.

burtondrummerNY
26th Feb 12, 6:09 PM
Haha my thoughts exactly. Looks very good DB, wonder why Relic never put them in...

Lethal Dosage
26th Feb 12, 7:15 PM
Hmm, thats quite interesting. It's great to see those tripod anims finally being done, i'm sure Modern Combat and EF could make good use for them, since both mods will/already add weapons that are in low-set mounts. Of course, i'd love deployable M1919a4s and M2HBs as well!

It looks good in the video, i see the ammo belt stays attached to the gun, with it streching as the gun aims around. How bad is the texture distortion on the ammo belt when it's streched all the way out?

Celution
27th Feb 12, 2:21 AM
Fantastic that this long-term problem finaly has been solved!

Darkbladecr
27th Feb 12, 3:26 AM
How bad is the texture distortion on the ammo belt when it's streched all the way out?
not that bad, I linked the rigging to the two sets of vertices on the ammobelt mesh, so it's not really noticeable unless you zoom in and watch the animation.

Also I added customization to the animation so that the HMG will automatically set itself up on the green cover (so if its on sandbags it will place the gun on the sandbags, likewise if its on a car, it will place the gun on the car.

It will also use the default HMG animations for when it's in a building.

eliw00d
27th Feb 12, 8:12 AM
I see you added the Alpha / Beta picture of the M1919A4! I remember seeing it once, but it disappeared. It's really strange that they removed the animations completely, leaving only a shell of what once was.

Celution
27th Feb 12, 8:14 AM
If I recall correctly that was an Alpha picture, as the M1919a4 was never in the CoH beta.

robotnik
27th Feb 12, 9:07 PM
COH modding still marches onward!


now we can get a proper air cooled .30 cal

Lethal Dosage
28th Feb 12, 7:27 PM
So the gun actually gets setup on the Sandbags/cars, etc.? Thats pretty cool. When it does do that, does the gunner still lie prone behind the gun (floating in mid air), or does he then crouch behind it in those circumstances? And what about when their garrisoned in buildings? Does he set it up in the window, or on the floor, clipping through the wall below the window? This has me very excited!!!!

Darkbladecr
29th Feb 12, 3:43 AM
He will start the animation of setting up on the floor each time (since heavy_machine_gun_sync.rgo does not like having alternate setup animations) but then we take up the normal mg42 animations when it comes to the aiming, firing, reloading and such. Likewise is true with the garrison building. As for the pack up, it will always play the right animation.

There is a slight bug in the pack up and setup animations where the gun is in the wrong place, there is nothing I can really do about it consiering it looks fine in OE so I don't know the root of the problem...

eliw00d
15th Jun 12, 7:13 PM
Hey Darkblade,

I seem to be having issues with the M1919A4 and M2HB setup. I copied all the files you gave me and moved them around / renamed some things. Everything seems to be in order, except there is no setup or teardown animation. The guy holds the MG over his shoulder, then reverts to a non-animated state upon setup. I have the M1919A4 sync file linked to the gunner's .abp file. I also have the correct entity_blueprint and no missing .rgm. The .abp for the M1919A4 links to the Heavy_Machineguns file as well as the M1919A4 .rgm. I can't seem to make heads or tails of the cause.

I used your EBPs, SBPs, Weapon and Ability files without much changing (other than location of art files), so I am at a loss as to what is wrong. Any ideas?

Darkbladecr
16th Jun 12, 3:38 AM
The xref will be looking for the animation in the wrong place then. You have to update the location of the .rgm with the animations in the DataGeneric .rgo and re-burn.

Or otherwise keep a copy of the location of the original files along with your own?

eliw00d
16th Jun 12, 6:02 AM
All the Xrefs are in the heavy_machineguns .rgo, right?

Darkbladecr
16th Jun 12, 6:23 AM
I can't remember it was a while ago, I think there are some in _sync as well, since they are all loaded from the M1919A3 model.

eliw00d
16th Jun 12, 7:01 AM
Alright, that did it! Thanks!

coh
19th Jun 12, 10:43 PM
Great tutorial!

I think No One but YOU can DO IT!!
LOL

EDIT:
quote “Here are the source files so you can see for yourself, however

don't try burning this and adding it to your mod, I will setup a public

release with Eliw00d this week! ”
Hi! @Darkbladecr
I tried hard to find your masterpiece in this forum

but with no result.Could you please show me where you release?Thank you
for any reply!