QC File help

I apologize if this seems long, but I want to detail my problem as good as I can so there is no confusion.

Okay, I have trudged through many numerous tutorials of how to get models from Maya into Source games, and I had no luck with anything working. I seem to be pretty close to getting it to work though, since I tried out theSoftimage Mod Tool recently. So here's my problem. I imported a chair model into the mod tool from maya as an OBJ. It has two objects: the reference model and the simple physics model. I somehow got the UVs to work and was able to add my texture and project it correctly, even though I don't know if you can use the UV's already on the obj from maya or not. (Can you use the UVs from maya, or do you have to redo them in Mod Tool?) So after somehow getting the Uvs to work, I exported the smd files: one for the reference, one for physics, and one for the idle. I did this from learning the noesis tutorial on the Mod Tool website about importing models into Source, but it's for Half Life 2 and I'm doing it for Team Fortress 2.

This is my main concern. I made a QC file by using a sample one from the tutorial, opening it in notepad, and replacing the existing file names with my own (chair_reference.smd, chair_physics.smd, etc.), and dropped it into the studiomdl program. The black command prompt came up for a split second and then closed, refusing to compile anything. No error message, it just quits abruptly. I tried different code examples from numerous sites, and nothing works. What I need my object to do is this: It needs to be static. No physics, just for it to sit there and be able to be bumped into. It's wooden, so I want it to sound like it on impact and have the bullet holes look like it.

Does anyone have a good solution to all of this? I've been trying for about a week now, and i've run out of options. If anyone could help me out with this problem, I would greatly appreciate it. Thanks in advance.

Oh noes! You're not a Member!

Want access to cool stuff? As a member you can:

  • Post. Give the submitter your thoughts on this Thread.
  • Say Thanks. Show your appreciation by sending the submitter points.
  • Stamp Posts. Let other posters know what you think of their posts.
  • Rate. Give this Thread a rating out of 10.
  • Flag. Alert moderators and warn members of a problem with this Thread.
  • Vote. Vote the submitter for the Monthly Awards.
  • Subscribe. Get notified when this submitter submits again.

Interested? Register or Login

  • You must be a member

