need help. compiling a model for cs go.

i’m trying to compile a model i made for cs go. I am not an expert at all if you maybe know what i did wrong please explain what i need to do in detail. I made a model and am now trying to compile it with either guistudiomdl or studiocompiler. This is the text is spewts out:
C:/Program Files/Steam/SteamApps/common/SourceSDK/bin/ep1/bin/studiomdl.exe -game “C:\Program Files\Steam\SteamApps\common\Counter-Strike Global Offensive\bin” “C:\blender modeling\Source custom models\Test\compile\compile.qc” qdir: “c:\blender modeling\source custom models est\compile” gamedir: “C:\Program Files\Steam\SteamApps\common\Counter-Strike Global Offensive\bin” g_path: “compile” Working on “compile.qc” SMD MODEL test.smd SMD MODEL test_collision.smd Model has 1 convex sub-parts Collision model completed.

writing C:\Program Files\Steam\SteamApps\common\Counter-Strike Global Offensive\bin\models/test/test.mdl: bones 708 bytes (1) animations
116 bytes (1 anims) (1 frames) [0:00]
sequences 220 bytes (1 seq) ik/pose
164 bytes
eyeballs 0 bytes (0 eyeballs) flexes 0 bytes (0 flexes) textures 72 bytes keyvalues 0 bytes Collision model volume 9243.46 in^3 collision 0 bytes total 1460

writing C:\Program Files\Steam\SteamApps\common\Counter-Strike Global Offensive\bin\models/test/test.vvd: vertices
20736 bytes (432 vertices)
tangents 6912 bytes (432 vertices) total
27712 bytes

Generating optimized mesh “C:\Program Files\Steam\SteamApps\common\Counter-Strike Global Offensive\bin\models/test/test.sw.vtx”: body parts: 8 bytes models:
20 bytes
model LODs: 12 bytes meshes: 9 bytes strip groups: 25 bytes strips: 27 bytes verts: 3888 bytes indices:
1152 bytes
bone changes: 8 bytes everything: 5173 bytes

Generating optimized mesh “C:\Program Files\Steam\SteamApps\common\Counter-Strike Global Offensive\bin\models/test/test.dx80.vtx”: body parts: 8 bytes models: 20 bytes model LODs: 12 bytes meshes:
9 bytes
strip groups: 25 bytes strips: 27 bytes verts:
3888 bytes
indices: 1152 bytes bone changes: 16 bytes everything:
5181 bytes
Generating optimized mesh “C:\Program Files\Steam\SteamApps\common\Counter-Strike Global Offensive\bin\models/test/test.dx90.vtx”: body parts: 8 bytes models:
20 bytes
model LODs: 12 bytes meshes: 9 bytes strip groups: 25 bytes strips: 27 bytes verts: 3888 bytes indices:
1152 bytes
bone changes: 16 bytes everything: 5181 bytes

Generating optimized mesh “C:\Program Files\Steam\SteamApps\common\Counter-Strike Global Offensive\bin\models/test/test.xbox.vtx”: body parts: 8 bytes models: 20 bytes model LODs: 12 bytes meshes:
9 bytes
strip groups: 25 bytes strips: 27 bytes verts:
3888 bytes
indices: 1152 bytes bone changes: 16 bytes everything:
5181 bytes
Completed “compile.qc” … ier1\fileio.cpp (4002) : Assertion Failed: m_nNumRegisteredWriters == 0 Assert( Assertion Failed: m_nNumRegisteredWriters == 0 ):… ier1\fileio.cpp:4002
StudioMDL Thread complete
now if you look at almost all the way at the bottom, this shows up:
… ier1\fileio.cpp (4002) : Assertion Failed: m_nNumRegisteredWriters == 0 Assert( Assertion Failed: m_nNumRegisteredWriters == 0 ):… ier1\fileio.cpp:4002
in tutorials and such i don’t see this. So i think something is wrong. Even if it did work, should i be able to see the model in source sdk now instantly? because in that case it didn’t work, i can’t find the files there. what am i doing wrong? i will check this post frequently, please ask away at anything you need to know. Thanks for reading.

all i had to do was change the path to Steamapps/common/Counter-Strike Global Offensive/bin for the studiomdl.exe

[editline]12th March 2015[/editline]

UPDATE: now i can’t get the texture to show up :frowning: this is what is get now, again if there is anything you need to know please ask away.
C:/Program Files/Steam/SteamApps/common/Counter-Strike Global Offensive/bin/studiomdl.exe -game “C:\Program Files\Steam\SteamApps\common\Counter-Strike Global Offensive\bin” “C:\blender modeling\Source custom models\Test\compile\compile.qc” WARNING: AppFramework : Unable to load module p4lib.dll! qdir: “c:\blender modeling\source custom models est\compile” gamedir: “C:\Program Files\Steam\SteamApps\common\Counter-Strike Global Offensive\bin” g_path: “C:\blender modeling\Source custom models\Test\compile\compile.qc” Building binary model files… Working on “compile.qc” SMD MODEL test.smd SMD MODEL test_collision.smd Processing LOD for material: test_texture Model has 1 convex sub-parts Collision model completed.

