Custom Model Compiling

Discussion in 'Mapping Questions & Discussion' started by PC's_Frank, Feb 20, 2015.

  1. PC's_Frank

    PC's_Frank L4: Comfortable Member

    Messages:
    179
    Positive Ratings:
    26
    Well, I finally got my custom model to be exported from Blender as an smd, thank you to everyone who helped me. The problem now, is that I can't get GUIStudioMDL to compile it as an MDL file for use as a prop. I've consulted guides from the valve development wiki and elsewhere. I know I'm doing something wrong, but I just can't for the life of me figure out what. I hat to make another post like this, I realize it is annoying, and I am sorry, but I was hoping someone knows what I'm doing wrong. This is the prop I made as an smd in Blender.

    [​IMG]

    It's really just a props_sytech rocket_top 2 that I decompiled, lowered the top of, and then carved a hole in the middle.
    The following is the qc file
    $modelname "props_spytech\siege_rocket5.mdl"

    $staticprop

    $bodygroup "Body"
    {
    studio "rocket002_top_reference.smd"
    }


    $cdmaterials "models\props_spytech\"

    $texturegroup "skinfamilies"
    {
    {
    "rocket002.vmt"
    }
    {
    "rocket002b.vmt"
    }
    }

    $surfaceprop "metal"

    $contents "solid"


    // NOTE: The following commented-out $definebone lines might be needed, as is often the case for view models. When needed, simply remove the two slashes '//' from the start of each line.
    // $definebone "static_prop" "" 0 0 0 0 0 0 0 0 0 0 0 0




    $sequence "idle" "rocket002_top_anims\idle.smd" {
    fps 30
    }

    $collisionmodel "rocket002_top_physics.smd"
    {
    $mass 80
    $inertia 1
    $damping 0
    $rotdamping 0
    $concave

    }
    Here’s the folder it’s all being kept in.
    [​IMG]
    The message the GUIstudioMDL gives me after I try to use the qc file in it
    GUIStudioMDL 2.2/Source - © 2007 Neil 'Jed' Jedrzejewski - http://www.wunderboy.org/

    *ERROR* EP1 tools path is not valid - use "Config" then "Set EP1 Tools Path..." from the menu to set it.
    Loaded QC file - "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\materials\models\props_siege\siege_rocket5.qc.txt"

    Created command line: "C:\Program Files (x86)\Steam\steamapps\cmeinert\sourcesdk\bin\orangebox\bin\studiomdl.exe" -game "c:\program files (x86)\steam\steamapps\cmeinert\team fortress 2\tf" -nop4 -nox360 "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\materials\models\props_siege\siege_rocket5.qc.txt"

    WARNING: Unable to find gameinfo.txt. Solutions:

    1. Read http://www.valve-erc.com/srcsdk/faq.html#NoGameDir
    2. Run vconfig to specify which game you're working on.
    3. Add -game <path> on the command line where <path> is the directory that gameinfo.txt is in.

    Unable to find gameinfo.txt. Solutions:

    1. Read http://www.valve-erc.com/srcsdk/faq.html#NoGameDir
    2. Run vconfig to specify which game you're working on.
    3. Add -game <path> on the command line where <path> is the directory that gameinfo.txt is in.
    I’ve followed all of these suggestions, but I still am not sure what is wrong.
     
  2. Tumbolisu

    aa Tumbolisu  I ⌄ I 

    Messages:
    937
    Positive Ratings:
    905
    I don't know a lot about this, but I know that everyone uses a programm called Crowbar for this kind of thing.
     
    • Thanks Thanks x 1
  3. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,365
    There's quite a lot of errors in that .qc, but I've fixed up as much of it as I could here. The stuff I removed from $collisionmodel was bloat - it'll never be used since you're compiling with $staticprop. Here's some things only you can fix/explain:

    1. What is your collision mesh called? In the .qc you reference rocket002_top_physics.smd, but I'm assuming that's the original model's CM and that it doesn't account for the hole you made in the rocket; if you haven't changed the decompiled collision mesh, you'll need to do that (most likely by making your own from scratch, since you want a hollow tube).

    2. Your source materials folder is props_siege, but the .qc references props_spytech; I suggest you rename the folder to props_spytech and work entirely within that folder so you don't have two different folders in the .qc.

    As for the gameinfo.txt errors, the only thing I can recommend is to tell Windows to open .qc files with team fortress 2/bin/studiomdl.exe; that way you can just doubleclick the files and they'll automatically get compiled. I don't use GUIStudiomdl so I can't really help you out with that. I can, however, suggest Wallworm Model Tools since that seems to be the best-documented (and best all-around) method of modelling for Source; I think Aly uses it but I'm not sure.
     
    • Thanks Thanks x 1
  4. PC's_Frank

    PC's_Frank L4: Comfortable Member

    Messages:
    179
    Positive Ratings:
    26
    Thank you so much! I figured something was wrong with the qc file, but I couldn't figure out what. Thank You!
     
  5. PC's_Frank

    PC's_Frank L4: Comfortable Member

    Messages:
    179
    Positive Ratings:
    26
    Good news, the above mentioned errors have been fixed. Bad news is that I'm getting a new one. It has something to do with the GUIStudioMDL not being able to read the qc file. I have a few ideas about what might be wrong. Still working on it. I'll make a post as soon as I fix this.

    GUIStudioMDL 2.2/Source - © 2007 Neil 'Jed' Jedrzejewski - http://www.wunderboy.org/

    Loaded QC file - "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\models\props_siege\siege_rocket5.qc.txt"

    Created command line: "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\bin\studiomdl.exe" -game "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf" -notxbox "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\models\props_siege\siege_rocket5.qc.txt"

    WARNING: AppFramework : Unable to load module p4lib.dll!
    qdir: "c:\program files (x86)\steam\steamapps\common\team fortress 2\tf\models\props_spytech\"
    gamedir: "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\"
    g_path: "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\models\props_spytech\siege_rocket5.qc.txt"
    Building binary model files...
    Working on "siege_rocket5.qc"
    Error opening c:\program files (x86)\steam\steamapps\common\team fortress 2\tf\models\props_spytech\siege_rocket5.qc
     
    Last edited: Feb 22, 2015
  6. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,365
    Code:
    g_path: "C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\models\props_spytech\siege_rocket5.qc.txt"
    Is your .qc actually a .txt? (remove the .txt extension, that might do something)
     
    • Thanks Thanks x 1
  7. PC's_Frank

    PC's_Frank L4: Comfortable Member

    Messages:
    179
    Positive Ratings:
    26
    You were right it was a text. Thank you for that. Good new is, that fixed it and the model is compiled. Bad news is that the model has no texture, I messed up the collision mesh, placing it in the map increases compile time, and for some reason the model's very presence on the map seems to deactivate soundscapes.
     
  8. PC's_Frank

    PC's_Frank L4: Comfortable Member

    Messages:
    179
    Positive Ratings:
    26
    Good news. I'm 90 percent sure the soundscapes an compile times were caused by a leak. Still investigating the other problems.
     
  9. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,365
    If you open the console ingame (after loading a map with the model), you might see a message about a missing material/texture; that's the easiest way to tell if the game can't find the .vtf or .vmt (if you post stuff from the console, please use
    Code:
    [/ code] tags).
     
    • Thanks Thanks x 1
  10. PC's_Frank

    PC's_Frank L4: Comfortable Member

    Messages:
    179
    Positive Ratings:
    26
    Alright, I'll look into that when I come home tonight.
     
  11. PC's_Frank

    PC's_Frank L4: Comfortable Member

    Messages:
    179
    Positive Ratings:
    26
    I just checked it. I'm afraid that error message doesn't show up. The only "missing texture" messages reference the skybox. Sorry this post took so long, I've been busy with classes. Anyway, here's everything it said.

    props_urban/urban_window003.mdl)
    Using map cycle file 'cfg/mapcycle_default.txt'. ('cfg/mapcycle.txt' was not found.)
    Set motd from file 'cfg/motd_default.txt'. ('cfg/motd.txt' was not found.)
    Set motd_text from file 'cfg/motd_text_default.txt'. ('cfg/motd_text.txt' was not found.)
    info_observer_point (observer_3) couldn't find associated team entity named 'cap_4'
    info_observer_point (observer_3) couldn't find associated team entity named 'cap_4'
    info_observer_point (observer_3) couldn't find associated team entity named 'cap_4'
    info_observer_point (observer_3) couldn't find associated team entity named 'cap_4'
    'listenserver.cfg' not present; not executing.
    'pl_siege_b2.cfg' not present; not executing.

    Team Fortress
    Map: pl_siege_b2
    Players: 1 / 24
    Build: 2633354
    Server Number: 1

    The server is using sv_pure 0. (Enforcing consistency for select files only)
    Requesting texture value from var "$basetexture" which is not a texture value (material: skybox/sky_hydro_01rt)
    Requesting texture value from var "$basetexture" which is not a texture value (material: skybox/sky_hydro_01bk)
    Requesting texture value from var "$basetexture" which is not a texture value (material: skybox/sky_hydro_01lf)
    Requesting texture value from var "$basetexture" which is not a texture value (material: skybox/sky_hydro_01ft)
    Requesting texture value from var "$basetexture" which is not a texture value (material: skybox/sky_hydro_01up)
    Requesting texture value from var "$basetexture" which is not a texture value (material: skybox/sky_hydro_01dn)
    Connection to game coordinator established.
    Current item schema is up-to-date with version F882F340.
    tf_server_identity_account_id not set; not logging into registered account
    PC's_Frank connected
    Compact freed 507904 bytes
    Redownloading all lightmaps
    info_observer_point (observer_3) couldn't find associated team entity named 'cap_4'
    info_observer_point (observer_3) couldn't find associated team entity named 'cap_4'
    info_observer_point (observer_3) couldn't find associated team entity named 'cap_4'
    info_observer_point (observer_3) couldn't find associated team entity named 'cap_4'
    info_observer_point (observer_3) couldn't find associated team entity named 'cap_4'
    info_observer_point (observer_3) couldn't find associated team entity named 'cap_4'
    info_observer_point (observer_3) couldn't find associated team entity named 'cap_4'
    info_observer_point (observer_3) couldn't find associated team entity named 'cap_4'
     
    Last edited: Mar 1, 2015
  12. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,365
    Then the problem is most likely in the .vmt
     
    • Thanks Thanks x 1
  13. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    Make sure you apply a material in Blender (the default one will work), name it the exact same thing as what you named the vtf/vmt), and recompile, or it'll give you that missing texture pattern.
     
    • Thanks Thanks x 1
  14. PC's_Frank

    PC's_Frank L4: Comfortable Member

    Messages:
    179
    Positive Ratings:
    26
    Alright, I'll check out the vmt and the material in blender. Thank you both.
     
  15. PC's_Frank

    PC's_Frank L4: Comfortable Member

    Messages:
    179
    Positive Ratings:
    26
    I'm sorry to say that after disappearing for almost two weeks, I have not succeeded in any of this. Even worse, I've somehow managed to forget everything I learned about Blender in the process, so now I can't even make a collision model. I am sorry it has come to this, and I really do appreciate the help you folks have given me, but I've reached the conclusion that the custom model just isn't worth it. I cant get it to work properly, and now, I can't even remember how I got this far in the first place. I'm sorry.