Vindictus model porting tutorial

I kinda suck at writing tutorials, so hopefully this isn’t too bad and useful to at least someone. I’ll try to keep this up to date as people ask questions and encounter problems using it.

Stuff that’s required:
• Vindictus: http://vindictus.nexon.net/
• HFS Decrypter: http://wiki.xentax.com/index.php/Vindictus
• Cannonfodder’s MDL Decompiler: http://www.chaosincarnate.net/cannonfodder/cftools.htm
• Photoshop or GIMP or some other way to edit vtf files.
• About 5 or GB of free HDD space: There is no apparent rhyme or reason to how the files are named so I can’t tell you what is in each specific archive to get you to what you want, so for this I’m batch converting and extracting all the games assets.
• Some sort of 3d modeling program capable of importing / exporting smds. (Milkshape or 3ds max)

Recommended but not required:
• A batch file renamer
• A batch zip extractor.

Step 1 Extraction:

First step is to decrypt all the HFS files from Vindictus. By default they are in C:\Nexon\Vindictus\en-US\hfs. Run the VZipFlip tool you downloaded from the HFS Decrypter link at the top with the following command line:

VZipFlip.exe a C:\Nexon\Vindictus\en-US\hfs

The tag “a” will do all the hfs files in the folder. Also change the directory to reflect where you have Vindictus installed to if it’s different. The program will take a bit of time to run so go have a cup of coffee or something

After it finishes you now have a bunch of zip files with various files in them. Extract them one at a time to a folder, or preferably use a batch unzip program to extract them all to a folder. If you are using a batch extractor, again this part will take a bit of time so go watch some TV or something. Once you have everything extracted from the zip files you can delete them, as you won’t need them anymore.

Unfortunately Vindictus’s HFS format somehow mimics a file structure that isn’t replicated by the decrypting program so you’ll have a ton of files in the folder you extracted everything to; thankfully when you sort by type it make it slightly easier to find what you want. For some reason the model files have a weird extension “.mdl.comp”. I have no idea what the .comp is there for but you can rename the file and take off the .comp part. I would recommend using a batch file renamer for this, just rename everything in the folder from “.mdl.comp” to “.mdl”. Then we can move onto decompiling.

Step 2 Decompiling:

For this tutorial I’m going to create a Fiona ragdoll, using her “Shining Will” armor. To do this I need to decompile several models:
All five parts of her armor:

“pc_female_shiningwill_hand.mdl”
“pc_female_shiningwill_head.mdl”
“pc_female_shiningwill_foot.mdl”
“pc_female_shiningwill_lower.mdl”
“pc_female_shiningwill_upper.mdl”

Her head:

“fiona_face01.mdl” You will need the expression data from this qc as well as the vta file.

Any Fiona Inner Armor:

“Fiona_inner_armor0*.mdl” *being a number you want there’s like 7 or 8 of them

Any Fiona Hair:

“pc_fiona_hair_*.mdl” There is a couple there they actually have relevant names so a little easier to figure out than the inner_armor. For this I’m using “pc_fiona_hair_natural_long_01.mdl”

And finally the actual Fiona Model, which you need the qc, ragdoll and physmodel from:

“fiona.mdl”

I recommend decompiling them to separate folders, so that stuff doesn’t get overwritten and you can keep the QC for each of them.

Step 3 Compiling:

Now it’s time to build the qc file to compile the model. Take the qc from fiona.mdl, which will be a mess. Delete almost everything in the top part, all her face flexes, hboxs, and animation calls. However Keep the attachments! basically you’ll be left with this:

$cd “C:\whatever”
$modelname “player\fiona\fiona.mdl”
$cdmaterials “models\player\fiona”
$surfaceprop “flesh”
$eyeposition -0.000 0.000 70.000
$attachment “eyes” “ValveBiped.Bip01_Head1” 3.95 2.62 -0.00 rotate -0.00 82.41 90.00
$attachment “forward” “ValveBiped.Bip01_Head1” 0.00 0.00 0.00 rotate 0.00 80.00 90.00
$attachment “chest” “ValveBiped.Bip01_Spine2” -0.00 -0.00 0.00 rotate 0.00 90.00 90.00
$illumposition -0.924 0.175 36.610
$sequence ragdoll “ragdoll” ACT_DIERAGDOLL 1 fps 1.00
$collisionjoints “phymodel.smd” {BLAH BLAH BLAH JOINT CONSTRANTS* }