Replies

  • RedRogueXIII avatar
    Availability
    Offline
    Points Level
    Drudge Points Level icon
    Drudge
    2,578 points
    Exemplary Feedback Level
    Guide Exemplary Feedback Level icon
    Guide
    25 EF's
    Account Age Level
    Elder Age Level icon
    Elder
    9 years old
    Clearance Level
    Treehouse VIP Clearance Level icon
    Treehouse VIP
    • Report icon
    6 years ago:

    Yes uvs are transferable between programs.

    The studiomdl program will open and then close because it encounters a compiling error, but since windows closes the command prompt instantly instead of letting anyone read it, you have to browse the error with another program. I use studio compiler to test out the .qc and find the error.

    This is a good list of common problems you might encounter

    Make all the things.
  • 3DRyan avatar
    Availability
    Offline
    Account Age Level
    Elder Age Level icon
    Elder
    6 years old
    Clearance Level
    Member Clearance Level icon
    Member
    • Report icon
    6 years ago:

    Alright, so thanks to the link you gave me, I figured out the problem. My confusing tutorial didn't mention that you have to have SDK open in order to get it to compile, so that's solved and I can look at my model in the model viewer. But now, i'm getting the dreaded purple and black texture error where it can't find my texture file. I think my problem is that I might have some of the coding wrong or the VMT or VTF files may be in the wrong place. My model file is named chair.mdl and the other files are chair.vmt and chair.vtf.

    So I guess I have three main questions.

    1)where do I need to place my smd, mdl, vtf, qc and vmt files, or does it not matter as long as the texture files can be found in the qc and vmt files?

    2)Based on where I should have the files, what should it look like in the qc file where it says "$cdmaterials" < > and in the vmt where it says "$basetexture" "< >" these are where the problems should be occuring, right?

    3)In Softimage Mod Tool, How do I apply my UV set that I imported with the OBJ file? In the projection part of the add texture image window it just gives me options to make a new projection.

    Thanks Red Rogue for the help with compiling, I don't know how long it would have taken me to figure it out if it weren't for your idea. Thanks a bunch!

    Bananite
  • RedRogueXIII avatar
    Availability
    Offline
    Points Level
    Drudge Points Level icon
    Drudge
    2,578 points
    Exemplary Feedback Level
    Guide Exemplary Feedback Level icon
    Guide
    25 EF's
    Account Age Level
    Elder Age Level icon
    Elder
    9 years old
    Clearance Level
    Treehouse VIP Clearance Level icon
    Treehouse VIP
    • Report icon
    6 years ago:

    Open the reference .smd with a texteditor, you'll see a list of bone names, and then geometry coordinates along with a material (something.bmp), make sure this material points to chair.bmp, you can use the texteditor to replace all instances to do this. Compiling will change chair.bmp to chair.vmt and will point the model to which files are the textures. Makes sure everything is in the right folders, (models in models, textures in materials). You specify the paths in the .qc so make sure they match up.

    In mod tool just select the obj and hit (alt+7) which brings up the uv editor, you should see your uvs that you made in maya.

    Make all the things.
  • 3DRyan avatar
    Availability
    Offline
    Account Age Level
    Elder Age Level icon
    Elder
    6 years old
    Clearance Level
    Member Clearance Level icon
    Member
    • Report icon
    6 years ago:

    Alright, I still can't get it to work. I'm using targas instead of bmps, is that ok? Here's where I'm keeping all of the files:

    chair_ref.smc, chair_idle.smc, chair_physics.smc, and chair.qc are all in: C://Program Files/ Steam/steamapps//sourcesdk_content/hl2/modelsrc/tf2_models

    chair.vmt and chair.vtf are in: C://Program Files/ Steam/steamapps//sourcesdk_content/hl2/materialsrc/models/tf2textures

    Now here's what the qc looks like:

    $modelname TF2_models/chair.mdl

    $cdmaterials models/tf2textures $staticprop $upaxis Z $scale 1

    $model chair_source "chair_ref.smd" { }

    $sequence idle "chair_idle.smd"

    $collisionmodel "chair_physics.smd" {

    $concave
    $automass
    

    // $mass 100.0 }

    and here's the vmt

    "VertexLitGeneric" {

    "$basetexture" "chair"
    "model" 1
    "$envmapmode" 1
    

    }

    Does this all look right?

    Bananite
  • RedRogueXIII avatar
    Availability
    Offline
    Points Level
    Drudge Points Level icon
    Drudge
    2,578 points
    Exemplary Feedback Level
    Guide Exemplary Feedback Level icon
    Guide
    25 EF's
    Account Age Level
    Elder Age Level icon
    Elder
    9 years old
    Clearance Level
    Treehouse VIP Clearance Level icon
    Treehouse VIP
    • Report icon
    6 years ago:

    All paths are game specific, you have the textures in the sourcesdk folder. Move the textures with the same path into the same game folder as the model files.

    Targa's work as well.

    Make all the things.
  • 3DRyan avatar
    Availability
    Offline
    Account Age Level
    Elder Age Level icon
    Elder
    6 years old
    Clearance Level
    Member Clearance Level icon
    Member
    • Report icon
    6 years ago:

    Damn! Tried it, still nothing :(

    Bananite
  • You must be a member

Submitter

3DRyan avatar
Availability
Offline
Account Age Level
Elder Age Level icon
Elder
6 years old
Clearance Level
Member Clearance Level icon
Member

3DRyan

Stats

Post Count
6
ViewCount
1,299
Date Added
6 years ago
Date Modified
6 years ago

Share

Code to use:

More embeddable images

Bookmark and Share