Quantcast

Jump to content

» «
Photo

[GTA IV] Player Rigging Tutorial

245 replies to this topic
coin-god
  • coin-god

    High Roller

  • $outh $ide Hoodz
  • Joined: 18 Mar 2007

#1

Posted 13 July 2011 - 12:46 AM

1. Reqerimients

You will need a copy of GTAIV (EFLC not tested)
Autodesk 3D Studio Max (I will use ver. 2010 in this tuto)
OpenIV by GOOD-NTS
GIMS by 3DBoomer

And a 3D Model to rig.

What we are going to do:
We are going to rig a Full Player Model. And replace Niko.

GTA IV Body parts:
Head (Head)
Hair* (Hair)
Theet* (Teef)
Hands** (Hand)
Torso (Uppr)
Legs (Lowr)
Shoes (Feet)
Special?* (Sus)

* Are not that important.
** Are complex to rig, you can do it but if you are an experienced rigger though.
Unless you dont want them to move their fingers.


All of them are stored in playerped.rpf in the PC/MODELS folder.

Note: Remember to allways make BackUps. GTAIV modding tools are not perfect yet, they can seriously damage your GTAIV install and force you to reinstall.

2. Extracting Niko

In order to rig our model we first need to extract Niko from the game files, so that we can use his Skeleton.

Start OpenIV (I won't go into much detail here, read OpenIV tutos) and open the playerped.rpf
user posted image

We have to extract each bodypart we want to change, in this tutorial we just need the head, torso, legs and feets.
But we can't export them as WDR! We have to use the OpenFormats, to export ODR (Wich is what GIMS can later import).
To export ODR just click on the model you want to export and press Ctrl+S. Then save them where you want.
Do this with "head_000_r.wdr", "uppr_000_u.wdr", "lowr_000_u.wdr" and "feet_000_u.wdr". (Niko Start clothes)
Also export "hand_000_r.wdr" we will use it to align our model for Niko hands to fit well. We wont rig new hands.
user posted image

You now got all thouse files, I'll try to explain what they are:

The ODR file is the OpenFormats file. The one GIMS will read to import all the nessesary data in 3D MAX.
The SKEL file contains the Skeleton data.
The Mesh file contains the Geometry data.
You also have a set of 2 Textures for each bodypart. The Normal Map and the Specular Map.

3. Preparing the Model

Now that we have Niko extracted, lets open 3D MAX and import him.
To do so, with Max already Opened, Start GIMS.
user posted image

Open the "openFormats" Tab if not opened and click on ">Mass" to Import all the bodyparts at once. You can also Import 1 by 1 by clicking on "ODR/ODD".
user posted image

It will start importing the files, it may take a few seconds.
user posted image

Once it's done you should have something like this (Zoom in if it's to small)
user posted image

And a big green dummy.

Now remove all the bones, since we only need the mesh now. We need the mesh alone because we will use it to fit our custom character to Niko, bones are unnessesary.
If you don't know how, just click on each bodypart mesh and right-click "Hide Selection" until you only have the bones, select them all and delete them. Then just Right-click and "Unhide All"
Import/Merge your new Character Model.

It will most likely appear on a diferent position, rotation and scale than Niko. If that happens, we have to adjust him until he fits Niko's body.
To adjust it just move, rotate and scale your model until it's ok. (You can create a separated set of bones to adjust it easier if they are not in the same Pose)
user posted image user posted image

Depending on your model it could be easy or really hard. I can't help you there. But try to adjust it as close to Niko as possible.

Once that's done, we now have to separate our model in parts like Niko. Going to the Editable Mesh or Editable Poly on your model and selecting the polygons for each body part and detaching.
You can use F3 and F4 (wireframe modes) to help you out, since both models are on top of each other. You can also Isolate* your model or just delete Niko (Don't remove hands yet).
*Right-Click "Isolate Selection".

Note: If your model is unified, wich means it's 1 whole mesh and you can't select each part with Element selection (The red Cube) you will have to use Polygon Selection (Red Square)

If you are on Editable Poly you can make use of the "Grow" button. Select some polys from the bodypart and start clicking on Grow until enough is selected.
user posted image

And when you are done it should look something like this:
user posted image
Each body part is separated, exept hands.

Now let's remove the model hands and adjust the wrists to align with Niko hands.
Cut your model's hands, and then with Editable Poly use Border Selection to close the hole. To close it just click on the border of the hole (it should select the whole border) and while holding shift Scale it down until it's a tiny hole.
With the border still select hold Ctrl and change to Vertex Selection (border should still be selected, but in vertex mode) and use WELD to merge all thouse vertices.
user posted image

To finish it, just try to adjust the vertices to avoid obvious seams. You can help yourself with Snap tool (marked on the pic, remember to set it to Vertex only by right clicking it, then just move each vertex to the position of each vertex on the hand the best you can)
user posted image
Repeat with the other hand.
user posted image
Might not be perfect, but atleast we will have fully functional fingers with no rigging!
Now delete Niko's hand. (And the rest of his body if you still havn't).
Remember to turn off Snap Tool if you used it.