For the joint constrain data I would recommend increasing all the min/max numbers by about 20%, since those original constraints aren’t very flexible. Now you want to gather up all your files that were decompiled: The ragdoll.smd and phymodel.smd and this qc file from this Fiona.mdl, The qc file, the “mdldecompiler_expressions.vta” and smd from the fiona_face01.mdl, and all the reference smds from the hair and armor. Once you have them all together it’s time to add the $model to the qc file after $cd,. Should look like this:

$model “Fiona” “pc_fiona_inner_armor03.smd”
$model “hair” “pc_fiona_hair_natural_long_01.smd”
$model “armor_hand” “pc_female_shiningwill_hand.smd”
$model “armor_head” “pc_female_shiningwill_head.smd”
$model “armor_foot” “pc_female_shiningwill_foot.smd”
$model “armor_lower” “pc_female_shiningwill_lower.smd”
$model “armor_upper” “pc_female_shiningwill_upper.smd”

For the last part copy the $model line with all of it’s flex data from the decompiled ”fiona_face01.mdl”’s qc. Should look like this:

$model “face” “pc_fiona_face01.smd” {
flexfile “mdldecompiler_expressions.vta” {
blah blah flex data
}
blah blah flex controllers
}

In the face flex data you will need to correct one line. The decompiler renames the eyeball texture to “eyeball_r” / “eyeball_l”. You will need to update that to “<name>_eyeball_r” / “<name>_eyeball_l”. So for as per my example your eye lines should look like this:



     eyeball righteye ValveBiped.Bip01_Head1 -1.290 -2.079 68.262 fiona_eyeball_r 1.000  3.000 fiona_pupil_r01 0.650
     eyeball lefteye ValveBiped.Bip01_Head1 1.290 -2.079 68.262 fiona_eyeball_l 1.000  -3.000 fiona_pupil_l01 0.65


(Thank you Squiddy!)

You can now compile the model using that qc.

Step 4 Textures:

Now copy and paste all the textures (vtfs and vmts) you need into where you set the material path to. You can find out what textures you need since they are all listed in each mdldecompiler.qc file (how convenient). You will need to update all of the vmts to have the $basetexture and $bumpbap lines point to the right folder, additional all the shaders at the top (first line of the file) will need to be changed to “VertexLitGeneric”.

After all the textures are copied over and the vmts You are ready to look at the model in HLMV. You should get this:

[img_thumb]http://dl.dropbox.com/u/2004377/12-26-2010%204-12-47%20PM.jpg[/img_thumb]

Oh no it’s all weird colors! Since Vindictus uses some sort of color mapping that gmod doesn’t support (so far as I know). You will need to edit the textures in Photoshop or GIMP to get them the way you want. I recommend creating 3 hue/saturation layers using each of the channels as there layer map. After that de-saturate the original texture then adjust the hue/saturation of each layer to your liking. It sounds like a lot of work but it’s fairly easy, since once you find the right hue/sat values you can simply reuse them on all the other textures. Once your done you should have this:

[img_thumb]http://dl.dropbox.com/u/2004377/12-26-2010%205-03-22%20PM.jpg[/img_thumb]

Congratulations: You can then test it in game, everything should work fine.

Step 5 Problem Solving/Misc Things:

If the model is too inflexible, adjust the joint constraints in the qc file.

If there are a lot of cloth parts to the model, I would recommend looking for the bone names in the smds, and making them jigglebones. Also the same with hair.

If parts of the model (skin / etc) clip through the armor, you will need to edit the inner armor smd with a 3d modeling program, and delete those parts that clip through. For example if the boots cover all of the feet, you can delete the feet vertices, or since most of her torso is covered by armor you can delete the vertices between her hips and breasts. Vindictus used a system to dynamically remove parts of models which I believe is related to the .clipping files, however I have no idea what to do with them to help you here. After that just recompile the model.

If you want to do props they should be pretty straight forward. The weapon models are rigged on the Vindictus player skeleton, I would recommend stripping the bones and compiling them as a simple prop.

