PDA

View Full Version : Import model from CoD4 using Tom's Xmodel Utils



Mitch
2nd July 2013, 09:57
I have been trying to import a model from cod4 to cod2 using Tom's Xmodel Utils. It almost works, but i got one problem with the bones. I think it has something do to with the tag_weapon_left and right.

http://screenshot.xfire.com/s/128422995-3.jpg (http://screenshot.xfire.com/s/128422995-4.jpg)
(Click for bigger image)

Tags
http://znation.nl/files/spetsnaz_yuri_tags.html

How can i fix this?

Ni3ls
2nd July 2013, 11:08
Did u follow serty's tut? Maybe you can post your model here

Peterlankton
2nd July 2013, 11:12
Yeah, I know that. I tried that exactly months ago and got the same result. In CoD2 bones have different names and there's a different number of bones, as well.
I spent days trying to make that work and couldn't. So I, too, really hope people here got a solution.

Mitch
2nd July 2013, 11:30
Yeah, I know that. I tried that exactly months ago and got the same result. In CoD2 bones have different names and there's a different number of bones, as well.
I spent days trying to make that work and couldn't. So I, too, really hope people here got a solution.
I am replacing torso_stabilizer with j_spine1, back_low with j_spine2, back_mid with j_spine3. But i think the problem is that tag_weapon_left and right aren't binded somehow.

I didn't follow serty's tutorial. I know how which bones i need to bind etc. But if i do it this way i don't need to paint and add the bones manual from the cod2 template. Because the painting goes always wrong.

I followed pluxy's tutorial a while ago.

http://screenshot.xfire.com/s/128423406-3.jpg (http://screenshot.xfire.com/s/128423406-4.jpg)
(Click for bigger image)

Maya files with images
http://znation.nl/files/body_complete_mp_spetsnaz_yuri.rar
http://znation.nl/files/body_mp_sas_urban_specops.rar

with cod4 maya files

serthy
2nd July 2013, 11:42
compare the skeleton!
iirc cod4 uses 3 spine-bones and cod is built with 4. so it isnt just renaming..

Peterlankton
2nd July 2013, 11:43
I am replacing torso_stabilizer with j_spine1, back_low with j_spine2, back_mid with j_spine3. But i think the problem is that tag_weapon_left and right aren't binded somehow.

I didn't follow serty's tutorial. I know how which bones i need to bind etc. But if i do it this way i don't need to paint and add the bones manual from the cod2 template. Because the painting goes always wrong.

I followed pluxy's tutorial a while ago.

I guess, I did that, too. The problem does not necessarily seem to be the tag_weapon_xx, but way more the bone at the right shoulder. That bone gets placed somewhere near the left shoulder in-game. The tag_weapon_right just is not right, because it's a sub-bone(?).

Mitch
2nd July 2013, 11:47
compare the skeleton!
iirc cod4 uses 3 spine-bones and cod is built with 4. so it isnt just renaming..

cod4: http://znation.nl/files/body_complete_mp_spetsnaz_yuri_tags.html
currently what i got: http://znation.nl/files/spetsnaz_yuri_tags.html
cod2: http://znation.nl/files/playerbody_american_normandy01_tags.html

Also see my previous post for the maya files.

Edit: I think j_spinelower should be j_spine1 and j_spineupper j_spine2. But then j_spine3 is what i don't know and probably is what is the problem.

Peterlankton
2nd July 2013, 12:13
If one of the j_spine(s) were the problem, then both arms(left and right) + the head would be wrong positioned, since it's their parent. So, what I'm saying is that only the right arm is wrong positioned and since the rest of the body is working correctly it can only be one of these bones to be not: j_clavicle_ri and/or j_shoulder_ri. Because when you position them manually in the xmodel_export, you might fix that. I tried that as well back then and, well, it worked somehow, but the arm was never perfect.

Tally
2nd July 2013, 12:35
You only have 101 bones. There are 123 in COD2, and 125 in COD4. You must have gone wrong somewhere. You cannot ignore COD2's base character rig. You do so at your own peril.