You are done with the Model. Now it's time to Rig.
  • Jimbatron likes this

coin-god
  • coin-god

    High Roller

  • $outh $ide Hoodz
  • Joined: 18 Mar 2007

#2

Posted 13 July 2011 - 08:35 AM

4. Rigging the Model

Remember we have to rig each body part separatly. So we will delete all the parts of our model exept the one we are going to rig.
(Remember to save them to rig them later!!)

4.a. Rigging the Head

Note: There seems to be a bug with GIMS atm, wich causes the faces to get screwed up ingame when you rig all the Bones in Niko's face.
Because fo that, we will not rig thouse bones.


Select your whole model and delete everything but the Head.
Now go to GIMS and click on ODR/ODD under Import to import Niko's head again.
user posted image

If you did everything right, it should fit your model as before.

Now click on Niko's mesh go to Editable Mesh, a dialog box will appear click "Yes".
Select all Vertices and Attach your head to it (by clicking on Attach button and then your model, once done turn off Attach).
With Niko head still selected press your Delete button, and if you did things right your Head model should be the only mesh left... but with Niko's Bones!
user posted image user posted image

To check that it worked, click on the "Char_Head" bone and rotate it a bit, if you mesh moves with it everything works fine. (Remember to erase the rotation with Ctrl-Z)
user posted image

Now let's unrig the face bones that will probably get screwed up ingame. (Hopefully this will get fixed, some models turn out with a good face rig sometimes)
To do so we go to the Skin Modifier on our recently rigged Head. Turn on "Edit Envelopes" and tick Vertices.
Now select the "char_head" bone on the Bones list. You will see the parts of the head that are affected by this bone, we have to include the parts of the face that are not red.
Select face vertices and go to "Abs Effect" on Weight Properties, set it to 1. Then Hit "Paint Weights" twice.
user posted image
You can add diferent weight effects to make it smoother.
When done, turn off "Edit Envelopes"

The Head should now be correctly rigged.

Now go to the Editable Mesh modifier, when the dialog appears click yes again, turn on the Polygon Selection mode and scroll down to the "Surface Properties" tab, select the whole mesh (Ctrl+A) and in Set ID write "1" then hit enter.
Leave Polygon Selection and Editable Mesh.
user posted image

Now open the Material Editor (Press M) and Click on "Standar" to change it to GTA IV Material.
user posted image

On first Material use "Ped", on second use "gta_ped".
Assign your Diffuse Map (Texture), your Bump and Specular if you have any.

Note: GTAIV only supports 1 texture per Mesh. You need 1 texture for the whole head.
This applies to all bodyparts.

Adjust the Bump, Specular and Spec. Color as you wish. (You wont see the result in Max)
Now Select your Model, Apply the texture and Click on the View on Viewport Button.
user posted image

To finish, set the Material ID to 1. (Click and hold)
user posted image
Now is time to export the Model.


5. Exporting your Model
Note: This is the same for each bodypart.

Open GIMS again, this time Select your model and click on ODR/ODD on EXPORT. Export it.
Note: Be sure than ">Mode" is set to ODR.
user posted image

Now navigate to the folder you exported the model wich should look like this (For the HEAD):
user posted image

Go to OpenIV, then "File->Create...->IMG Archive" and create an IMG archive somewhere.
OpenIV will automaticly open it, and it will Activate "Edit Mode". Click yes.
Now go to "New->Import OpenFormats->Drawable Model" And select your recently exported ODR.
The Open formats window will appear and click Ok. It will convert the file to GTAIV WDR.
Now you can see it inside your new IMG, select it and hit Ctrl+E to extract it as a WDR.
Now go back to Model folder to open the playerped.rpf.
Replace the Original model WDR with the one we've just created. If you want, open it to see if its OK.