writing C:\Program Files\Steam\SteamApps\common\Counter-Strike Global Offensive\bin\models/test/test.mdl: bones
964 bytes (1)
animation x y ips angle animations
112 bytes (1 anims) (1 frames) [0:00]
sequences 220 bytes (1 seq) ik/pose
164 bytes
eyeballs 0 bytes (0 eyeballs) flexes 0 bytes (0 flexes) textures 72 bytes keyvalues 0 bytes bone transforms
0 bytes bone flex driver 0 bytes Collision model volume 9243.46 in^3 collision
0 bytes
total 1732

writing C:\Program Files\Steam\SteamApps\common\Counter-Strike Global Offensive\bin\models/test/test.vvd: vertices 20736 bytes (432 vertices) tangents
6912 bytes (432 vertices)
total 27712 bytes

Generating optimized mesh “C:\Program Files\Steam\SteamApps\common\Counter-Strike Global Offensive\bin\models/test/test.dx90.vtx”: body parts: 8 bytes models: 20 bytes model LODs: 12 bytes meshes:
9 bytes
strip groups: 33 bytes strips: 35 bytes verts:
3888 bytes
indices: 1152 bytes bone changes: 16 bytes everything:
5197 bytes
Completed “compile.qc” CDynamicFunction: Loading library ‘Kernel32.dll’ (749D0000) CDynamicFunction: Lookup of ‘TryEnterCriticalSection’ in ‘Kernel32.dll’: 770332BC CDynamicFunction: Closing library ‘Kernel32.dll’ (749D0000)
StudioMDL Thread complete

okay,

getting the texture to load is a lot of bs to figure out.

FIRST you have the texture applied to the model.

Open up modelname.smd in wordpad or notepad++ and scroll down to triangles. You’ll see something like


triangles
frog_eye.dds
 29  -2.8266  -1.9683  70.4999  -0.7814   0.3263  -0.5319   0.0073   0.7630 2  5 0.034 29 0.966
 29  -2.3214  -2.9490  69.1562  -0.7814   0.3263  -0.5319   0.3774   0.5265 1 29 1.000
 29  -2.9609  -2.3413  70.4685  -0.7814   0.3263  -0.5319   0.0930   0.7658 2  5 0.034 29 0.966
frog_eye.dds
 29  -2.8266  -1.9683  70.4999  -0.7564   0.2206   0.6158   0.0073   0.7630 2  5 0.034 29 0.966
 29  -2.9609  -2.3413  70.4685  -0.7829   0.1681   0.5990   0.0930   0.7658 2  5 0.034 29 0.966
 29  -2.5748  -2.7335  71.0832  -0.8429   0.0135   0.5380   0.0850   0.9633 2  5 0.029 29 0.971
frog_eye.dds
 29   1.0152  -4.3970  70.0226   0.5428  -0.8191  -0.1858   0.1824   0.4168 2  5 0.032 29 0.968
 29   0.9519  -4.0493  68.4551   0.6274  -0.7084  -0.3231   0.1654   0.0511 1 29 1.000
 29   1.5208  -3.8656  69.1571   0.6520  -0.6257  -0.4281   0.3167   0.1312 1 29 1.000

your vmt MUST MUST be called whatever the texture in the smd is. In this case we’d have frog_eye.vmt (ignore the extension in the smd if there is one)

Secondly, in your qc, you’ll see $cdmaterials. This is where source searches for the vmt. WHATEVER CDMATERIALS SAYS, THE VMT MUST GO IN THERE so if we have


$cdmaterials "models\MGS4\frog\"

We’d stick our vmt in in “csgo/materials/models/mgs4/frog” (it auto-assumes the csgo/materials directory)

Thirdly, our vmt itself.


"VertexlitGeneric"
{
	"$basetexture" "models/MGS4/frog/frog_body01"
}

$basetexture tells the game where your vtf is (the imported texture) like cdmaterials, it autoassumes materials. However, it’s not looking for a directory, but a file. so we’d have csgo/materials/models/MGS4/frog/frog_body01.vtf in that directory.

Just went through every single step you listed, all looked good, and i even found one mistake in my vmt, and changed that.
But i still couldn’t get it to work, i have every file going to the correct texture, all the names are good.
I just don’t get it.
Here is my qc:
$modelname “test/test.mdl”
$cdmaterials “models/test”

$scale 1.0
$staticprop
$surfaceprop “metal”

$body “Body” “test.smd”

$sequence “idle” “test.smd” fps 30

$collisionmodel “test_collision.smd”
{

$mass 40

}
Here is my vmt:

“VertexLitGeneric”
{
“$basetexture” “models/props/test/test_texture”
“$surfaceprop” “metal”
“$model” 1
}
That one mistake i found was the direction of where it finds the basetexture.
I changed it as you can see now.
I just right clicked the file and did edit with notepad ++, is this ok? or should i do the steps with vtfedit again?