If the face is missing eyebrows you have to find an eyebrow texture in the extracted Vindictus files and set it as an overlay on the face texture. You can also do this with some of the make-up textures or tattoo textures they have as well.

Good luck and enjoy.

thanks 4 info. but i got a question.

I already have extracted vindictus files(and it’s sorted by file category)
if u don’t mind, would you kindly give a tutorial for that kinda extracted file?

Just skip to step 2.

This is very helpful, thanks!

Haha! This makes my life much easier, thank you!

I’ve never tried to de-compile and such so I kinda failed miserably, there we’re allot more work than I thought but in the end I think I screwed up the QC…

Managed to compile it and I viewed the model in hlmv, didn’t have any body textures, only the head and feet and teeth and such, but hopefully I’ll fix it.

for someone like me who lacks 3ds or modeling exspriance, could you provide links to your fiona model?

Can’t wait to see what people do with this.

incredible post. I subscribed this forum only to reply this post. thanks. but i don’t understand that sentence, “You can now compile the model using that qc.”.

you mean I have to use source sdk or something else to make new mdl file which includes every part in it?

Read this.

Hm so, when I tried to compile one of the characters, I had to comment out the eyeballs under the flex controllers in order for it to compile. How did you circumvent this?

I did not encounter that problem. Which head is being used?

Any of the heads, actually. When I tried Fiona, the UVs were messed up on all four of her heads (including the base model’s), too. For Lann and Evie I only had to comment out the eyeballs. Could be I ended up with a different version of the models…
I’ll be re-decrypting and extracting them all after the next patch.

All right, keep me posted. Worst case I can just upload the decompiled heads I have somewhere.

can you post full text of qc file that you used in converting job? I got too many obstacles in making qc file.


$cd "C:\fiona\"
$modelname "player\fiona\fiona.mdl"
$model "fiona" "pc_fiona_inner_latex.smd"
$model "foot" "pc_female_shiningwill_foot.smd"
$model "hand" "pc_female_shiningwill_hand.smd"
$model "head" "pc_female_shiningwill_head.smd"
$model "lower" "pc_female_shiningwill_lower.smd"
$model "upper" "pc_female_shiningwill_upper.smd"
$model "hair" "pc_fiona_hair_natural_long_01.smd"
$model "face" "pc_fiona_face01.smd" {
     flexfile "mdldecompiler_expressions.vta" {
          flex "blink" frame 5
          flex "blink_ui" frame 6
          flex "mild" frame 7
          flex "smile" frame 8
          flex "sad" frame 9
          flex "sorry" frame 10
          flex "hostile" frame 11
          flex "angry" frame 12
          flex "hurt" frame 13
          flex "happy" frame 14
          flex "upperlid_hi" frame 15
          flex "surprised" frame 16
          flex "laugh" frame 17
          flex "mid_happy" frame 18
          flex "haughty_open" frame 19
          flex "haughty_closed" frame 20
          flex "oo" frame 21
          flex "mouth_a" frame 22
          flex "chew_up" frame 23
          flex "chew_down" frame 24
     }
     eyeball righteye ValveBiped.Bip01_Head1 -1.290 -2.079 68.262 fiona_eyeball_r 1.000  3.000 fiona_pupil_r01 0.650
     eyeball lefteye ValveBiped.Bip01_Head1 1.290 -2.079 68.262 fiona_eyeball_l 1.000  -3.000 fiona_pupil_l01 0.650
     // If you uncomment the following lines the eyes will be closed
     // I'm including it anyway in case anyone wants to experiment
     // eyelid  upper_right "mdldecompiler_expressions.vta" lowerer 3 -0.500000 neutral 3 0.000000 raiser 3 0.000000 split 0.1 eyeball righteye
     // eyelid  lower_right "mdldecompiler_expressions.vta" lowerer 3 0.000000 neutral 3 0.000000 raiser 3 0.000000  split 0.1 eyeball righteye
     // If you uncomment the following lines the eyes will be closed
     // I'm including it anyway in case anyone wants to experiment
     // eyelid  upper_left "mdldecompiler_expressions.vta" lowerer 4 -0.500000 neutral 4 0.000000 raiser 4 0.000000 split -0.1 eyeball lefteye
     // eyelid  lower_left "mdldecompiler_expressions.vta" lowerer 3 0.000000 neutral 3 0.000000 raiser 3 0.000000  split -0.1 eyeball lefteye
     mouth 0 "mouth"  ValveBiped.Bip01_Head1 0.000 1.000 0.000
     flexcontroller eyelid blink "range" 0.000 1.000
     flexcontroller eyelid blink_ui "range" 0.000 1.000
     flexcontroller eye mild "range" 0.000 1.000
     flexcontroller eye smile "range" 0.000 1.000
     flexcontroller eye sad "range" 0.000 1.000
     flexcontroller eye sorry "range" 0.000 1.000
     flexcontroller eye hostile "range" 0.000 1.000
     flexcontroller eye angry "range" 0.000 1.000
     flexcontroller eye hurt "range" 0.000 1.000
     flexcontroller eye happy "range" 0.000 1.000
     flexcontroller eye upperlid_hi "range" 0.000 1.000
     flexcontroller eye surprised "range" 0.000 1.000
     flexcontroller eye laugh "range" 0.000 1.000
     flexcontroller eye mid_happy "range" 0.000 1.000
     flexcontroller eye haughty_open "range" 0.000 1.000
     flexcontroller eye haughty_closed "range" 0.000 1.000
     flexcontroller eye oo "range" 0.000 1.000
     flexcontroller mouth mouth_a "range" 0.000 1.000
     flexcontroller mouth chew_up "range" 0.000 1.000
     flexcontroller mouth chew_down "range" 0.000 1.000
    %blink =  blink
    %blink_ui =  blink_ui
    %mild =  mild
    %smile =  smile
    %sad =  sad
    %sorry =  sorry
    %hostile =  hostile
    %angry =  angry
    %hurt =  hurt
    %happy =  happy
    %upperlid_hi =  upperlid_hi
    %surprised =  surprised
    %laugh =  laugh
    %mid_happy =  mid_happy
    %haughty_open =  haughty_open
    %haughty_closed =  haughty_closed
    %oo =  oo
    %mouth_a =  mouth_a
    %chew_up =  chew_up
    %chew_down =  chew_down
}
$cdmaterials "models\player\fiona\"

