A bit of help needed to compile a model :?

Hello!

I downloaded the the hunk model from here: http://forum.facepunch.com/showthread.php?t=1173095

Wanting to make this model into a gmod player model I managed to make it from OBJ to SMD and here is my qc:



$cd "C:\models"
$modelname "hunk.mdl"
$model "hunk" "hunk.smd"
$cdmaterials "\"
$cdmaterials "\"
$hboxset "default"
$hbox 0 "ValveBiped.Bip01_Pelvis" -8.526 -3.674 -7.835 8.689 3.345 5.069
$hbox 0 "ValveBiped.Bip01_Spine2" -9.667 -5.189 -9.768 14.274 9.076 9.017
$hbox 0 "ValveBiped.Bip01_Head1" -1.487 -4.873 -2.572 6.962 4.756 4.331
$hbox 0 "ValveBiped.Bip01_R_UpperArm" 0.000 -2.897 -3.767 8.838 2.714 2.479
$hbox 0 "ValveBiped.Bip01_R_Forearm" 0.000 -2.031 -3.646 11.777 3.691 1.489
$hbox 0 "ValveBiped.Bip01_R_Hand" 0.000 -2.411 -3.696 8.313 2.129 1.390
$hbox 0 "ValveBiped.Bip01_L_UpperArm" 0.000 -2.321 -3.947 9.976 4.562 2.497
$hbox 0 "ValveBiped.Bip01_L_Forearm" 0.000 -1.557 -0.393 11.482 3.871 4.720
$hbox 0 "ValveBiped.Bip01_L_Hand" -0.840 -1.712 -2.681 6.874 4.196 2.333
$hbox 0 "ValveBiped.Bip01_R_Thigh" 0.000 -6.280 -6.143 17.881 5.568 3.913
$hbox 0 "ValveBiped.Bip01_R_Calf" 0.000 -5.281 -4.109 16.525 3.114 3.820
$hbox 0 "ValveBiped.Bip01_R_Foot" 0.000 -2.913 -1.667 12.788 6.178 2.731
$hbox 0 "ValveBiped.Bip01_L_Thigh" 0.000 -6.283 -3.816 17.940 5.565 6.142
$hbox 0 "ValveBiped.Bip01_L_Calf" 0.000 -5.286 -3.820 16.525 3.109 4.109
$hbox 0 "ValveBiped.Bip01_L_Foot" 0.000 -2.865 -2.553 12.828 6.211 1.822
// Model uses material "default.vmt"
// Model uses material "em3904.vmt"
// Model uses material "em3925.vmt"
// Model uses material "em3901.vmt"
// Model uses material "wep20_k.vmt"
// Model uses material "wep19_k.vmt"
// Model uses material "em3906.vmt"
// Model uses material "em3902.vmt"
// Model uses material "pl0005.vmt"
$attachment "eyes" "ValveBiped.Bip01_Head1" 3.79 -3.78 0.01 rotate 0.00 -80.10 -90.00
$attachment "mouth" "ValveBiped.Bip01_Head1" 1.00 -5.70 -0.00 rotate -0.00 -80.00 -90.00
$attachment "chest" "ValveBiped.Bip01_Spine2" 5.00 4.00 0.00 rotate 0.00 90.00 90.00
$attachment "forward" "ValveBiped.forward" -0.00 0.00 -0.00 rotate -0.00 -0.00 -0.00
$attachment "anim_attachment_RH" "ValveBiped.Anim_Attachment_RH" -0.00 -0.00 -0.00 rotate -90.00 -90.00 0.00
$attachment "anim_attachment_LH" "ValveBiped.Anim_Attachment_LH" -0.00 0.00 0.00 rotate -90.00 -90.00 0.00
$attachment "anim_attachment_head" "ValveBiped.Bip01_Head1" 0.00 0.00 0.00 rotate -90.00 -90.00 0.00
$includemodel "m_anm.mdl"
$includemodel "m_gst.mdl"
$includemodel "m_pst.mdl"
$includemodel "m_shd.mdl"
$includemodel "m_ss.mdl"
$surfaceprop "flesh"
$eyeposition -0.000 0.000 70.000
$illumposition -0.000 0.637 36.119
$sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 30.00
$ikchain rhand ValveBiped.Bip01_R_Hand knee 0.707 0.707 0.000
$ikchain lhand ValveBiped.Bip01_L_Hand knee 0.707 0.707 0.000
$ikchain rfoot ValveBiped.Bip01_R_Foot knee 0.707 -0.707 0.000
$ikchain lfoot ValveBiped.Bip01_L_Foot knee 0.707 -0.707 0.000
$collisionjoints "phymodel.smd" {

$mass 90.0
$inertia 10.00
$damping 0.01
$rotdamping 1.50
$rootbone "valvebiped"

$jointconstrain "valvebiped.bip01_l_thigh" x limit -1.00 12.00 0.00
$jointconstrain "valvebiped.bip01_l_thigh" y limit -44.00 3.00 0.00
$jointconstrain "valvebiped.bip01_l_thigh" z limit -68.00 66.00 0.00

$jointconstrain "valvebiped.bip01_l_calf" x limit -6.00 6.00 0.00
$jointconstrain "valvebiped.bip01_l_calf" y limit -3.00 1.00 0.00
$jointconstrain "valvebiped.bip01_l_calf" z limit -3.00 95.00 0.20

$jointconstrain "valvebiped.bip01_r_thigh" x limit -1.00 12.00 0.00
$jointconstrain "valvebiped.bip01_r_thigh" y limit -8.00 32.00 0.00
$jointconstrain "valvebiped.bip01_r_thigh" z limit -75.00 61.00 0.00

$jointconstrain "valvebiped.bip01_r_calf" x limit 0.00 0.00 0.00
$jointconstrain "valvebiped.bip01_r_calf" y limit 0.00 0.00 0.00
$jointconstrain "valvebiped.bip01_r_calf" z limit -8.00 97.00 0.20

$jointconstrain "valvebiped.bip01_r_foot" x limit -17.00 19.00 0.00
$jointconstrain "valvebiped.bip01_r_foot" y limit -25.00 19.00 0.00
$jointconstrain "valvebiped.bip01_r_foot" z limit -15.00 35.00 0.00

$jointconstrain "valvebiped.bip01_spine2" x limit -1.00 8.00 0.00
$jointconstrain "valvebiped.bip01_spine2" y limit -1.00 6.00 0.00
$jointconstrain "valvebiped.bip01_spine2" z limit -1.00 3.00 0.00

$jointconstrain "valvebiped.bip01_l_upperarm" x limit -59.00 46.00 0.00
$jointconstrain "valvebiped.bip01_l_upperarm" y limit -70.00 59.00 0.00
$jointconstrain "valvebiped.bip01_l_upperarm" z limit -120.00 35.00 0.00

$jointconstrain "valvebiped.bip01_l_forearm" x limit -15.00 23.00 0.00
$jointconstrain "valvebiped.bip01_l_forearm" y limit -21.00 21.00 0.00
$jointconstrain "valvebiped.bip01_l_forearm" z limit -124.00 3.00 0.00

$jointconstrain "valvebiped.bip01_r_upperarm" x limit -41.00 48.00 0.00
$jointconstrain "valvebiped.bip01_r_upperarm" y limit -77.00 48.00 0.00
$jointconstrain "valvebiped.bip01_r_upperarm" z limit -57.00 142.00 0.00

$jointconstrain "valvebiped.bip01_r_forearm" x limit -55.00 32.00 0.00
$jointconstrain "valvebiped.bip01_r_forearm" y limit -15.00 19.00 0.00
$jointconstrain "valvebiped.bip01_r_forearm" z limit -149.00 6.00 0.00

$jointconstrain "valvebiped.bip01_r_hand" x limit -64.00 124.00 0.00
$jointconstrain "valvebiped.bip01_r_hand" y limit -48.00 53.00 0.00
$jointconstrain "valvebiped.bip01_r_hand" z limit -37.00 50.00 0.00

$jointconstrain "valvebiped.bip01_head1" x limit -30.00 50.00 0.00
$jointconstrain "valvebiped.bip01_head1" y limit -24.00 21.00 0.00
$jointconstrain "valvebiped.bip01_head1" z limit -26.00 21.00 0.00

$jointconstrain "valvebiped.bip01_l_hand" x limit -35.00 30.00 0.00
$jointconstrain "valvebiped.bip01_l_hand" y limit -64.00 93.00 0.00
$jointconstrain "valvebiped.bip01_l_hand" z limit -66.00 15.00 0.00

$jointconstrain "valvebiped.bip01_l_foot" x limit -21.00 8.00 0.00
$jointconstrain "valvebiped.bip01_l_foot" y limit -19.00 19.00 0.00
$jointconstrain "valvebiped.bip01_l_foot" z limit -15.00 35.00 0.00
} 