Also, i used this tutorial:

I did every step, but the texture doesn’t show up.

I’ve got all of my files in this folder that i made:
C:\blender modeling\Source custom models\Test
the textures are in there, aswell as in here:
C:\Program Files\Steam\SteamApps\common\Counter-Strike Global Offensive\csgo\materials\models est
I put them in both places.

  1. i have no idea what i’m doing, lol i find this all very confusing, so if you know what i did wrong please explain it to me step by step, as easy to follow as you can.
  2. Do you have any idea what is wrong with this?
  3. If there is anything else you need to know please tell me, i check back here every day.

Also thanks for the help so far, hopefully i can get this figured out.

Did you open the “test.smd” to see what texture was applied?

And is it the same name as your vmt?

I did check that, and it is called test_texture in the smd and it is also called test_texture in the vmt.

please let me know if you figure it out, steam name jptagman

i am in the same boat as you, my texture will not apply…

mine is a snowboard with texture…

i think it has to do with what texture file you select for sketchup2015, cuz csgo only reads 512, 1024 resolutions and so on and only dds and such file types… iduno really im only getting black texture on my prop and its not fun…

Make sure the texture itself is in .VTF format; although your .VMT seems to be set up properly, I’ve noticed that CS:GO (and Source games in general) tend to be extremely picky when it comes to a texture’s file format being anything but .VTF for the most part.

need help with sketchup and exporting to get the texture to work in csgo props…

ok what texture file type do you use when you are doing it in sketchup?

[editline]28th March 2015[/editline]

ok what texture file type do you use when you are doing it in sketchup?

[editline]28th March 2015[/editline]

PLEASE SOMEONE HELP, i will return a favor, im open to do teamviewer!!!

[editline]28th March 2015[/editline]

here is my output after using GUIstudioMDL

Loaded QC file - “F:\Steam\SteamApps\common\Counter-Strike Global Offensive\csgo\models\jptagman_props\antler.QC”

Created command line: “F:\Steam\SteamApps\common\Counter-Strike Global Offensive\bin\studiomdl.exe” -game “F:\Steam\steamapps\common\Counter-Strike Global Offensive\csgo” -nop4 -verbose -nox360 “F:\Steam\SteamApps\common\Counter-Strike Global Offensive\csgo\models\jptagman_props\antler.QC”

qdir: “f:\steam\steamapps\common\counter-strike global offensive\csgo\models\jptagman_props”
gamedir: “F:\Steam\steamapps\common\Counter-Strike Global Offensive\csgo”
g_path: “F:\Steam\SteamApps\common\Counter-Strike Global Offensive\csgo\models\jptagman_props\antler.QC”
Building binary model files…
Working on “antler.qc”
SMD MODEL antler.smd
Processing LOD for material: antler
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: Error with convex elements of antler.smd, building single convex!!!
Collision model completed.

writing F:\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\models/jptagman_props\antler.mdl:
bones 964 bytes (1)
animation x y ips angle
animations 112 bytes (1 anims) (1 frames) [0:00]
sequences 220 bytes (1 seq)
ik/pose 164 bytes
eyeballs 0 bytes (0 eyeballs)
flexes 0 bytes (0 flexes)
textures 72 bytes
keyvalues 0 bytes
bone transforms 0 bytes
bone flex driver 0 bytes
collision 0 bytes
total 1744

writing F:\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\models/jptagman_props\antler.vvd:
vertices 288 bytes (6 vertices)
tangents 96 bytes (6 vertices)
total 448 bytes

Generating optimized mesh “F:\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\models/jptagman_props\antler.dx90.vtx”:
body parts: 8 bytes
models: 20 bytes
model LODs: 12 bytes
meshes: 9 bytes
strip groups: 33 bytes
strips: 35 bytes
verts: 54 bytes
indices: 24 bytes
bone changes: 16 bytes
everything: 235 bytes

Completed “antler.qc”
CDynamicFunction: Loading library ‘Kernel32.dll’ (75640000)
CDynamicFunction: Lookup of ‘TryEnterCriticalSection’ in ‘Kernel32.dll’: 77C1C5F0
CDynamicFunction: Closing library ‘Kernel32.dll’ (75640000)

I don’t use Sketchup, so I don’t know what file formats it accepts for textures for that particular program. However, the texture formats that are required by the game itself are .VMT and .VTF (.VMT acts a sort of library that’s meant to be used by the model/specific segments of the model to designate what is applied to that part of the model, and the .VTF for the actual texture files read by the .VMT). If you have a .VMT looking for anything else that isn’t in .VTF format, it generally won’t load properly (if at all) when the game goes to load the textures for the model. That’s all I was trying to point out. If the model itself is still having problems with the textures after exporting, then it may be a problem with the model itself. In that case, you may want to consider using a different program (like 3DS Max, which you can sign up for a free student copy if you don’t want to buy it) to see if you can’t figure out the source of the problem.