$surfaceprop "flesh"
$eyeposition -0.000 0.000 70.000
$illumposition -0.924 0.175 36.610
$sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 1.00

$collisionjoints "phymodel.smd" {

	$mass 55.0
	$inertia 5.00
	$damping 0.01
	$rotdamping 1.50
	$rootbone "valvebiped.bip01_pelvis"

	$jointconstrain "valvebiped.bip01_spine" x limit -10.00 10.00 0.20
	$jointconstrain "valvebiped.bip01_spine" y limit -6.00 6.00 0.20
	$jointconstrain "valvebiped.bip01_spine" z limit -3.00 39.00 0.00

	$jointconstrain "valvebiped.bip01_r_thigh" x limit -15.00 8.00 0.20
	$jointconstrain "valvebiped.bip01_r_thigh" y limit -3.00 6.00 0.20
	$jointconstrain "valvebiped.bip01_r_thigh" z limit -17.00 88.00 0.20

	$jointconstrain "valvebiped.bip01_l_thigh" x limit -8.00 15.00 0.20
	$jointconstrain "valvebiped.bip01_l_thigh" y limit -3.00 6.00 0.20
	$jointconstrain "valvebiped.bip01_l_thigh" z limit -17.00 88.00 0.20

	$jointconstrain "valvebiped.bip01_l_calf" x limit -1.00 15.00 0.20
	$jointconstrain "valvebiped.bip01_l_calf" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_calf" z limit -70.00 -15.00 0.00

	$jointconstrain "valvebiped.bip01_l_foot" x limit -15.00 15.00 0.00
	$jointconstrain "valvebiped.bip01_l_foot" y limit -6.00 6.00 0.00
	$jointconstrain "valvebiped.bip01_l_foot" z limit -23.00 15.00 0.00

	$jointconstrain "valvebiped.bip01_spine1" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_spine1" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_spine1" z limit 0.00 0.00 0.00

	$jointconstrain "valvebiped.bip01_spine2" x limit -15.00 15.00 0.20
	$jointconstrain "valvebiped.bip01_spine2" y limit -10.00 10.00 0.20
	$jointconstrain "valvebiped.bip01_spine2" z limit -3.00 10.00 0.00

	$jointconstrain "valvebiped.bip01_r_clavicle" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_clavicle" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_clavicle" z limit 0.00 0.00 0.00

	$jointconstrain "valvebiped.bip01_r_upperarm" x limit -10.00 23.00 0.20
	$jointconstrain "valvebiped.bip01_r_upperarm" y limit -32.00 -8.00 0.00
	$jointconstrain "valvebiped.bip01_r_upperarm" z limit -46.00 17.00 0.00

	$jointconstrain "valvebiped.bip01_l_clavicle" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_clavicle" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_clavicle" z limit 0.00 0.00 0.00

	$jointconstrain "valvebiped.bip01_l_upperarm" x limit -23.00 10.00 0.20
	$jointconstrain "valvebiped.bip01_l_upperarm" y limit -8.00 32.00 0.00
	$jointconstrain "valvebiped.bip01_l_upperarm" z limit -46.00 17.00 0.00

	$jointconstrain "valvebiped.bip01_l_forearm" x limit -1.00 1.00 0.20
	$jointconstrain "valvebiped.bip01_l_forearm" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_forearm" z limit -108.00 -15.00 0.00

	$jointconstrain "valvebiped.bip01_l_hand" x limit -15.00 17.00 0.00
	$jointconstrain "valvebiped.bip01_l_hand" y limit -17.00 10.00 0.00
	$jointconstrain "valvebiped.bip01_l_hand" z limit -39.00 41.00 0.00

	$jointconstrain "valvebiped.bip01_r_forearm" x limit -1.00 1.00 0.20
	$jointconstrain "valvebiped.bip01_r_forearm" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_forearm" z limit -108.00 -12.00 0.00

	$jointconstrain "valvebiped.bip01_r_hand" x limit -37.00 26.00 0.00
	$jointconstrain "valvebiped.bip01_r_hand" y limit -15.00 23.00 0.00
	$jointconstrain "valvebiped.bip01_r_hand" z limit -41.00 46.00 0.00

	$jointconstrain "valvebiped.bip01_r_calf" x limit -17.00 8.00 0.00
	$jointconstrain "valvebiped.bip01_r_calf" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_calf" z limit -70.00 -15.00 0.00

	$jointconstrain "valvebiped.bip01_r_foot" x limit -15.00 15.00 0.00
	$jointconstrain "valvebiped.bip01_r_foot" y limit -6.00 6.00 0.00
	$jointconstrain "valvebiped.bip01_r_foot" z limit -26.00 8.00 0.00

	$jointconstrain "valvebiped.bip01_head1" x limit -26.00 26.00 0.20
	$jointconstrain "valvebiped.bip01_head1" y limit -32.00 32.00 0.20
	$jointconstrain "valvebiped.bip01_head1" z limit -19.00 30.00 0.20
}

Haha, I found out the problem! The decompiler was setting the eyeball texture name under the flexfile to simply “eyeball_r” / “eyeball_l” instead of “<name>_eyeball_r” etc! :smiley:
It all works now! The only problem now is Fiona’s face texture.
[EDIT]
I had to go through and modify the eyelid flexes a bit for Evie’s eyes to stay open, but they were a’ok after that. :smiley:
If anyone else encounters a similar problem, I’ll be happy to provide my .qc as a sample.

i think i encounterd the same problem. i used guistudiomdl 2.2 to compile, but an error occurs saying

ERROR:~~~~~.qc(33): - can’t find eyeball texture “fiona_eyeball_r” on model

so i copied the file fiona_eyeball_r.vmt and vtf in the same directory and modified vmt like this

“eyes”
{
“$basetexture” “fiona_eyeball_r”
“$iris” “models/player/fiona/fiona_pupil_r01”
“$halflambert” 1
“$nodecal” “1”
}

however the problem didn’t solved.

Awesome. I must have forgotten doing that. Thanks.

I don’t get the texturing part, can you perhaps add some pictures step by step to help me?