So everytime i use the the GUIstudio to compile it i have this error:

Added game config - “Garry’s Mod”

Loaded QC file - “C:\Users\Gabonza\Desktop\hunk smd\hunk.qc”

Created command line: “C:\Program Files (x86)\Steam\steamapps relostragos\sourcesdk\bin\orangebox\bin\studiomdl.exe” -game “C:\Program Files (x86)\Steam\steamapps relostragos\garrysmod\garrysmod” -nop4 -nox360 “C:\Users\Gabonza\Desktop\hunk smd\hunk.qc”

qdir: “c:\users\gabonza\desktop\hunk smd”
gamedir: “C:\Program Files (x86)\Steam\steamapps relostragos\garrysmod\garrysmod”
g_path: “C:\Users\Gabonza\Desktop\hunk smd\hunk.qc”
Building binary model files…
Working on “hunk.qc”
ERROR: c:\users\gabonza\desktop\hunk smd\hunk.qc(1): - bad command $

My gameconfig is set to gmod and SDK version to orange box, so i guess i made something wrong in the qc,but i am not exactly sure what O.o

Thank you for your time reading this post :slight_smile:

Could you please put your qC in code tags

Also from the compile log the error is on the first line. My guess is that you $cd folder points wrongly, thouh not sure atm

Ehhmmm sorry but what exactly are code tags? english is not my native so, sorry if its a stupid question :S just tell me how to do it and i will. You mean to upload the qc with the numbers by the side?