To create the WTD (Texture Dictionary) you just need to look for the original WTD (should have same name as the model) open it in Edit Mode and replace the Diffuse texture with your own, names are not a problem.
If you are wondering about the Normal Map and Specular map, they are exported inside the WDR. wink.gif

That's it. Body Part done. You can now Test it ingame to see if everything works fine.

coin-god
  • coin-god

    High Roller

  • $outh $ide Hoodz
  • Joined: 18 Mar 2007

#3

Posted 13 July 2011 - 08:40 AM Edited by goin-god, 13 July 2011 - 08:42 AM.

Reserved.
Torso and Legs rigging.

Soon...

coin-god
  • coin-god

    High Roller

  • $outh $ide Hoodz
  • Joined: 18 Mar 2007

#4

Posted 13 July 2011 - 08:41 AM

reserved
Shoes, hair, and other details.

Soon.

miromiro
  • miromiro

    Time Killa™

  • Zaibatsu
  • Joined: 26 Nov 2009
  • None

#5

Posted 13 July 2011 - 08:56 AM

Awesome tutorial there mate, keep it up. icon14.gif
I'm sure many people will find it useful. Good work.

Kalvin
  • Kalvin

  • Members
  • Joined: 06 Apr 2011
  • United-Kingdom

#6

Posted 13 July 2011 - 09:37 AM

I did all that on my player model. But crashes, because i have 2011, and i don't have enough money to get 2010, and my brothers/dad/mom, etc don't trust me in torrenting, and it crashes, because i can't do materials, 2011 has a really brand new material editor, which has removed some features that i need in the process sad.gif

Ah well, i'll go back to boring ol' sa moddin.

hristobg
  • hristobg

    IV Map Modder, Scholarship Edition Project Leader

  • Members
  • Joined: 01 Aug 2009

#7

Posted 13 July 2011 - 09:41 AM

Great tutorial man! Keep it up! My game crashed, but I'm still trying. smile.gif

ManDog, in Material Editor go to Modes and select Compact. And it didn't removed the features, it moved them. biggrin.gif

Kalvin
  • Kalvin

  • Members
  • Joined: 06 Apr 2011
  • United-Kingdom

#8

Posted 13 July 2011 - 09:45 AM

OMG thankyou! now i can player model for iv! biggrin.gif

hristobg
  • hristobg

    IV Map Modder, Scholarship Edition Project Leader

  • Members
  • Joined: 01 Aug 2009

#9

Posted 13 July 2011 - 09:59 AM

Yeah, it worked! Thank you, goin-god!!! tounge.gif

user posted image

GooD-NTS
  • GooD-NTS

    OpenIV lead developer

  • Members
  • Joined: 03 May 2008
  • Russia

#10

Posted 13 July 2011 - 10:14 AM

QUOTE (goin-god)
Go to OpenIV, then "File->Create...->IMG Archive" and create an IMG archive somewhere.
OpenIV will automaticly open it, and it will Activate "Edit Mode". Click yes.
Now go to "New->Import OpenFormats->Drawable Model" And select your recently exported ODR.
The Open formats window will appear and click Ok. It will convert the file to GTAIV WDR.
Now you can see it inside your new IMG, select it and hit Ctrl+E to extract it as a WDR.
Now go back to Model folder to open the playerped.rpf.
Replace the Original model WDR with the one we've just created. If you want, open it to see if its OK.

You no need do that is this long way.
You can simple, open playerped.rpf in edit mode. Then you can simple replace WDR file for ODR by using import function.
For example:
  • Open playerped.rpf and go to edit mode.
  • Go to
    • "New->Import OpenFormats->Drawable Model" or
    • "New->Import OpenFormats->Multiply import" or
    • "RMB->Multiply import" or
    • just drag-and-drop ODR file from Windows Explorer into OpenIV.
    When you doing Import OpenIV will convert ODR file to WDR and replace existing file in RPF archive.



Kalvin
  • Kalvin

  • Members
  • Joined: 06 Apr 2011
  • United-Kingdom

#11

Posted 13 July 2011 - 10:33 AM Edited by ManDog, 13 July 2011 - 10:48 AM.

