can't decompile CS:GO mdl properly

So i’m using Studiocompiler to decompile csgo’s v_pist_223.mdl and these are the files I end up with;

the files I used;

and the log and error I get when decompiling

Pretty sure i’m not getting all the files I need

Well shit it seems I had some of the correct decompiled files lying around, and I can’t remember what decompiler I used to get em

I tried decompiling the p2000 and got these; there’s clearly some animation related smds and one model.smd that is the elusive file I need
however with the USP it’s a different matter - I get these files

“UnknownModelName.smd” as well as two smd file that don’t seem to be animations but don’t have the “model” name suffix, also the .qc file is blank, when with the p2000 it wasn’t.

The gun itself and the suppressor are seperate smd files -

And the UnknownModelName.smd contains just the bones and no models

so how do I go about compiling these (if I do have the right files)? I’m guessing the USP is a little more complex due to the fact it has a suppressor
I’m assuming when I compile my gun model and suppressor would be in seperate files? How does the UnknownModelName.smd factor in? Any help would be greatly appreciated

It doesn’t, that’s just an erroneous file created because StudioCompiler doesn’t know what bodygroups are. Use Crowbar instead.

I was told Crowbar can’t handle CS:GO models - when I try I get empty “…_logs” and “…_anims” folders but I actually get a decent .qc file
So the suppressor is a bodygroup… I assume I should pop this into my compiling .qc file to make sure it compiles my suppressor properly as well?


$bodygroup "studio"
{
	studio "v_pist_223_v_pist_223.smd"
}
$bodygroup "silencer"
{
	studio "v_pist_223_silencer.smd"
	blank
}


Yes, but change


$bodygroup "studio"
{
	studio "v_pist_223_v_pist_223.smd"
}

to


$model studio v_pist_223_v_pist_223.smd

cool. I’ll try compiling a little later, I think I have everything I need

Progresssss

my specular map isn’t really showing up though… and the gun is supposed to be in the hands as well I guess

the vmt i’m using;



"VertexlitGeneric"
{
	"$basetexture" 				"models/weapons/TheRizzler/M1911A1/M1911_Diffuse"
	"$bumpmap" 				"models/weapons/TheRizzler/M1911A1/M1911_Normal"	
	"$halflambert" 				"1"	
	
	"$selfillum"				"1"
	"$nocull" 				"1"

	"$phong" 				"1"
	"$phongalbedoboost"			"11"
	"$phongboost" 				"0.15"
	"$normalmapalphaphongmask"	        "1"
	"$phongexponenttexture" 	        "models/weapons/TheRizzler/M1911A1/M1911_Specular"
	"$phongfresnelranges" 		        "[1 3 6]"
	"$phongalbedotint"			"1"
	
	"$normalmapalphaenvmapmask"	        "1"
	"$envmap"				"env_cubemap"
	"$envmaptint"				"[ 0.01 0.01 0.01 ]"
	"$envmapfresnel"			"1"
	"$envmapFresnelMinMaxExp" 	        "[0 5 .4]"
	
	"$rimlight" 				"1"
	"$rimlightexponent" 		        "33"	
	"$rimlightboost"			"0.2"
	"$rimmask" 			        "1"
	
}


and the .qc i’m using to compile;



$cd "D:\CURRENT WORK\3ds Max\Colt1911 compiling\compile"
$modelname "weapons\v_pist_223.mdl"
$model "studio" "v_pist_223.smd"

$bodygroup "silencer"
{
	studio "v_pist_223_silencer.smd"
	blank
}

$include "bonemerge.qci"
//$includemodel "weapons\m1911_anim.mdl" 
$cdmaterials "models\weapons\TheRizzler\M1911A1"

$surfaceprop "default"

$sequence idle "v_pist_223" fps 1


I’ve put my specular map into my normal map’s alpha channel but that didn’t seem to make a difference
any tips for getting the spec map to work/getting the animations working eventually? (I’ve been following Millenia’s porting tutorial, he said something about copying a renamed vanilla file’s animations or something but I didn’t really understand - that’s the commented out line)

Oh jeez, you have so much conflicting shit in your VMT.

Try a somewhat simpler version.


"VertexlitGeneric"
{
	"$basetexture" 				"models/weapons/TheRizzler/M1911A1/M1911_Diffuse"
	"$bumpmap" 				"models/weapons/TheRizzler/M1911A1/M1911_Normal"	

	"$phong" 				"1"
	"$phongboost" 				"0.15"
	"$phongexponent" 	        "3"
	"$phongfresnelranges" 		        "[1 3 6]"
	
}

I may be wrong, but that’s really all you need for guns.

haha yeah I was just throwing stuff in to see what it did to be honest
I went back and read up on each command to figure out the different applications etc. and I took out all the overbearing effects, now my specular wear actually shows up

rim lighting so sexy

vmt for interest



"VertexlitGeneric"
{
	"$basetexture" 			"models/weapons/TheRizzler/M1911A1/M1911_Diffuse"
	"$bumpmap" 			"models/weapons/TheRizzler/M1911A1/M1911_Normal"
	
	"$phong" 			"1"
	"$phongboost" 			"0.8"
	"$normalmapalphaphongmask"	"1"
	"$phongexponenttexture" 	"models/weapons/TheRizzler/M1911A1/M1911_exponent"
	"$phongfresnelranges" 		"[1 3 8]"

	"$phongdisablehalflambert" 	"1"
	
	"$envmapmask"			"models/weapons/TheRizzler/M1911A1/M1911_Specular"
	"$envmap"			"env_cubemap"
	"$envmaptint"			"[ 0.01 0.01 0.01 ]"
	
	"$rimlight" 			"1"
	"$rimlightexponent" 		"60"	
	"$rimlightboost"		"0.3"
	
	"$nocull" 			"1"	
	
}


now i’m looking into the offset gun issue. I followed the steps exactly as in this video and even redid everything and recompiled with exactly the same results so I have no idea what could be causing this

[editline]14:44[/editline]

I’ve noticed that the gun might not be offset at all, just in the exact same position that it is in the smd

I’m starting to think this might be an animation issue. How do I apply the default animations to my compiled model?

Its goddamn working
just had to use the right renamed .mdl file for the $includemodel command to work and moved some bones around in 3dsmax

-snipped- update below

Thanks to God of Pros and other friendly internet denizens for their help

Just saying, that seems a bit large for an M1911A1. It does look nice, though.

I Know, that’s what I said when I was helping him.

JEEZ FINE I resized it

https://dl.dropboxusercontent.com/u/38815438/Permalinks/M1911_ingame.webm

you’re right though, I’ve been staring at it for more than a week now so i’m not surprised i got the scale wrong

Much better.

I’m having this same issue getting animations to show up when decompiling the vanilla awp. Can someone explain how to properly write a .qc? Thank you.