Follow serthy's tutorial. It is one of the best I have seen for COD2 model rigging.

Mitch
2nd July 2013, 18:29
I am now using the template from cod2 and this works a lot better. I got almost the entire model working i only need to fix the legs.

http://screenshot.xfire.com/s/128425504-3.jpg (http://screenshot.xfire.com/s/128425504-4.jpg)
(Click for bigger image)

Fixed =]: http://www.xfire.com/video/6043f7

Mitch
4th July 2013, 15:10
I am currently using a maya script to copy the translation of the bones from cod4 and then update cod2 bones translation. (the model isn't binded yet to the skin)


print("setAttr j_head.translateX " + getAttr("j_head.translateX") + ";\n");
print("setAttr j_head.translateY " + getAttr("j_head.translateY") + ";\n");
print("setAttr j_head.translateZ " + getAttr("j_head.translateZ") + ";\n");


I made a forum to change the bone names to the way cod2 uses them. (j_mainroot => J_MainRoot) It is made in java, but it is easily converted to an exe. Also the code above can be generated using the java program.

Example for restoring entire face bones.


j_head
j_eye_lid_bot_le
j_eye_lid_bot_ri
j_eyeball_le
j_eyeball_ri
j_cheek_le
j_cheek_ri
j_brow_ri
j_levator_ri
j_jaw
j_levator_le
j_brow_le
j_neck
j_eye_lid_top_ri
j_eye_lid_top_le


I am at the moment manual replacing these bones in the paint/bind maya script (the binding script that Tom's Xmodel Utils uses requires maya 8.5)


j_knee_bulge_le/ri => J_HipTwist_LE/RI (= wrong, probably needs to be J_Hip_LE/RI or J_Knee_LE/RI)
j_mainroot => J_Spine1 (or keep j_mainroot depends what works better)
back_low => J_Spine2
back_mid => J_Spine3
j_shoulderraise_le => joint1
j_shoulderraise_ri => joint2
j_coatfront_le => J_MainRoot
j_coatfront_ri => J_MainRoot
j_coatrear_le => J_MainRoot
j_coatrear_ri => J_MainRoot


327 (including my maven netbeans project)

Loveboy
4th July 2013, 15:18
Hi Mitch! i need your help, i want to get the Materials, so i need the GDT files, but i dont know how to get it from toms xmodel exporter. Can you help me?

Mitch
4th July 2013, 15:24
Hi Mitch! i need your help, i want to get the Materials, so i need the GDT files, but i dont know how to get it from toms xmodel exporter. Can you help me?
When you export the model to .ma it also gives you the images. Copy these images to cod2/images.
(i renamed _sas_ct_bodies_sp_spec-rgb&sa_765bd06c to sas_ct_bodies_sp_spec etc.)

In the names you can see _spec, _nml and _col which means specular, normal and color map. Now open asset manager. Make a new material call it like the names in hypershade. In my case it would be sas_ct_bodies_sp. Set surfacetype to none and add the images you added in cod2/images for the right types. And now convert them.

329

Loveboy
4th July 2013, 15:40
Thank you so much! That helped me and i know now how to make it!

Loveboy
4th July 2013, 18:27
Mitch, i need really now the GDT file (from the model from model exporter) because idk with what the image is connected.

Please help me!

Ni3ls
5th July 2013, 11:05
save the gdt as the name of the image

EDIT: make your own thread

Mitch
5th July 2013, 13:41
Mitch, i need really now the GDT file (from the model from model exporter) because idk with what the image is connected.

Please help me!
This is what the exporter generated. I used for myself the materialType world phong. They use model phong. Does it matter which one you use?
(Also the eyes use blend and not replace)

The generated GDTs by Tom's Xmodel Utils: 332

Also i am now using the legs from cod4 and head. And the other parts are the cod2 bones. This fixes my leg problem with the model, but now i got a paint problem with the spines. (something i am trying to get fixed)