Welcome to PlagueFest.com! Log in or Sign up to interact with the Plague Fest community.
  1. Welcome Guest! to interact with the community and gain access to all the site's features.

Compiling Model [.mdl] from SMD

Discussion in Mapping Discussion started by EvIl_MoNkeY, Jun 21, 2011

  1. Feb 23, 2011
    Hi there this is directed to anyone and everyone that can help.

    I am trying to model a few props for Dirtbags minecraft map in 3DS Max. I followed the tutorial and the procedure in brief is :

    - Export the model as 4 smd files [modelname.smd, modelname_phys.smd, modelnaeme_idle.smd, modelname_anim.smd]
    I placed those files in <accountname>\sourcesdk_contents\cstrike\modelsrc\modelname

    - Place the texture files [modelname.vtf and modelname.vmt in the <accountname>\counterstrike source\materials\models\modelname folder.

    - compile the model with a .qc file using GUIStudioMDL. The .QC file is in the same folder as the 4 smds

    ^ I followed all that and got the modelname.mdl file but the problem is for some reason the assigned textures are missing. I can see the model in the model viewer as pink and black checkered boxes.

    Is there anyway to assign a material to a existing model? [Assign a vmt to a mdl :razz:]
  2. Feb 23, 2011
    My second problem.:

    Well I thought using some other smd compiler instead and got StudioCompiler 4a.

    This compiler does not need the .qc file. you have to drag and drop the smd files in the gui and it compiles it to mdl for you. (Thats what it says)

    This program just crashes everytime I try to set steamsdk and game folder paths for extraction. As soon as I select the folder for configuration, it crashes. If someone can try this out on their end, maybe something is wrong with my computer.

    I can provide you with the required smd files and vtf/vtm textures needed.

    Please someone help. [Chodda,Moon,Dirt,Ace,Yahoo.. anyone ?]
  3. Feb 23, 2011
    This is my .qc file
  4. Jun 11, 2011
    $cdmaterials "models\marioragdoll\Super Mario Galaxy\bowser\"
    // Model uses material "bowserKoopaBody.vmt"
    // Model uses material "bowserKoopaEyeBall.vmt"
    // Model uses material "bowserKoopaEyeLid.vmt"
    // Model uses material "bowserKoopaHair.vmt"
    // Model uses material "bowserKoopaLip.vmt"
    // Model uses material "bowserKoopaMouth.vmt"
    // Model uses material "bowserKoopaRing.vmt"
    // Model uses material "bowserKoopaShell.vmt"

    works for my textures.

    For your second problem try setting the paths to these locations.
  5. Feb 23, 2011

    So I need to add "//Model uses material db_mc_vendy.vmt" in my .qc file ?

    I am really new at this so pardon my noob questions.

    After I press configuration no matter what folder I select it crashes. I have already tried those folders that you said. I uninstalled , reinstalled in all sorts of folders, program files(default),sdk_contents,Sdk,ep1, even made a sp1 folder (nevermind, cant type the whole story why I made the sp1).

    Thanks, if you can think of anything else please let me know.

  6. May 15, 2011
    Actually I just thought. Could it be the .vmt and .vmf's themselves?

    I've had problems with those before.

    I made one but it still came out as pink in hammer.

    Are you using VTF Edit? That's what I tried but it still failed.
  7. Jun 11, 2011
    Im pretty sure you can only set up the vmt textures in the qc. You need to specify where the vmts are, and in my case it was $cdmaterials "models\marioragdoll\Super Mario Galaxy\bowser\"
  8. Oct 10, 2010
    should be like this:

    $cd "C:\Programme\MilkShape 3D 1.8.2\slow_stickman"
    $modelname "player/slow/stickman_blue/blau.mdl"
    $model "S-LoW" "blau.smd"
    $cdmaterials "models\player\slow\stickman\"
    $hboxset "cstrike"
    $hbox 3 "ValveBiped.Bip01_Pelvis" -8.299 -7.727 -5.429 8.299 2.007 6.583
    $hbox 6 "ValveBiped.Bip01_L_Thigh" 4.576 -5.377 -3.432 22.880 3.775 4.576
    $hbox 6 "ValveBiped.Bip01_L_Calf" -0.291 -4.295 -3.432 20.883 3.151 3.432
    $hbox 6 "ValveBiped.Bip01_L_Foot" -2.288 -1.144 -2.579 5.720 4.576 2.007
    $hbox 6 "ValveBiped.Bip01_L_Toe0" -2.860 -2.808 -2.860 4.004 1.196 1.716
    $hbox 7 "ValveBiped.Bip01_R_Thigh" 4.576 -5.377 -3.432 22.880 3.775 4.576
    $hbox 7 "ValveBiped.Bip01_R_Calf" -0.291 -4.295 -3.432 20.883 3.151 3.432
    $hbox 7 "ValveBiped.Bip01_R_Foot" -2.288 -1.144 -2.007 5.720 4.576 2.579
    $hbox 7 "ValveBiped.Bip01_R_Toe0" -2.860 -2.808 -1.716 4.004 1.196 2.860
    $hbox 3 "ValveBiped.Bip01_Spine1" -9.152 -1.258 -8.008 4.576 11.326 8.008
    $hbox 2 "ValveBiped.Bip01_Spine2" -3.068 -3.432 -9.693 13.572 10.317 9.693
    $hbox 1 "ValveBiped.Bip01_Neck1" -0.104 -4.576 -2.860 5.512 2.288 2.860
    $hbox 1 "ValveBiped.Bip01_Head1" -0.416 -6.240 -3.640 9.360 4.441 3.016
    $hbox 4 "ValveBiped.Bip01_L_UpperArm" -1.144 -2.579 -2.288 14.872 2.579 2.288
    $hbox 4 "ValveBiped.Bip01_L_Forearm" -1.716 -2.402 -2.402 13.156 2.402 2.402
    $hbox 4 "ValveBiped.Bip01_L_Hand" 0.291 -2.465 -1.716 6.583 1.550 2.860
    $hbox 5 "ValveBiped.Bip01_R_UpperArm" -1.144 -2.579 -2.288 14.872 2.579 2.288
    $hbox 5 "ValveBiped.Bip01_R_Forearm" -1.716 -2.402 -2.402 13.156 2.402 2.402
    $hbox 5 "ValveBiped.Bip01_R_Hand" 0.291 -2.465 -2.860 6.583 1.550 1.716
    // Model uses material "slow_strichmaennchen.vmt"
    // Model uses material "slow_strichmaennchen_gesicht.vmt"
    // Model uses material "slow_strichmaennchen_hinten.vmt"

    and for studio compiler,
    it no longer need steam to run
    you dont need setup SDK pathes

    and foe some reason when you hit "browse" it crash,
    so you need copy/paste the path in


    i suggest to decompile a similar model/prop,
    to get an example qc file
  9. May 15, 2011
    Tee Hee.

    We tried the studio compile so many times we gave up. :razz:

    Thanks. I don't think we'd have ever thought of that.

    And yes we are just trying to get the basic models. Vending Machine, Bookcase, sofa, and sofa chair. (and any others that may be suggested unless it's ridiculous.)

    Just we need them... Craftified.

    Monkey will probably understand this.

    What I was talking about was the raw .vmt/.vmf files themselves.

    I made a texture and put it through VTFEdit and whatnot but when I tried to use it in hammer it didn't show up. Just had a small pink/black checkerboard.

    So maybe we're using VTFEdit wrong?
  10. Oct 10, 2010
    just for the beginning and the simpleness,
    i suggest recommended using 360g


    all you need is drag and drop your textures in

    (alternative download: http://download.gc-gaming.de/bashor/mappingbase/software/360g.zip )
  11. May 15, 2011

    Downloaded it and tried to figure out what I was doing. :wacko:

    I think I'll give up and leave the rest to Monkey and stick to mapping.
  12. Oct 10, 2010

    it isnt even hard, all you need is drag n drop your image file o.O

    i think a Mapper should know how to add custom textures ...
    that was the first thing i learned long time ago

    you probably have wrong sizes,
    it has to be like this (in pixel)


    128 x 128, 64 x 512, 512 x 512, 32 x 512, 1024 x 1024 and so on
  13. May 15, 2011
    :huh: But where do I drop them in?

    All I see is a bunch of folders with names on them.

    What does the dropping of the dragging do?

    And which file do I put it in?

    And it's all so confusing! :weep:
  14. Oct 10, 2010
    first go to options and set your gamedir, like this

    C:\Steam\steamapps\name\counter-strike source\cstrike\materials\mytextures

    after this your vmt s and vtf s will be stored in "mytextures", you can call it like ever you want

    if you done with this, get any .bmp or .tga texture file,
    what fits the correctly sizes, and drag/drop it in the 360g window


    add me in steam
  15. May 15, 2011


    It works. :razz:

    Thank you!

    What's your Steam Name?
  16. Oct 10, 2010
    i do NOT even make public my steamname in this forum here
    other method is PM me yours and i add you
  17. May 15, 2011

    I guess I kind of jacked your post Monkey.

    Sorry. :sweat:

    Monkey still needs help.

    My question was something different.
  18. Feb 23, 2011
    Ok guys, a lot of posts have happened when I was not around. I think I will have to read all of it again.

    A lot of alcohol is still there in my system from last nights party, so dont mind my slowness. [IMG]
  19. Feb 23, 2011
    Sorry guys, no success yet.

    Moon > I have only one texture in the file. I have named it same as my model (db_mc_vendy.vmt and the vtf). They were 1024x1024.
    I remade the files using the program you suggested and placed them in the C:\Program Files (x86)\Steam\steamapps\my_steam_id\counter-strike source\cstrike\materials\models\db_mc_vendy folder.

    I added //Model uses material "db_mc_vendy.vmt" in the .qc file after
    $cdmaterials "C:\Program Files (x86)\Steam\steamapps\my_steam_id\counter-strike source/cstrike/materials/models/db_mc_vendy"

    I gave the whole path just the check if it works. Where am I going wrong ? This is driving me crazy. :frown:

    I also decompiled the compiled db_mc_vendy. Here is the .qc file for that.

    I can upload my smd files and the textures if any of you guys want to try it out.
  20. Oct 10, 2010
    you need setup your gamepathes like sthis:


    you have to copy/paste it, otherwise studiocompiler crash
    if you done, you dont need full path to materials in your qc

    also i found out decompile fails, it gives not a reference qc
    (there are a lot missing things in)