Also could u pls explain me better the first 3 lines?


They mean setting it up like this.

Just type [.code]your .qc file’s contents[./code] (minus the .'s, of course).

As for the first line in your .qc (the $cd “C:/Models/” bit), you need to make sure that the .qc is actually pointing to the proper directory. Unless you have the files for the model in that exact location, your compiler will be looking for ghost files that it can’t load.

Thnx :slight_smile: so, does anybody know what i am doing wrong?

I’ve taken a quick look (yay for fixing computer more or less) and I don’t have any issue running the basic QC itself.

But looking at your compile log, I strongly assume you have a weird setup in your compiler itself.



qdir: "c:\users\gabonza\desktop\hunk smd\"


and



$cd "C:\models"


Both paths should essentially be the same.

I’m assuming you’re using the GUI compiler correct?

Instead try using the non guy compiler instead. Make a batch file that has this



"C:\Program Files (x86)/Steam/steamapps/trelostragos/sourcesdk/bin/orangebox/bin/studiomdl.exe" %1
pause


Put it anywhere really and then drag and drop your QC on top of that.

I am almost certain you will still get an error, but the upcoming error will probably be



ERROR: C:\Users\Gabonza\Desktop\hunk smd\hunk.qc(3): - could not load file 'C:\models/hunk.smd'
ERROR: Aborted Processing on 'hunk.mdl'


But that will mean the QC itself already works as intended. It will just mean it cannot find the SMD’s in questions since you probably have them in different folders.

There’s still a bunch of small issues in the qc itself to be honest. But those shouldn’t pose a problem.

(Just for reference the issues I see - $cdmaterials pointing at root. rootbone being valvebiped as opposed to ValveBiped.Bip01_Pelvis, listed hitboxsets)

Both those things are minor.

Woah this is so mind f*cking, yes i am using the GUIstudio compiler. Could you pls explain to me what exactly i must put in the $cd and qdir lines?

You only need to change the $cd line. Make sure that you have your .qc in the same location as the files you are working with. After that, make sure that the $cd line matches the same directory as your files. For example, let’s say you have a folder named “slappy” where your files are at and it’s on the desktop. Your $cd line should resemble the following in order for the compiler to find the files and compile them properly:


$cd "C:\users\your Windows account\desktop\slappy\"

Honestly, I’d personally ditch the GUI compiler completely. Been my experience that running it over the commandline and batch files is just faster. And less painfull

Ok so my qc file along with my smd file are at: C:\Users\Gabonza\Desktop\hunk smd
So i changed my qc to


$cd "C:\users\gabonza\desktop\hunk smd\"

Compiled again, still same error… I really dont understand what i am doing wrong wrong, btw guys i really appreciate your help, thnx a lot for helping me with this

[editline]29th October 2012[/editline]

So which compiler whould you recommend me using? I already tried the cannonfodder’s studio compiler at first, but for some unknown reason it always crashes and closes for no reason so i moved to GUI hoping it will be ok, i had no problems so far, except the missing gameconfig.txt file from ep1 which i really have no idea why its not there, so i used gmod’s gameconfig and the orange box SDK version

StudioMDL in the sourcesdk/bin/orangebox/bin folder. Use the batch file I told you to use before.

Also you need to run the SDK before hand.

Yay! i made a batch file, i had no idea what it was but google is my best friend. Unfortunately i got the same error as GUIstudio

http://s7.postimage.org/eg2jppo6h/prob.jpg

When i press any key it just closes

Quick weird question which shouldn’t matter - is your computer setting set to english? in the locale. Only thing right now I can think about is that it’s expecting something else or somesuch.

Everything is in english although if i go to control panel/ region and language the format is in Greek, dunno if that matters but i use english for example if i right click at desktop its english, Greek windows are really confusing sometimes :))

