View Full Version : Porting animations from CoD5/CoD4 to CoD2
the_law
27th January 2015, 01:42
Sorry if there is an obvious answer to my question that I may be unaware of.
Anyway, I just want to know the method with which the guy (peterlankton) from this post (http://killtube.org/showthread.php?1022-CoD5-Weapons-in-CoD2) imported the animations. I can already import a model, but I cannot import animations.
Tally
27th January 2015, 08:36
Sorry if there is an obvious answer to my question that I may be unaware of.
Anyway, I just want to know the method with which the guy (peterlankton) from this post (http://killtube.org/showthread.php?1022-CoD5-Weapons-in-CoD2) imported the animations. I can already import a model, but I cannot import animations.
I'm going to do this quick because I am busy right now:
You need a program named "Lemon" from Tom BMX. But he wont let you download it unless you join his forum, so go here:
https://undeadmodding.com/
Then, go here:
http://tom-crowley.co.uk/downloads/
Download the Lemon program. Install it. Then, google for any of Tom's video tutorial's on how to use his tools.
Then go to the Blender site and download version 2.56 - DO NOT download the latest version! Install Blender. Then grab the COD exporter plugin files:
http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/Call_of_Duty_IO
Install the plugins.
Run Lemon and start whatever version of COD you want to use. Use the program to get the animations you want. Then, open the .OBJ animation files in Blender. Then, export them using the COD xanim plugin.
php
27th January 2015, 19:04
I'm going to do this quick because I am busy right now:
You need a program named "Lemon" from Tom BMX. But he wont let you download it unless you join his forum, so go here:
https://undeadmodding.com/
Then, go here:
http://tom-crowley.co.uk/downloads/
Download the Lemon program. Install it. Then, google for any of Tom's video tutorial's on how to use his tools.
Then go to the Blender site and download version 2.56 - DO NOT download the latest version! Install Blender. Then grab the COD exporter plugin files:
http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/Call_of_Duty_IO
Install the plugins.
Run Lemon and start whatever version of COD you want to use. Use the program to get the animations you want. Then, open the .OBJ animation files in Blender. Then, export them using the COD xanim plugin.
Actually you have to use the XanimConverter and XmodelUtils because Lemon/Lime only work for MW2 and newer.
In the XanimConverter there's a convert option which converts them to either CoD2/4/5, or you can use the Maya plugins and import them.
the_law
27th January 2015, 19:08
Ah, yes. That was the method I used to attempt importing animations, but I never figured out how to get the animation in Maya (even after watching the tutorials).
The .tanim plugins work, by the way. Maya just crashes every time I try to import the .tanim.
Tally
27th January 2015, 20:42
Actually you have to use the XanimConverter and XmodelUtils because Lemon/Lime only work for MW2 and newer.
In the XanimConverter there's a convert option which converts them to either CoD2/4/5, or you can use the Maya plugins and import them.
did you mean Tom's Xanim Extractor?
the_law
27th January 2015, 22:06
I think so.
php
27th January 2015, 23:35
Yea, in the xanim extractor there's a "tool" xanim converter which converts the xanims to CoD2 format.
Tally
27th January 2015, 23:57
Yea, in the xanim extractor there's a "tool" xanim converter which converts the xanims to CoD2 format.
Which doesn't actually work unless you heavily edit them in Maya. If you try and simply convert them, it is all fucked up in COD2.
the_law
28th January 2015, 00:47
True. I tried doing that with the animations of the double-barrel shotgun from CoD WaW a few weeks ago, and it was a total mess. The idle animation was completely fucked up, and CoD2 crashed when I tried to fire. :P
With that said, I am now making some progress towards a working animation.
php
28th January 2015, 07:56
The way I do it for CoD 1 with porting from CoD4/5+ is I use Lemon/Lime or either XmodelUtils/Xanim Extractor then in Maya fix them and I never used the CoD2/4/5 converter but there was none for CoD1 so I'm doing it in Maya. So open the rigged model then try to drag 'n drop the .tanim ontop of it and see how well it loaded and see what you can do about it. (Also a previous version of the plugin tools broke animations iirc, so perhaps update it?) When you drag 'n drop multiple .tanims after eachother your animation might become buggy, so it's best to reload your base model / .ma/.mb file.
Some examples which I think turned out quite okay.
830
831
ignore text
http://cod1.eu/webm/deagle.webm
the distance of the gun perhaps
http://cod1.eu/webm/ak47.webm
the first one is reload is bit off
http://cod1.eu/webm/raygun.webm
serthy
28th January 2015, 10:55
Do I need to change something on the anims (weight-paint/rerig/change joints/rename etc.)?
Or is it simply a drag'n'drop and export of the anims from other CoD's to CoD2?
Tally
28th January 2015, 11:57
Do I need to change something on the anims (weight-paint/rerig/change joints/rename etc.)?
Or is it simply a drag'n'drop and export of the anims from other CoD's to CoD2?
I'd suggest you watch Tom's video tutorial on it:
http://tom-bmx.com/downloads/?action=tuts&id=12
It's quite involved. You have to play around with a lot of settings.
the_law
28th January 2015, 18:22
Well, so far I've managed to get the model into Maya, bind the joints, and add the .tanim.
The .tanim seems to be at least somewhat working, as the weapon itself moves with the animation. However, after importing one of the CoD5 viewhands and using the "join weapon to rig" function, the hands do not move with the animation. Anyone got a solution to this?
Thanks.
the_law
28th January 2015, 20:42
Now I have both the gun and the skeleton moving according to the animation, but they do not interact. I'll post a video later to show you what I mean.
EDIT: Uploaded video. Here you go.
https://www.youtube.com/watch?v=yKYCQ34cOBI&feature=youtu.be
the_law
1st February 2015, 23:39
php, how did you get your viewhands working? Mine don't seem to bind to the joints properly.
the_law
3rd March 2015, 22:04
Sorry if I may seem impatient by bumping this thread, but does anyone know how to make the weapon "interact" with the hands? That is, the hands themselves move perfectly fine, but the weapon does not move relative to the hands.
Here's the link again to my problem.
https://www.youtube.com/watch?v=yKYCQ34cOBI&feature=youtu.be
kung foo man
3rd March 2015, 23:05
Maybe just upload the files you have atm to reproduce the error (probably just the .mb-file)? Otherwise you limit yourself to people who already know pretty sure what the problem is (which might tend against 0) and exclude the people who could give it some minutes to check whats wrong in an interactive try&error session.
the_law
4th March 2015, 01:22
Here's the link to just the reload animation. I got the same issue with all animations for every weapon I've tried.
https://www.mediafire.com/?7775oe64i273n11
the_law
8th March 2015, 05:03
Aha! Finally got the weapon to move with the hands!
Turns out it was a very simple fix that did it. I just had to remove the name of the imported file from all the joints.
Here's what I mean: after I import the Barrett M82 into the scene, the joints will be named "viewmodel_law_barrett:joint_name"
where "viewmodel_law_barrett" is the name of the imported model's file, and "joint_name" is the name of whatever the joint is. So I just had to remove the "viewmodel_law_barrett" and I finally got it working!
the_law
8th March 2015, 17:46
One more thing, though. Currently, I've exported all the Barrett M82 anims to .XANIM_EXPORT files, but I have no idea what settings to use in Asset Manager.
So far, I've used the same settings for almost every animation:
looping: NO (set to YES for the idle anim)
UseBones: NO
Type: Relative
When I test it in-game, it all just looks like the default "void" animation, but the console doesn't say anything about missing xanims.
Tally
8th March 2015, 18:04
Surely, usebones should be set to "yes".
the_law
8th March 2015, 18:16
I dunno though, that doesn't really fix it for me.
When I set the "model" for the xanim, should that model include both the weapon and the hands? Or should it just be the viewmodel of the gun?
Tally
8th March 2015, 19:34
I dunno though, that doesn't really fix it for me.
When I set the "model" for the xanim, should that model include both the weapon and the hands? Or should it just be the viewmodel of the gun?
Use this for a reference:
http://wiki.modsrepository.com/images/c/cb/CoD5_-_AssetManager_Quickinfo_XAnim.png
The second option is “model”, which can be confusing at first. We associate every animation with a model, which establishes the base pose and proportions that the animation is diverging from. We also get all hierarchy information from the model. Also, any joints that are in the animation but not in the model will be stripped from the animation. We made a special model file called “Base_character” for our full-body character animations. It’s basically just a copy of our Josh model, but we called it base_character to make it easy to find.
http://wiki.modsrepository.com/index.php?title=Call_of_Duty_4:_Maya
the_law
8th March 2015, 20:25
Opened up a few of the stock CoD2 xanims in Tom's XAnim Exporter. I tried doing the animations using the same properties as the g43 animations:
Looping: NO (for all anims this time)
Type: Absolute
I also checked UseBones.
It's still not working, though. Perhaps the problem is in the way I export from .mb to .XANIM_EXPORT?
I would like some input on the steps other modellers/animators go through to export their xanims from Maya to a .XANIM_EXPORT file.
Tally
8th March 2015, 21:32
Opened up a few of the stock CoD2 xanims in Tom's XAnim Exporter. I tried doing the animations using the same properties as the g43 animations:
Looping: NO (for all anims this time)
Type: Absolute
I also checked UseBones.
It's still not working, though. Perhaps the problem is in the way I export from .mb to .XANIM_EXPORT?
I would like some input on the steps other modellers/animators go through to export their xanims from Maya to a .XANIM_EXPORT file.
Go to this forum:
http://openwarfaremod.com/owforum/index.php
Personal Message a guy named Tito - tell him I sent you. He is an expert exporter. Perhaps the best in the community. He will surely be able to help you.
EDIT -
This is a link to tito's profile:
http://openwarfaremod.com/owforum/memberlist.php?mode=viewprofile&u=6746&sid=dc4147c2dc8eb00dda7b7e489ff39ee2
the_law
9th March 2015, 04:42
Thanks, but I tried registering for the forum a few months back, actually. The administrator still hasn't activated my account :(
I just made a new one, let's see if it works.
If I'm right the guy Tally means is `titopricus` if you google him then you'll find his youtube, xfire and other accounts where you may be able to reach him.
Tally
9th March 2015, 10:17
I've PMed tito to come here instead. Let's see if he does it
ElTitoPricus
9th March 2015, 11:36
Hello
ElTitoPricus reporting for duty or titopricus or tito :cool:
Let's start from the top
I always use these settigns for the conversion of viewmodel xanims
http://i.imgur.com/J3km7hQ.jpg
If you have any questions pm me or better ask here, so the whole community will learn
Over and out.
PS the tags for the xanim_export changes depending on the cod you want to export to.
I will install cod1 and cod2 and take a look.
ElTitoPricus
9th March 2015, 11:52
Also
Don't drag the .tanims into maya or any other 3d program that you use. Always import for better results
and reload the .mb file for each animation
Tally
9th March 2015, 12:01
You say you have an animation model that has all the meshes, tags and their hieracy, that you use for the "model" - is this something you created yourself? Or, is it something found in the tools?
ElTitoPricus
9th March 2015, 13:09
No, sorry for my rudimentary english
When you import a model and the arms and rigged together, that's what i call the animodel or base model
i make the xmodel_export with it and use it to conert the xanims
Tally
9th March 2015, 13:52
No, sorry for my rudimentary english
When you import a model and the arms and rigged together, that's what i call the animodel or base model
i make the xmodel_export with it and use it to conert the xanims
So, you first make an xmodel_export file out of the arms and anims? Then use that as the reference model file? How does it allow you to export anims as a model? Or is it just the arms that is exported as a model?
the_law
9th March 2015, 14:56
847
Pretty sure this is what he meant, but correct me if I'm wrong. :P
ElTitoPricus
9th March 2015, 15:34
That's is exactly
the_law
9th March 2015, 16:26
Maybe now would be a good time to detail the steps I go through to export the animations.
First, I fill in the beginning and ending frames of the animation.
Then I select everything and I click "set export nodes."
After that, I press "Export Selected Entries" and that should make my .XANIM_EXPORT file.
the_law
12th March 2015, 05:10
One strange thing I noticed is that CoD2 viewmodel xanims seem to use "absolute" but CoD4 viewmodel xanims use "relative." Perhaps that could cause a problem?
the_law
21st March 2015, 17:03
I finally got the animations sets for the Barrett M82 and the Mini Uzi at least partially working. I am currently unable to upload any images/videos and the internet connection is extremely slow, so I will go into detail about how I did it later.
Man, spending a week with a laptop but no internet connection actually helps me get a lot done. xD
Ni3ls
23rd March 2015, 17:52
Looking forward to see a tutorial from you
the_law
28th March 2015, 00:30
I'll probably start working on a tutorial after I get a few other things working with my animations.
Currently, there are a few minor problems with my animations:
-The fingers are twisted (most notably the fourth and fifth fingers)
-Some ADS up/down animations don't work
Anyone know how to fix these problems?
the_law
29th March 2015, 01:58
Never mind, I got them fixed thanks to fellow modeller/animator Mch2207Cz. He gave me step-by-step instructions on how to do it, and I will quote him:
Quote:
it is possible to import anims from newer cods. In fact I found a way how to do it few years ago and then spread the knowledge to people who wanted to try it as well. Before Tom BMX made his xmodelutils and xanimexporter it was possible to import only anims from various cod mod tools. Thanks to Tom's programs any cod anim can be imported.
How to do it:
1. create a weapon rig using xmodeltility - choose a weapon to do (for example codwaw viewmodel_ger_fg42_lmg), convert it into MA, open the MA, rig the weapon's mesh using generated MEL script. Select the parent mesh group (containing weapon's mesh) and parent joint group (contains weapon's joints). Hit CTRL+C to copy them. Save it as a first person weapon (for example viewmodel_fg42.ma). You can also right now export the xmodel_export file using cod maya plugin (viewmodel_fg42.xmodel_export).
2. create a hand rig of the particular cod game using xmodelutility - choose a desired hand model from the game that your weapon is from (for example codwaw viewmodel_usa_marine_arms), convert it into MA, open the MA, rig the hand's mesh using generated MEL script.
3. paste the copied weapon into hand's MA file. Open hypergraph, grab the joint "j_gun" and connect it to "tag_weapon". Set all j_gun's position and rotation to 0. When you do it, your weapon should go right between the hands. Save the file.
4. open file/import and set the file type to "cod xanim". search for your *.tanim files which were made using xanimexporter. You can import only one anim at a time so you will have several MA files each containing just one animation segment (ads up, ads down, idle, fire, pullout, putaway, reload, reload empty, melee).
5. once you got all your anim segments imported and saved in their MA files you can start making the anim compatible with cod2.
6. first thing to do is ADS. each cod may use different joint to do ADS (for example cod4 uses tag_ads) . so you must open both ads_up and ads_down segments and check in hypergraph/grapheditor which joint controls ADS. to make it cod2 compatible you must use joint called "tag_torso". all other ADS animations on different joints must be deleted.
7. now you are ready to export all your segments into xanim_export.
8. now comes the most important step. you must make correct gunsleeves model. this model is used as a reference for anim compilation. it is extremely important and if done improperly you will end up with twisted fingers and other errors. you need to download a file called "cod2 viewsleeves" - available at wiki.modsrepository.com
9. once downloaded open it and search for "viewmodel_thompson_gunsleeves.ma". open it and "save as" to make copy of it (for example viewmodel_fg42_gunsleeves.ma ).
10. in the resaved gunsleeves file, select all thompson meshes, detach them from the joints and delete. then select j_gun and delete it.
11. now paste your first person weapon from step 1)
12. connect j_gun to tag_weapon and make sure j_gun has zero transforms (position, rotation). the weapon will move in between the cod2 hands. now you can make gunsleeves xmodel_export (for example viewmodel_fg42_gunsleeves.xmodel_export)
13. put your xmodel_export files into model_export inside cod2 installation folder (viewmodel_fg42.xmodel_export and viewmodel_fg42_gunsleeves.xmodel_export ).
14. put your xanim_export files into xanim_export inside cod2 installation folder (viewmodel_fg42_idle.xanim_export and so on).
15. open asset manager and compile.
I can clarify on my method of doing it if you ask. There were some steps where I used ElTitoPricus' way of doing it. In fact, the most important steps that I think did it for me were steps 9 - 12.
vanfreddy
10th September 2015, 16:20
Hello
I tried to follow your instructions and ending with this result
http://217.172.178.19/Vanfreddy/buggy_ray_animation.avi
Any idea what I'm doing wrong?
Im using Bo2 FarmgirlArms +RaygunMark2 and the Cod2 Gunsleeves as Xanim Base Model
In Maya the Animations looks good
the_law
10th September 2015, 23:40
Hmm, what do you select when you "set exports"?
vanfreddy
11th September 2015, 00:06
I select all joints except tag_view and tag_weapon and for ads just tag_view and tag_torso
vanfreddy
11th September 2015, 01:37
i found the error i exported the wrong the ads down joints
now its working
http://217.172.178.19/Vanfreddy/raygun2_working_animations.mp4
thank you for sharing
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.