WTF? i got onto material bit, changed my material to GTA IV Material
Then i got a FATAL error, then material editor menu got screwed up confused.gif
EDIT: Got it to work, but in the 2nd material, i don't have a "gta_ped" option confused.gif
EDIT2: Still don't have a gta_ped, so i left it at GTA_default, probably crash ingame tho.. anyway, now i'm on to diffuse' etc maps, but i don't have any, how do i make one?
EDIT3: God, another EDIT. Anyway, i got past the whole thing, and now. GIMS and 3dsmax thinks my object is a sh*tting map -_-; dummy dev_col cannot be found! my 3dsmax is a piece of sh*t

coin-god
  • coin-god

    High Roller

  • $outh $ide Hoodz
  • Joined: 18 Mar 2007

#12

Posted 13 July 2011 - 05:01 PM

QUOTE (GooD-NTS @ Wednesday, Jul 13 2011, 07:14)
You no need do that is this long way.
You can simple, open playerped.rpf in edit mode. Then you can simple replace WDR file for ODR by using import function.
For example:
  • Open playerped.rpf and go to edit mode.
  • Go to
    • "New->Import OpenFormats->Drawable Model" or
    • "New->Import OpenFormats->Multiply import" or
    • "RMB->Multiply import" or
    • just drag-and-drop ODR file from Windows Explorer into OpenIV.
    When you doing Import OpenIV will convert ODR file to WDR and replace existing file in RPF archive.

Unfortunatly It's the first thing I tried, but makes the game crash. It seems to be buggy with RPF's.

GooD-NTS
  • GooD-NTS

    OpenIV lead developer

  • Members
  • Joined: 03 May 2008
  • Russia

#13

Posted 13 July 2011 - 05:11 PM

goin-god, yes I know about bugs in RPF but they are going when you make delete/add operations. But here you do only replace things.
And this is work, I check it in 0.9.2. Of cause in OpenIV 0.9.3 this bug will be fixed.

hristobg
  • hristobg

    IV Map Modder, Scholarship Edition Project Leader

  • Members
  • Joined: 01 Aug 2009

#14

Posted 13 July 2011 - 09:00 PM

I have some problems.

The body is reflecting like a mirror. 0:10
I moved bones to fit the new body, but the hands are still moved. 0:02
The neck is moving, but the actual head is not. 1:38

Just click on the links, please.



P.S. Map hasn't collisions, don't know why, but WBD is not working.

coin-god
  • coin-god

    High Roller

  • $outh $ide Hoodz
  • Joined: 18 Mar 2007

#15

Posted 13 July 2011 - 09:34 PM

Did you use gta_ped? Or one of the alphas?

The rest of the bugs are eigther bad rigging or export error, re-rig and export again.

hristobg
  • hristobg

    IV Map Modder, Scholarship Edition Project Leader

  • Members
  • Joined: 01 Aug 2009

#16

Posted 13 July 2011 - 10:09 PM

Just gta_ped.

DrDean
  • DrDean

    My custom member title is here.

  • Members
  • Joined: 13 Jul 2008

#17

Posted 14 July 2011 - 01:02 AM

Oh yeah, I confirmed all of this works in EFLC. Works as fine as regular IV.

vans123
  • vans123

    Thompson 1928

  • Members
  • Joined: 23 Jul 2008

#18

Posted 14 July 2011 - 02:22 AM

Coin; could you check pictures links? most of them are down or broken, i guess you need to get a more trustful host so they last forever

coin-god
  • coin-god

    High Roller

  • $outh $ide Hoodz
  • Joined: 18 Mar 2007

#19

Posted 14 July 2011 - 02:32 AM

QUOTE (vans123 @ Wednesday, Jul 13 2011, 23:22)
Coin; could you check pictures links? most of them are down or broken, i guess you need to get a more trustful host so they last forever

They all work for me.

vans123
  • vans123

    Thompson 1928

  • Members
  • Joined: 23 Jul 2008

#20

Posted 14 July 2011 - 03:50 AM

completed my first pair of shoes but i have them with a big azz amount of speculars, any help here on how to solve coin?

coin-god
  • coin-god

    High Roller

  • $outh $ide Hoodz
  • Joined: 18 Mar 2007

#21

Posted 14 July 2011 - 05:35 AM

QUOTE (vans123 @ Thursday, Jul 14 2011, 00:50)
completed my first pair of shoes but i have them with a big azz amount of speculars, any help here on how to solve coin?

I havn't tested Specular maps yet. All I can tell you is to lower the Specular amount in the Material Editor confused.gif

If you are not using one, then try adjusting the diferent values until you get it right. With Claude I have problem with specular too, although It may be because It has no normal map yet.