Okay could you try setting the greek part to english. Preferably US american. It’s possible that it’s loading a weird ascii code or something.

Let me post you a random QC, see if when you try to compile that you get soemthing else.



$cd "H:\My scribbles\!3d_projects\cat\smaller"
$modelname "stalker\cat.mdl"
$model "Cat" "cat_reference" {
        mouth 0 "mouth" "bip01_head" 0 1 0     // mouth illumination

        eyeball righteye "Bip01_Head" -1.013 -12.201 14.256 "eyeball_r" 1.00 12 "pupil_r" 0.63
        eyeball lefteye "Bip01_Head" 1.013 -12.201 14.256 "eyeball_l" 1.00 -12 "pupil_l" 0.63


        flexfile "cat_flex.vta" {
        flex "R_ear" frame 2
        flex "L_ear" frame 3
        flex "Mouth" frame 1
        flex "R_cheek" frame 4
        flex "L_cheek" frame 5
        flex "blank" frame 0
        
        
    }
        flexcontroller "phoneme" "mouth" "range" 0 1
        flexcontroller "phoneme" "R_ear" "range" 0 1
        flexcontroller "phoneme" "L_ear" "range" 0 1
        flexcontroller "phoneme" "R_cheek" "range" 0 1
        flexcontroller "phoneme" "L_Cheek" "range" 0 1
        flexcontroller "phoneme" "blank" "range" 0 1
        %mouth = mouth
        %r_Ear = r_ear
        %l_ear = l_ear
        %r_cheek = r_cheek
        %l_cheek = l_cheek
        %blank = blank
    
    


}
$cdmaterials "models\stalker\cat"


// Model uses material "eyeball_l.vmt"
// Model uses material "fmouth.vmt"
// Model uses material "kanisha_cylmap.vmt"
// Model uses material "citizen_sheet.vmt"
// Model uses material "eyeball_r.vmt"
// Model uses material "pupil_r.vmt"
// Model uses material "glint.vmt"
// Model uses material "pupil_l.vmt"
$attachment "eyes" "Bip01_Head" 0 -12.201 14.256 absolute
$attachment "mouth" "Bip01_Head" 0.80 -5.80 -0.15 rotate 0 -80 -90


$surfaceprop "flesh"
$eyeposition 0.000 0.000 70.000
$illumposition 1.165 -0.000 34.294
$sequence ragdoll "cat_reference" ACT_DIERAGDOLL 1 fps 30.00

