Converting models of weapons cs 1.6 for cs go
Video:
VIDEO
We will need a few programs:
-Crowbar
http://steamcommunit...48158158680766/
-VTFEdit
http://nemesis.thewa.../index.php?p=41
-MilkShape 3D 1.8.4
http://gamebanana.com/tools/4871
-Half-Life Model Viewer
https://developer.va...ki/Model_Viewer
Here we go (sorry for the spelling mistakes ,spelling ,English )
1.Na beginning they ran a model that you want to convert and it decompiles Using a crowbar or Milkshape ( I'm wearing the processing
http://gamebanana.com/skins/145296 )
We extract a model folder model cs 1.6
2.turn on Milkshape choose from the bar tools- > Kratisto 's Half -Life MDL Decompiler v1.2
I choose to decompile our model with cs 1.6 , in this case v_famas and click OK . After a while, the model should be decompiled .
3.Go to our folder decompile model and open a text document file ( QC) v_famas using a notebook (I use Notepad ++ )
QC My file looks like this:
Code:
/*
==============================================================================
QC script generated by Half-Life MDL Decompiler 1.2
2003, Kratisto. Based on code from Valve's HL SDK.
v_famas.mdl
Original internal name:
"v_m1918bar.mdl"
==============================================================================
*/
$modelname "v_famas.mdl"
$cd ".\"
$cdtexture ".\"
$scale 1.0
$cliptotextures
$bbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$cbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$eyeposition 0.000000 0.000000 0.000000
//reference mesh(es)
$body "weapon" "v_m1918bar"
$body "hands" "CSO_Hand_Male_L_2009"
// 2 attachment(s)
$attachment 0 "Bone02" 28.000000 0.000000 0.000000
$attachment 1 "Bone02" 0.500000 -1.000000 0.500000
// 12 hit box(es)
$hbox 0 "root" -9.310107 -5.231260 -12.513384 9.847816 3.010857 0.000000
$hbox 0 "Bone01" -1.360000 -8.498729 -1.730000 1.620000 8.762585 1.240000
$hbox 0 "Bone_Lefthand" -1.600000 -6.426759 -0.830000 2.441370 0.000000 0.920000
$hbox 0 "Bone02" -13.920000 -7.750000 -4.510000 28.000000 1.490000 4.490000
$hbox 0 "Bone_L_Upper" 0.000000 -1.690000 -2.690000 8.980000 1.680000 1.690000
$hbox 0 "Bone05" 0.000000 -0.830000 -0.750000 1.535927 0.870000 0.730000
$hbox 0 "Bone06" 0.000000 -0.660000 -0.610000 1.200000 0.540000 0.490000
$hbox 0 "Bone04" -1.720000 -8.450418 -1.670000 1.310000 8.839177 1.300000
$hbox 0 "Bone_Righthand" -1.400000 -3.140000 -0.810000 1.580000 0.000000 0.940000
$hbox 0 "Bone27" 0.000000 -0.870000 -0.750000 1.522835 0.850000 0.730000
$hbox 0 "Bone28" 0.000000 -0.560000 -0.610000 1.230000 0.630000 0.480000
$hbox 0 "Bone_R_Upper" 0.000000 -1.630000 -2.690000 9.070000 1.740000 1.690000
// 6 animation sequence(s)
$sequence "idle1" "idle1" fps 30 loop
$sequence "reload" "reload" fps 30 {
{ event 5004 24 "weapons/m1918bar_clipout.wav" }
{ event 5004 55 "weapons/m1918bar_clipin.wav" }
{ event 5004 74 "weapons/m1918bar_boltpull.wav" }
}
$sequence "draw" "draw" fps 30
$sequence "shoot1" "shoot1" fps 30 { event 5001 0 "23" }
$sequence "shoot2" "shoot2" fps 30 { event 5001 0 "23" }
$sequence "shoot3" "shoot3" fps 30 { event 5001 0 "23" }
// End of QC script.
That it can be compiled as a model for cs him we have to convert some .
4.Open qc file and remove from it are:
Code:
$modelname "v_famas.mdl"
$cd ".\"
$cdtexture ".\"
$scale 1.0
$cliptotextures
$bbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$cbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$eyeposition 0.000000 0.000000 0.000000
And instead add to the beginning of it
$ModelName "weapons\v_rif_famas.mdl" //name model
$CDMaterials "models\weapons\v_models\nowy_famas\" //textures
5.A now we need to add animation corresponding functions or if the animation qc model with 1.6 are :
Code:
// 6 animation sequence(s)
$sequence "idle1" "idle1" fps 30 loop
$sequence "reload" "reload" fps 30 {
{ event 5004 15 "Weapon_FAMAS.Clipout" }
{ event 5004 42 "Weapon_FAMAS.Clipin" }
{ event 5004 57 "Weapon_FAMAS.ClipHit" }
{ event 5004 76 "Weapon_FAMAS.BoltBack" }
{ event 5004 78 "Weapon_FAMAS.BoltForward" }
}
$sequence "draw" "draw" fps 30
$sequence "shoot1" "shoot1" fps 30 { event 5001 0 "23" }
$sequence "shoot2" "shoot2" fps 30 { event 5001 0 "23" }
$sequence "shoot3" "shoot3" fps 30 { event 5001 0 "23" }
,Then we must do so ( eg . To reload animations add activity " ACT_VM_RELOAD " 1 ) :
Code:
// 6 animation sequence(s)
$sequence "idle1" "idle1" fps 30 loop activity "ACT_VM_IDLE" 1
$sequence "reload" "reload" fps 30 activity "ACT_VM_RELOAD" 1 {
{ event 5004 15 "Weapon_FAMAS.Clipout" }
{ event 5004 42 "Weapon_FAMAS.Clipin" }
{ event 5004 57 "Weapon_FAMAS.ClipHit" }
{ event 5004 76 "Weapon_FAMAS.BoltBack" }
{ event 5004 78 "Weapon_FAMAS.BoltForward" }
}
$sequence "draw" "draw" fps 30 activity "ACT_VM_DRAW" 1
$sequence "shoot1" "shoot1" fps 30 { event 5001 0 "23" } activity "ACT_VM_PRIMARYATTACK" 1
$sequence "shoot2" "shoot2" fps 30 { event 5001 0 "23" } activity "ACT_VM_PRIMARYATTACK" 1
$sequence "shoot3" "shoot3" fps 30 { event 5001 0 "23" } activity "ACT_VM_PRIMARYATTACK" 1
7.A whole should look like this:
Code:
/*
==============================================================================
QC script generated by Half-Life MDL Decompiler 1.2
2003, Kratisto. Based on code from Valve's HL SDK.
v_famas.mdl
Original internal name:
"v_m1918bar.mdl"
==============================================================================
*/
$ModelName "weapons\v_rif_famas.mdl"
$CDMaterials "models\weapons\v_models\nowy_famas\" //ścieżka do textur
//reference mesh(es)
$body "weapon" "v_m1918bar"
$body "hands" "CSO_Hand_Male_L_2009"
// 2 attachment(s)
$attachment 0 "Bone02" 28.000000 0.000000 0.000000
$attachment 1 "Bone02" 0.500000 -1.000000 0.500000
// 12 hit box(es)
$hbox 0 "root" -9.310107 -5.231260 -12.513384 9.847816 3.010857 0.000000
$hbox 0 "Bone01" -1.360000 -8.498729 -1.730000 1.620000 8.762585 1.240000
$hbox 0 "Bone_Lefthand" -1.600000 -6.426759 -0.830000 2.441370 0.000000 0.920000
$hbox 0 "Bone02" -13.920000 -7.750000 -4.510000 28.000000 1.490000 4.490000
$hbox 0 "Bone_L_Upper" 0.000000 -1.690000 -2.690000 8.980000 1.680000 1.690000
$hbox 0 "Bone05" 0.000000 -0.830000 -0.750000 1.535927 0.870000 0.730000
$hbox 0 "Bone06" 0.000000 -0.660000 -0.610000 1.200000 0.540000 0.490000
$hbox 0 "Bone04" -1.720000 -8.450418 -1.670000 1.310000 8.839177 1.300000
$hbox 0 "Bone_Righthand" -1.400000 -3.140000 -0.810000 1.580000 0.000000 0.940000
$hbox 0 "Bone27" 0.000000 -0.870000 -0.750000 1.522835 0.850000 0.730000
$hbox 0 "Bone28" 0.000000 -0.560000 -0.610000 1.230000 0.630000 0.480000
$hbox 0 "Bone_R_Upper" 0.000000 -1.630000 -2.690000 9.070000 1.740000 1.690000
// 6 animacje
$sequence "idle1" "idle1" fps 30 loop activity "ACT_VM_IDLE" 1
$sequence "reload" "reload" fps 30 activity "ACT_VM_RELOAD" 1 {
{ event 5004 15 "Weapon_FAMAS.Clipout" }
{ event 5004 42 "Weapon_FAMAS.Clipin" }
{ event 5004 57 "Weapon_FAMAS.ClipHit" }
{ event 5004 76 "Weapon_FAMAS.BoltBack" }
{ event 5004 78 "Weapon_FAMAS.BoltForward" }
}
$sequence "draw" "draw" fps 30 activity "ACT_VM_DRAW" 1
$sequence "shoot1" "shoot1" fps 30 { event 5001 0 "23" } activity "ACT_VM_PRIMARYATTACK" 1
$sequence "shoot2" "shoot2" fps 30 { event 5001 0 "23" } activity "ACT_VM_PRIMARYATTACK" 1
$sequence "shoot3" "shoot3" fps 30 { event 5001 0 "23" } activity "ACT_VM_PRIMARYATTACK" 1
// End of QC script.
8.If we have everything redone we save and we carry out texture.
open VTFEdit
Click File- > New- > File- > Import ( choose one of our textures for example . M1918bar_v.bmp and click ok)
Now we File- > save as ... ( and save to a folder model 1.6 NOTE name must be the same as the original or written as m1918bar_v )
9.Now we assign a file path .vtf
Click File- > New and remove
Code:
"LightmappedGeneric"
{
}
And instead of the paste is:
Code:
"VertexLitGeneric"
{
"$baseTexture" "models\weapons\v_models\nowy_famas\m1918bar_v"
}
Now we File- > save as ... and save with the same name as the previous texture that is m1918bar_v
And as we do with all the textures
10.When we have finished texture we build our model open Crowbar ( must be configured )
Chose- > compile- > Browse and choose our file qc and click on the bottom compile
After a successful compilation definitely we should get such communi :
Code:
Compiling with Crowbar 0.34.0.0: "C:\Users\Daniel i Dawid\Desktop\tut modele cs 1.6 for cs go\models\csss.qc" ...
Compiling ".\csss.qc" ...
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/knife_butterfly/knife_butterfly.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/knife_bayonet/knife_bayonet.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/knife_ct/knife_ct.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/knife_flip/knife_flip.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/knife_gut/knife_gut.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/knife_karam/karam.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/knife_m9_bay/knife_m9_bay.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/knife_t/knife_t.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/knife_tactical/knife_tactical.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/mach_m249para/m249.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/mach_negev/mach_negev.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/pist_223/pist_223.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/pist_cz_75/pist_cz_75.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/pist_deagle/pist_deagle.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/pist_elite/m9a1.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/pist_fiveseven/fiveseven.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/pist_glock18/pist_glock18.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/pist_hkp2000/pist_hkp2000.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/pist_p250/p250.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/pist_tec9/pist_tec9.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/rif_ak47/ak47.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/rif_aug/rif_aug.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/rif_famas/rif_famas.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/rif_galilar/rif_galilar.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/rif_m4a1/rif_m4a1.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/rif_m4a1_s/rif_m4a1_s.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/rif_sg556/rif_sg556.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/shot_mag7/shot_mag7.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/shot_nova/shot_nova.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/shot_sawedoff/shot_sawedoff_01.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/shot_xm1014/shot_xm1014.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/smg_bizon/bizon.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/smg_mac10/smg_mac10_1.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/smg_mp7/smg_mp7.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/smg_mp9/smg_mp9.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/smg_p90/smg_p90.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/smg_ump45/smg_ump45.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/snip_awp/awp.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/snip_g3sg1/snip_g3sg1.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/snip_scar20/snip_scar20.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/snip_ssg08/snip_ssg08.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/snip_ssg08/snip_ssg08_scope.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/pist_revolver/pist_revolver.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/knife_falchion_advanced/knife_falchion_advanced.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/knife_push/knife_push.vmt.
CustomMaterialManager: Cached KeyValues materials/models/weapons/v_models/knife_survival_bowie/knife_survival_bowie.vmt.
qdir: "c:\users\daniel i dawid\desktop\tut modele cs 1.6 for cs go\models\"
gamedir: "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\"
g_path: "csss.qc"
Building binary model files...
Working on "csss.qc"
SMD MODEL v_m1918bar.smd
SMD MODEL CSO_Hand_Male_L_2009.smd
SMD MODEL idle1.smd
SMD MODEL reload.smd
SMD MODEL draw.smd
SMD MODEL shoot1.smd
SMD MODEL shoot2.smd
SMD MODEL shoot3.smd
Processing LOD for material: m1918bar_v
Processing LOD for material: CSO_HighQ_Hand__Long_512
---------------------
writing C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\models/weapons\v_rif_famas.mdl:
bones 11444 bytes (45)
animation x y ips angle
animations 26888 bytes (6 anims) (277 frames) [0:09]
sequences 2116 bytes (6 seq)
hdr@04A5F204=7A400200
ik/pose 328 bytes
eyeballs 0 bytes (0 eyeballs)
flexes 0 bytes (0 flexes)
eyeballs 0 bytes (0 eyeballs)
flexes 0 bytes (0 flexes)
hdr@04A5F204=7A400200
textures 136 bytes
keyvalues 116 bytes
hdr@04A5F200=7A400398
hdr@04A5F204=7A400200
bone transforms 6184 bytes
bone flex driver 0 bytes
bodygroup presets 0 bytes
collision 0 bytes
total 48068
---------------------
writing C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\models/weapons\v_rif_famas.vvd:
vertices 178560 bytes (3720 vertices)
vertices 79872 bytes (1664 vertices)
tangents 59520 bytes (3720 vertices)
tangents 26624 bytes (1664 vertices)
total 344640 bytes
---------------------
Generating optimized mesh "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\models/weapons\v_rif_famas.dx90.vtx":
body parts: 16 bytes
models: 40 bytes
model LODs: 24 bytes
meshes: 18 bytes
strip groups: 66 bytes
strips: 70 bytes
verts: 48438 bytes
indices: 32688 bytes
bone changes: 352 bytes
everything: 81724 bytes
Completed "csss.qc"
CDynamicFunction: Loading library 'Kernel32.dll' (75890000)
CDynamicFunction: Lookup of 'TryEnterCriticalSection' in 'Kernel32.dll': 77C3BE60
CDynamicFunction: Closing library 'Kernel32.dll' (75890000)
... Compiling ".\csss.qc" finished. Check above for any errors.
... Compiling with Crowbar 0.34.0.0: "C:\Users\Daniel i Dawid\Desktop\tut modele cs 1.6 for cs go\models\csss.qc" finished
11.Open the folder compiled 0.34 and copy the files that are there and paste it to the target folder or folder models / weapons
Copy also texture the models \ weapons \ v_models \ nowy_famas
And ready so the model looks in Half -Life Model Viewer
Problems with Converting models :
1.Model not see the game but everything do correctly it may be due to the fact that the model is inversely arranged
( Should look like in HLMV)
must be parallel to the red line . If set otherwise we have to add the file QC at each animation rotate 90 ( 90 is an example of a value in degrees , if the model is to rotate )
Example:
Code:
// 6 animacje
$sequence "idle1" "idle1" fps 30 rotate 90 loop activity "ACT_VM_IDLE" 1
$sequence "reload" "reload" fps 30 rotate 90 activity "ACT_VM_RELOAD" 1 {
{ event 5004 15 "Weapon_FAMAS.Clipout" }
{ event 5004 42 "Weapon_FAMAS.Clipin" }
{ event 5004 57 "Weapon_FAMAS.ClipHit" }
{ event 5004 76 "Weapon_FAMAS.BoltBack" }
{ event 5004 78 "Weapon_FAMAS.BoltForward" }
}
$sequence "draw" "draw" fps 30 activity "ACT_VM_DRAW" 1
$sequence "shoot1" "shoot1" fps 30 { event 5001 0 "23" } rotate 90 activity "ACT_VM_PRIMARYATTACK" 1
$sequence "shoot2" "shoot2" fps 30 { event 5001 0 "23" } rotate 90 activity "ACT_VM_PRIMARYATTACK" 1
$sequence "shoot3" "shoot3" fps 30 { event 5001 0 "23" } rotate 90 activity "ACT_VM_PRIMARYATTACK" 1
2.Model runs in the game but has a bad arrangement
You can fix this by using the add file QC $ origin 0.0 0.0 0.0 ( 0.0 Tables of responsibility for moving the model to the left or right eg 2.0 model moves to the right by 2 and -2.0 left )
( The second value of the forward or reverse) ( third value up, down)
View of the eyes is keep more where origin Axis
3.Model in the game is all black
Make sure that the file names vtf are appropriate and are in folder as file QC
If it does not work Milkshape fire up and check the model by importing the UV map is in place .
If you were to have other problems , please write in comment.
In the same way , you can handle not only the models of weapons but any instance Items etc.
Prohibit copying GUIDANCE IN OTHER FORUMS, SITE WITHOUT MY PERMISSION !!!
Polish version:
https://amxx.pl/topic/156047-konwert...o/#entry728534