vans123
  • vans123

    Thompson 1928

  • Members
  • Joined: 23 Jul 2008

#22

Posted 14 July 2011 - 06:20 AM

i will try to export with no specular power, couse if i dont imput normal/specular it says me crap and cant export

hristobg
  • hristobg

    IV Map Modder, Scholarship Edition Project Leader

  • Members
  • Joined: 01 Aug 2009

#23

Posted 14 July 2011 - 09:45 AM

QUOTE
I moved bones to fit the new body, but the hands are still moved. 0:02


Okay, should I move the bones or the mesh to fit? If I move bones (and still not attached the two meshes), the original mesh is moving and when I attach it to the custom one,
the custom one is moved, too. I want to fix these hands, but I can't.

Also, at 1:38 why the neck is so "free-moving"? Shouldn't it just move a bit? Looks like something really got f*cked up.

mastertitsoyo
  • mastertitsoyo

    Rat

  • Members
  • Joined: 23 Mar 2007

#24

Posted 14 July 2011 - 12:47 PM

thx for the tutorial but quick ? the model i've imported is 10 x bigger than niko do i scale the model down or what and how to do so in 3d max

mastertitsoyo
  • mastertitsoyo

    Rat

  • Members
  • Joined: 23 Mar 2007

#25

Posted 14 July 2011 - 02:53 PM Edited by mastertitsoyo, 14 July 2011 - 05:16 PM.

I followed every step why is this happening when I export how do I fix this


=====Scene check=====
ERROR::Nothing found inside the "feet_000_u" dummy. Cannot export an empty model file!
ERROR::Nothing found inside the "hair_000_u" dummy. Cannot export an empty model file!
ERROR::Nothing found inside the "hand_000_r" dummy. Cannot export an empty model file!
ERROR::Nothing found inside the "head_000_r" dummy. Cannot export an empty model file!
ERROR::Nothing found inside the "lowr_000_u" dummy. Cannot export an empty model file!
ERROR::Nothing found inside the "uppr_000_u" dummy. Cannot export an empty model file!
ERROR::Skinned object "dev_model/head_000_r/head_000_r_high" can contain only 1 material. These're forbidden:"gta_radar","gta_trees","gta_terrain_va_2lyr","gta_terrain_va_3lyr","gta_terrain_va_4lyr"
=====Scene check end=====
Model export failed!

hristobg
  • hristobg

    IV Map Modder, Scholarship Edition Project Leader

  • Members
  • Joined: 01 Aug 2009

#26

Posted 15 July 2011 - 08:47 AM

Now I have other problem. When I attached to the custom model and deleted all vertexes, and just to check out does the bones are working, I realized that when I move whatever bone it is, the whole mesh is moving, not the part of it. Will that cause problems ingame?

Owenwilson1
  • Owenwilson1

    Homie

  • Members
  • Joined: 30 Dec 2008

#27

Posted 15 July 2011 - 09:30 AM

finaly i got it working thanks for the tutorial.
user posted image

Uploaded with ImageShack.us

darkfailure
  • darkfailure

    Punk-ass Bitch

  • Members
  • Joined: 21 Apr 2011

#28

Posted 15 July 2011 - 11:45 AM

Holy sh*t owenwilson1!
Is there any chance you will release this once it's finished (don't know if you want to add a helmet)?

bammargera
  • bammargera

    Just Call Me Rob, Its Easier That Way

  • Members
  • Joined: 24 Sep 2006

#29

Posted 15 July 2011 - 03:15 PM Edited by bammargera, 15 July 2011 - 03:36 PM.

Nice work mate, will try this for sure, rig my HD Tommy and Claude in full once my new graphics card arrives. Out of interest, would it work if my hand models are part of the torso chunk? Because for Tommy he's obviously wearing a short sleeved shirt, and so cutting the hands of is impractical.

coin-god
  • coin-god

    High Roller

  • $outh $ide Hoodz
  • Joined: 18 Mar 2007

#30

Posted 15 July 2011 - 04:06 PM

QUOTE (bammargera @ Friday, Jul 15 2011, 12:15)
Nice work mate, will try this for sure, rig my HD Tommy and Claude in full once my new graphics card arrives. Out of interest, would it work if my hand models are part of the torso chunk? Because for Tommy he's obviously wearing a short sleeved shirt, and so cutting the hands of is impractical.

Same with Bill in this tuto, check my solution. It may not be perfect, but you get moving fingers.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users