$collisionjoints "phymodel.smd" {


    $mass 90.0
    $inertia 10.00
    $damping 0.01
    $rotdamping 1.50
    $rootbone "valvebiped.bip01_r_hand"
    $noselfcollision
    $jointconstrain "bip01_spine1" x limit -70.00 70.00 0.00
    $jointconstrain "bip01_spine1" y limit -59.00 59.00 0.00
    $jointconstrain "bip01_spine1" z limit -65.00 95.00 0.00

    $jointconstrain "bip01_r_upperarm" x limit -40.00 40.00 0.00
    $jointconstrain "bip01_r_upperarm" y limit -61.00 61.00 0.00
    $jointconstrain "bip01_r_upperarm" z limit -75.00 75.00 0.00

    $jointconstrain "bip01_l_upperarm" x limit -40.00 40.00 0.00
    $jointconstrain "bip01_l_upperarm" y limit -50.00 50.00 0.00
    $jointconstrain "bip01_l_upperarm" z limit -59.00 59.00 0.00

    $jointconstrain "bip01_l_forearm" x limit -12.00 12.00 0.00
    $jointconstrain "bip01_l_forearm" y limit -21.00 21.00 0.00
    $jointconstrain "bip01_l_forearm" z limit -6.00 86.00 0.00

    $jointconstrain "bip01_l_hand" x limit -60.00 60.00 0.00
    $jointconstrain "bip01_l_hand" y limit -60.00 60.00 0.00
    $jointconstrain "bip01_l_hand" z limit -70.00 70.00 0.00

    $jointconstrain "bip01_r_forearm" x limit -30.00 30.00 0.00
    $jointconstrain "bip01_r_forearm" y limit -3.00 3.00 0.00
    $jointconstrain "bip01_r_forearm" z limit -6.00 97.00 0.00

    $jointconstrain "bip01_r_hand" x limit -60.00 60.00 0.00
    $jointconstrain "bip01_r_hand" y limit -60.00 60.00 0.00
    $jointconstrain "bip01_r_hand" z limit -70.00 70.00 0.00

    $jointconstrain "bip01_r_thigh" x limit -50.00 50.00 0.00
    $jointconstrain "bip01_r_thigh" y limit -90.00 55.00 0.00
    $jointconstrain "bip01_r_thigh" z limit -46.00 46.00 0.00

    $jointconstrain "bip01_r_calf" x limit -30.00 30.00 0.00
    $jointconstrain "bip01_r_calf" y limit -12.00 12.00 0.00
    $jointconstrain "bip01_r_calf" z limit -102.00 8.00 0.00

    $jointconstrain "bip01_r_foot" x limit -40.00 40.00 0.00
    $jointconstrain "bip01_r_foot" y limit -40.00 40.00 0.00
    $jointconstrain "bip01_r_foot" z limit -55.00 35.00 0.00

    $jointconstrain "bip01_r_toe0" x limit 0.00 0.00 0.00
    $jointconstrain "bip01_r_toe0" y limit 0.00 0.00 0.00
    $jointconstrain "bip01_r_toe0" z limit -46.00 46.00 0.00

    $jointconstrain "bip01_l_thigh" x limit -40.00 40.00 0.00
    $jointconstrain "bip01_l_thigh" y limit -55.00 53.00 0.00
    $jointconstrain "bip01_l_thigh" z limit -59.00 50.00 0.00

    $jointconstrain "bip01_l_calf" x limit -30.00 30.00 0.00
    $jointconstrain "bip01_l_calf" y limit -12.00 12.00 0.00
    $jointconstrain "bip01_l_calf" z limit -12.00 145.00 0.00

    $jointconstrain "bip01_l_foot" x limit -40.00 40.00 0.00
    $jointconstrain "bip01_l_foot" y limit -40.00 40.00 0.00
    $jointconstrain "bip01_l_foot" z limit -55.00 35.00 0.00

    $jointconstrain "bip01_l_toe0" x limit 0.00 0.00 0.00
    $jointconstrain "bip01_l_toe0" y limit 0.00 0.00 0.00
    $jointconstrain "bip01_l_toe0" z limit -46.00 46.00 0.00

    $jointconstrain "bip01_head" x limit -55.00 55.00 0.00
    $jointconstrain "bip01_head" y limit -75.00 75.00 0.00
    $jointconstrain "bip01_head" z limit -93.00 93.00 0.00
}



Did as you said, still got the same error, i really dont know what is going wrong.

Yeah I’m starting to feel it might be a system issue.

One last thing - zip up your QC and post it. I’ll take a look if it’s maybe an encoding thing. Shouldn’t though.

EDIT

http://forum.facepunch.com/showthread.php?t=997474&p=24638623&viewfull=1#post24638623

Try looking here - it just might an encoding issue with your QC’s. You’re probably saving them as UTF-8 osomething else

Also in case that doesn’t work - do take a look at what the system locale for non-unicode programs is. It should probably be something central or western european. Greek might create some issues in places.

https://dl.dropbox.com/u/6252145/system_local.png

here is the download link, its the qc with the smd file :slight_smile:

I did as you told me to change the language and now its gives me a different error that the program cant start because tier0.dll is missing, i will reinstall source sdk and try again

P.S. i never believed this thing would be such a pain in the ass O.o

Ok i got the same error again after all

Try looking at other source games if there’s a tier0.dll somewhere. If it is just copypaste it around. I think that helped me at one time.

Well the funny thing is tier0.dll is already in my source sdk bin folder