Home Technical Talk

[TUTORIAL] Getting your TF2 hat into Source as a Prop_Physics

1
polycounter lvl 9
Offline / Send Message
Zipfinator polycounter lvl 9
Getting your TF2 hat in game as a Physics prop
Many of you in the TF2 contribute thread have been having trouble getting your hat in game to view so I've decided to make a short tutorial on how to get your hats in game. This tutorial won't cover how to get your hat in game for other players to wear but it will get your hat in game as a prop_physics so you can view the TF2 shaders on your hat which is what really matters. I'll be going through this tutorial from the point of view of a Max user but the information should apply to any modeling application. Enough talk, let's begin!

Here's a list of what you'll need to complete this tutorial:

-A SMD Exporter for you respective modeling program. You can get the 3DSMax one HERE. I'm not sure if there's a working one for Maya but the free XSI Mod Tool should have one.

-GUI Studio MDL. This is used to compile your model from your .QC file. Before starting this tutorial, open this and set the correct paths to the bins. There are directions inside the program on how to do this.

-VTFEdit. This is used to convert your textures from TGA/PNG to .VTF (Valve Texture File). You can also use it to edit your .VMT.

-Source SDK. You can download this for free from the Tools tab in your Steam Library.

-A textured model of your hat in your modeling program.

-A collision model

-TGA/PNG file of your diffuse map

-A folder where you'll store your TGA, .QC and .SMD files for this particular hat. This is not much of a requirement but it's good to keep your files organized.

Now that you've got all the items listed above, we'll begin exporting/converting all of the files that you'll need to get your model in TF2.

We'll begin by converting your model's mesh and collision mesh to get your 3 SMD files.

Before you convert your model to .SMD you must have a material with the same name as the VMT file you'll be using applied to your mesh. This is very important because if the texture applied to your model in your modeling application has a different name than the VTF on your final model the texture will not show up in game.

Here's how your model should be before exporting.

1.jpg

I've got a simple purple diffuse map applied to my model named testhat and a bone named hatbone applied to the mesh. It's not necessary to name your bone but it's a good practice.

Now it's time to export your reference and idle models. Go to File/Export and select "Source SMD" in the Save as Type drop down menu and choose to save it in the folder you'll be keeping your QC/SMDs in. Name the hat whatever you want your hat to be named without spaces. In my case I'm naming it testhat. Click Save. A menu should appear on your screen. Select "Export Reference SMD" as pictured below.

2.jpg

Click OK. After the bar has scrolled all the way to the right, click OK again. You've now exported your model's reference SMD.

Now you need to export your idle animation. Go to Export again, choose to Save as Type "Source SMD" in the same folder you saved your reference SMD. Name this file the same as your reference SMD but with _idle at the end. In my case I'm naming it testhat_idle. Click Save. The same menu as before should appear on your screen. This time select "Export Sequence SMD" and set the Export Range from 0 to 1 as pictured below.

3.jpg

Click OK. After the bar has scrolled all the way to the right, click OK again. You've now exported your model's idle animation SMD.

Now that you've got your reference and idle SMDs all that's left for you to do in your modeling application is export your Collision Mesh to get your Phys SMD.

Open your Collision Model or build your collision model over your hat model. Your collision model MUST be a convex shape or a combination of convex shapes with the same smoothing group applied to the entire model. Be sure to also apply the same diffuse map your model uses to your collision model. Now apply a bone to the collision model. Your bone and your collision model should be placed in the same spot relative to the origin of your 3D space, otherwise your collision will be off center to your hat while in game. Here's what my hat looks like after I've completed these steps.

4.jpg

Now you need to export your collision model to SMD. Go to Export, find the folder where your other SMDs are saved and select Save as Type "Source SMD". Name the file the same as your reference SMD but with _phys at the end of it. In my case I'm naming it testhat_phys. Click Save. Select "Export Reference SMD" as pictured below.

5.jpg

Now you're done exporting models!

We're now going to convert our texture files from TGA/PNG to VTF. Minimize or close your Modeling Application and open a browser to the folder where your TGA/PNG files of your textures are. Remember before you convert to VTF, place your Phong map in the alpha channel of your Diffuse map. Right click on your diffuse map, go to Open With and select VTFEdit. A window should pop up on your screen that looks like this.

6.jpg

Don't mess with any of the settings. Click OK. Go to File, Save As. Go to Program Files/Steam/Steamapps/[Your account name]/Team Fortress 2/tf/materials/models. Here you need to make a new folder with the name of your hat. I'm naming mine testhat. Save your texture in that folder with the EXACT same name as the texture you had applied to your model in your modeling application.

Don't worry about making a normal/spec map for your hat as Valve most likely won't use them. They'll use a flat normal map that's used on all the hats. If your hat truly benefits from a normal map then Valve will possibly use it but for the purposes of this tutorial I'll be using the flat normal map Valve uses on their hats.
Now it's time to set up the VMT for your material. This is a text file that tells Source where the textures for your hat are located and what shaders to use on that texture/model.

We're going to be using VTFEdit to create our VMT. Open VTFEdit and go to File/New. You should get a screen like this.

7.jpg

Copy this code into your VMT and replace "testhat" with whatever your hat is named and make sure that the file paths lead to the folder where your materials are.



"VertexlitGeneric"
{
"$baseTexture" "models\testhat\testhat"
"$bumpmap" "models\effects\flat_normal"

"$phong" "1"
"$phongexponent" "25"
"$phongboost" "5"
"$lightwarptexture" "models\lightwarps\weapon_lightwarp"
"$phongfresnelranges" "[.25 .5 1]"
"$basemapalphaphongmask" "1"

"$rimlight" "1"
"$rimlightexponent" "4"
"$rimlightboost" "2"
[FONT=&quot]}



[/FONT]If you have any questions or want to learn a bit more about what these commands are, search through the VDC.

Once your VMT has all the correct paths and names, save it with the same name as your diffuse VTF in the same folder that the diffuse VTF is located in.

Now that we've got our VMT, VTF and SMD files created, all that's left if to make the .QC file and compile our model.

Copy the code below into a fresh Notepad file and replace testhat with the name of your hat.



$modelname "testhat/testhat.mdl"
$model "Body" "testhat.smd"
$cdmaterials "models/testhat"
$sequence idle "testhat_idle.smd" fps 30.00
$collisionmodel "testhat_phys.smd" {

$concave
$mass 4.0
$inertia 1.00
$damping 0.00
$rotdamping 0.00
}
[FONT=&quot]$keyvalues { prop_data { "base" "cloth.Small" } }



[/FONT]Make sure the paths all lead to the correct folders where your files are located. Below are short descriptions on what the commands you must change do.

-CDMaterials references the folder where your materials are located. Mine is located in TF/Materials/Models/Testhat so I put "models/testhat" as the location of the folder.

-Modelname is what you want the QC to name the model when it's run and the location of the model. I want my hat to be named Testhat so I put "testhat/testhat.mdl". You MUST create a folder for your hat in the Team Fortress 2/tf/models folder for your model to go in before compiling your QC file or else you'll get errors. The program will NOT create a folder for you.

-Model, Sequence Idle and Collisionmodel reference your SMD files. Your QC file should be saved in the same folder as your SMD files.

-Prop_Data tells Source what sounds and physical properties to give the model. I'm using cloth.Small for my hat. A list of commands available for this is located here.

Once you have all of the correct paths and file names in your notepad file, save it as [hatname].qc. I've named mine "testhat.qc". Putting .qc on the end of the filename while saving automatically makes it a QC file that GUI Studio MDL will recognize instead of a notepad file.

Now that we've got your QC file made, it's finally time to compile your model. Open up GUI Studio MDL. Select Orange Box and select Team Fortress 2 from the dropdown menu as pictured below.

8.jpg

Open up your QC file and hit Compile. If everything went smoothly it should look like this.

9.jpg

Now your model is ready to be place in a testmap as a prop_physics or loaded into the Model Viewer! To view your model in the Model Viewer, open up Source SDK, select Orange Box for the engine and Team Fortress 2 for the game. Then double click on Model Viewer. Go to File/Open and find the folder where you told the QC to place your model. Double click on it and then double click on the model.

10.jpg

Now that you've got your model in TF2/Model Viewer you can see how it looks with TF2's shaders and easily change the phong settings to test how they look with Source's shaders. While in the Model Viewer you can press F5 to quickly refresh your model with your latest VMT/VTF.

You can read up on how to modify the phong settings in your VMT to get what you want here or just copy Valve's settings from their hats until you find one you like.

Hopefully this tutorial helped you understand the complex process of getting a model into Source! Good luck with your hats!

Replies

  • Progg
    Offline / Send Message
    Progg polycounter lvl 11
    Great tutorial man... Now I finally have something I can link the people that message me on steam too!
  • SideEffect
    Offline / Send Message
    SideEffect polycounter lvl 19
    I also highly recommend notepad++ when working with QC files.
    It organizes your code and colorizes the text making things easier to see whats going on.
    Also tabbed browsing of QC files.

    It'll definitely save you from making the stupid mistakes of forgetting to close a bracket or a typo or something like that. It's not fun recompiling over and over only to find it's something lame like that.

    notepad ++
    http://notepad-plus.sourceforge.net/uk/site.htm

    Language file for QC editing
    http://steamreview.org/external/vdc/npp-vdf.zip

    Here's a pic:
    qcnotepad.jpg
  • Zipfinator
    Offline / Send Message
    Zipfinator polycounter lvl 9
    Ah thanks for the links. I'll try that out, looks like it could be useful when working on advanced models.

    EDIT: Can you explain how to install the QC plugin for Notepad++ for Windows 7? I tried it using the method for Windows Vista but it didn't work.
  • Yamo
    Ah, with pictures and everything!

    Awesome tutorial, definitely easier to understand than the one in the steam forums
  • SideEffect
    Offline / Send Message
    SideEffect polycounter lvl 19
    Awesome tutorial just read over it.

    Only one minor thing.
    Zipfinator wrote: »
    Before you convert your model to .SMD you must have a material with the same name as the VTF file you'll be using applied to your mesh.
    You actually have to make sure it's the same name as your .vmt shader file. It doesn't look up the names of the vtfs, those are all defined in the vmts.
  • Zipfinator
    Offline / Send Message
    Zipfinator polycounter lvl 9
    SideEffect wrote: »
    Awesome tutorial just read over it.

    Only one minor thing.

    You actually have to make sure it's the same name as your .vmt shader file. It doesn't look up the names of the vtfs, those are all defined in the vmts.

    Ah ok thanks. I always just assumed it was the VTF because Valve's and my own textures always have the VTF and VMT named the same thing. I'll change that now.

    Also can you explain how to install the QC Plugin for Notepad++ on Windows 7?
  • Yozora
    Offline / Send Message
    Yozora polycounter lvl 11
    Zipfinator wrote: »
    Also can you explain how to install the QC Plugin for Notepad++ on Windows 7?


    Put in in the same folder as the vista one, and then in the top tool bar in notepad++ select language > VDF-QC
  • Zipfinator
    Offline / Send Message
    Zipfinator polycounter lvl 9
    Yozora wrote: »
    Put in in the same folder as the vista one, and then in the top tool bar in notepad++ select language > VDF-QC

    Windows is hiding that folder from me though and it won't let me extract from WinRar to it. Do you know how I can bypass Windows hiding it?
  • willy-wilson
    Offline / Send Message
    willy-wilson polycounter lvl 8
    control panel > appearance and personalization > folder options > view > show hidden files folders and drives.
  • Zipfinator
    Offline / Send Message
    Zipfinator polycounter lvl 9
    Ah thanks. De-railed the thread a bit with that. Back to the tutorial!
  • Noors
    Online / Send Message
    Noors greentooth
    Great job !
    You don't have to put the .vtf in max, it's defined in qc and vmt. So you can use your psd directly in max for example, as long as it has the right name.

    Now just add some lines to explain how to replace an official hat in-game and i think it's totaly overcomplete :)

    Basicaly, just by renaming in the qc
    $modelname "testhat/testhat.mdl"
    by some existing hat name like
    testhat/pyro_domination.mdl" or smthing.

    Not sure if it has to be in C\Steam\steamapps\blabla\team fortress 2\tf\materials\models\player\items\ to work properly ?

    Again, big thanks to you, coz tutorials are lots of work.
  • MeintevdS
    Offline / Send Message
    MeintevdS keyframe
    Thanks a lot for the tutorial, I'm almost there now. Everything went smoothly until I pressed the Compile button.

    The error GUIStudioMDL gave me is:
    writing c:~program files(x86)~steam~steamapps~[name]~team fortress 2~tf~models/waterbomb/waterbomb.mdl:
    Error opening c:~program files (x86)~steam~steamapps~[name]~team fortress 2~tf~models/waterbomb/waterbomb.mdl! (Check for write enable)

    I removed the "read only" check on the sourceSDK folder, but it's still not working. I think it might be the weird switch between back slashes and forward slashing in the paths, but I have no idea why it suddenly changes to forward slashes or how to change it.

    Any help is greatly appreciated :)


    edit1: For some weird reason polycount won't let me use back slashes in my paths.. so I replaced them with a ~

    edit2:
    I just noticed that the slash switch is being caused by the .qc file (since the code i got from polycount uses forward slashes instead of backwars slashes).
    The problem is that GUIStudioMDL also seems to use forward slashes.
  • Surfa
    Offline / Send Message
    Surfa polycounter lvl 12
    create the folder waterbomb in your models folder.
  • MeintevdS
    Offline / Send Message
    MeintevdS keyframe
    I already did, it contains my waterbomb.vmt and waterbomb.vtf files.

    edit:
    Oh I'm sorry I fail.... If I did a better job reading I would have noticed that mine are in tf/materials/models instead of tf/models.

    Thanks Surfa, that fixed it... Gah I feel stupid now...
  • Noors
    Online / Send Message
    Noors greentooth
    I think this should be stickied or accessible in tf2 contest subforum, or wiki ?
  • killingpeople
    Offline / Send Message
    killingpeople polycounter lvl 18
    Thanks for writing this up dude.
  • Wahlgren
    Offline / Send Message
    Wahlgren polycounter lvl 17
    The guistudio thing just doesn't want to work for me... Something about gameinfo.txt not being in those folders. Any idea on how to solve that?

    :S


    EDIT: GOt it sorted.
  • Farfarer
    Bit of an aside;

    If anyone's a modo user, I've written an SMD exporter for it. Static mesh only at the moment (no animation or bones) but it should do fine for static props and collision meshes.

    http://www.farfarer.com/resources.htm
  • Mark Dygert
    The guistudio thing just doesn't want to work for me... Something about gameinfo.txt not being in those folders. Any idea on how to solve that?

    :S


    EDIT: GOt it sorted.
    Might help other people to say how you fixed it.

    Off the top of my head I think you have to run the game once for the gameinfo.txt to show up in the root TF2 folder. You also have to set the path to the gameinfo.txt in guistudio. Since it handles both Orange box and HL2 if you haven't installed or launched HL2 it will always complain. it should be fine to set it to TF2 and compile.
  • Wahlgren
    Offline / Send Message
    Wahlgren polycounter lvl 17
    What I had to do was delete all my sourcesdk stuff and reinstall it.

    Anyone have a tutorial on how to get stuff actually inside the game? (without overwriting the current stuff?). I've been browsing google for a bit but it's not all that easy to find a good tutorial.

    I'm mainly thinking weapons here.
  • Ruskeydoo
    Having a problem

    Everything looks like it works fine but then when I try and view the model i get "error loading model". Further investigation shows the .mdl files are very small
    4671554676_8aab50f252_b.jpg

    So my first troubleshoot was to try re-importing the smd into maya. Looks fine, there's an extra joint that has appeared at origin with the model name but that's it.

    The only way that I can see I've deviated from your guide is by using the idle from an existing hat as suggested in this guide:

    http://forums.steampowered.com/forums/showthread.php?t=1109465

    (following this guide I get exactly the same problem)

    The maya smd exporter only has "export as reference" and "export each model as separate body group" as tick box options. So I cant change the export range.

    Any suggestions as to what my next step should be would be gratefully recieved. I'm running out of ideas.
  • Ruskeydoo
  • Zipfinator
    Offline / Send Message
    Zipfinator polycounter lvl 9
    Not sure how to fix your problem. I've seen other people who use Maya having that problem with 2011. I think the exporter hasn't been updated or it just doesn't like Maya. If you can, export to OBJ, Import it into Max and export to SMD from Max.

    Also I'm fixing the image links now
  • Ruskeydoo
    Thanks for the reply :) I think your solution sounds like the plan. I'd be interested to hear if anyone has sucessfully got this to work with 2009 as that would mean I'm getting some setting somewhere wrong?
  • cabley123
    hey i have something else i need help with for my hat. i have 2 separate models and dont wana attach them together for textureing reasons.. itd just make it to hard. can i export both these objects together plus the texture for each object? or do i have to bake the model or sometihng?
    sorry new to all this not sure what im doing...
    if i have to bake it can someone please direct me somewhere to learn how to do this?
    thanx
  • Farfarer
    Just attach them but have two different textures on the model. It'll pick up both textures fine on export.
  • maniac™
    Offline / Send Message
    maniac™ polycounter lvl 8
    Please help
    Finally I have some free time and decided to try get my items in game.
    I've done and re-read this lesson a dozen times:poly105:, but in result always getting a model with Purple / Black Checker instead of my textures. All the possible errors that can be found through Google, I checked.
    So I went through all actions with two of my models. And also tried to add my hat by using the name testhat, to use your vmt and qc codes unchanged.
    I use max2009 and all soft that you pointed.
  • Zipfinator
    Offline / Send Message
    Zipfinator polycounter lvl 9
    Was the texture that you had applied to the model when you exported to .SMD the same name as your .VMT?

    Are your .VMT and .VTF files in the right location based off of what you put in the .QC and do they have the correct file paths?

    If you're sure you did those and it still doesn't work then post your .QC and .VMT files on here.
  • maniac™
    Offline / Send Message
    maniac™ polycounter lvl 8
    Thank you for respond.
    I did everything again, the result is the same.
    Please take a look on picture and my .QC and .VMT files (I used the name testhat, so they are actually yours).

    testhat01.jpg

    VMT:

    "VertexlitGeneric"
    {
    "$baseTexture" "models\testhat\testhat"
    "$bumpmap" "models\effects\flat_normal"

    "$phong" "1"
    "$phongexponent" "25"
    "$phongboost" "5"
    "$lightwarptexture" "models\lightwarps\weapon_lightwarp"
    "$phongfresnelranges" "[.25 .5 1]"
    "$basemapalphaphongmask" "1"

    "$rimlight" "1"
    "$rimlightexponent" "4"
    "$rimlightboost" "2"
    }

    QC:

    $modelname "testhat/testhat.mdl"
    $model "Body" "testhat.smd"
    $cdmaterials "models/testhat"
    $sequence idle "testhat_idle.smd" fps 30.00
    $collisionmodel "testhat_phys.smd" {

    $concave
    $mass 4.0
    $inertia 1.00
    $damping 0.00
    $rotdamping 0.00
    }
    $keyvalues { prop_data { "base" "cloth.Small" } }
  • Surfa
    Offline / Send Message
    Surfa polycounter lvl 12
    you vtf and vmt need to go in tf/materials/models/testhat/ to fit the .qc and then you need to change the .vmt paths to be that as well.
  • Mark Dygert
    Yep, right now your VMT is pointing to "tf/materials/models/testhat/testhat/testhat.vtf"

    "$baseTexture" "models\testhat\testhat"

    should be
    "$baseTexture" "models\testhat"
  • maniac™
    Offline / Send Message
    maniac™ polycounter lvl 8
    Oops
    I knew that miracles do not happen and I over and over again repeat the same mistake. All turned out, thank you very much for help.:)
  • MeintevdS
    Offline / Send Message
    MeintevdS keyframe
    Haven't tried this in ages and figured I'd give it another go today. And I got stuck again at the compiling part, the weird thing is that it doesn't give me an error message, but just seems to quit.

    This is the message I keep getting:
    Created command line: "C:\Program Files (x86)\Steam\steamapps\bananasir\sourcesdk\bin\orangebox\bin\studiomdl.exe" -game "c:\program files (x86)\steam\steamapps\bananasir\team fortress 2\tf" -nop4 -nox360 C:\Users\ruined\Desktop\testhat\export\testhat.qc

    After that nothing happens. Any of you have an idea of what I'm doing wrong?

    The only error I get when starting GUIStudioMDL is:
    *ERROR* EP1 tools path is not valid - use "Config" then "Set EP1 Tools Path..." from the menu to set it.

    But since I'm using orange box and not EP1 it shouldn't cause the problem right? (I'll see if I can fix the error either way)

    Anyway, all the help would be appreciated, thanks!
  • ANDEWEGET
    Offline / Send Message
    ANDEWEGET polycounter lvl 6
    AFAIK this error appears if you dont have all the folders created. GUIStudiomdl cant create new folders.
  • MeintevdS
    Offline / Send Message
    MeintevdS keyframe
    Thanks for the reply ANDEWEGET. However I'm pretty sure I have all the folders, I checked it 3 times.

    I have a folder on my desktop that contains the:
    testhat.smd
    testhat_idle.smd
    testhat_phys.smd
    testhat.qc

    And a folder in "...\team fortress 2\tf\materials\models\" called testhat containing:
    testhat_diffuse.vmt
    testhat_diffuse.vtf

    Then I have a folder in "...\team fortress 2\tf\models\" called testhat which is still empty.

    Could it be that GUI Studio is caps sensitive? Because max exports .SMD files and the .qc file says smd.

    Also my smd exports use the tga as diffuse, not the vmt conversion.
  • Zipfinator
    Offline / Send Message
    Zipfinator polycounter lvl 9
    Post your .QC.
  • MeintevdS
    Offline / Send Message
    MeintevdS keyframe
    $modelname "testhat/testhat.mdl"
    $model "Body" "testhat.smd"
    $cdmaterials "models/testhat"
    $sequence idle "testhat_idle.smd" fps 30.00
    $collisionmodel "testhat_phys.smd" {

    $concave
    $mass 4.0
    $inertia 1.00
    $damping 0.00
    $rotdamping 0.00
    }
    $keyvalues { prop_data { "base" "cloth.Small" } }

    I don't think I changed anything.
  • Zipfinator
    Offline / Send Message
    Zipfinator polycounter lvl 9
    Is your .QC in the same location as your .smd?

    If that's not the issue then I think you might have installed GUIStudioMDL wrong or something. Looking at your original post it says "oran gebox\". That should be "orangebox\" although that could have just been a paste error.
  • MeintevdS
    Offline / Send Message
    MeintevdS keyframe
    First off thanks for the reply.

    The QC file and the smd files are in the same folder, and "oran gebox" was indeed a copy paste error.

    I guess I'll just start from the start again, I must have messed up at some point.

    Just making sure I got everything in the tutorial right:
    When I create the bone it will always adds an extra bone, I deleted that last time So I just had the 1 bone. Is this the right way to do it?

    Do I only link the bone to the object through the skin modifier on the mesh? Or do I also have to use the "select and link" tool?

    Do the physics mesh and ingame mesh share the 1 bone? Or do I give both their own?

    Sorry for the basic questions, just wanna make sure I do it right this time. Thanks again for the help.
  • Zipfinator
    Offline / Send Message
    Zipfinator polycounter lvl 9
    Just delete the extra bone.

    You only have to link the bone to the object through the skin modifier if it's a single bone.

    The physics mesh should use the same bone as the in game one.

    If the bones are what's causing trouble, you can just not use any bones and remove the line $keyvalues { prop_data { "base" "cloth.Small" } } from your .QC and add $staticprop to the .qc after $cdmaterials. This will compile the item as a static prop so you can view it in Modelviewer the same as you would a physics prop or a hat.
  • MeintevdS
    Offline / Send Message
    MeintevdS keyframe
    Awesome, I'll give that a go. Thanks for the help!
  • KrookedSaint
    Hey All,

    First off, THANKS for the sweet tutorial. I was able to get everything working on the first try!

    My problem is now viewing the model in-game. I've followed the instructions on this page:
    http://www.polycount.com/forum/showthread.php?t=74078&highlight=compile
    and I'm able to get my hat into the game by replacing the parasite hat for the sniper. Unfortunately it's not on his head, and it does not appear to be following his head movements, but rather his hips.

    I'm a total noob with Source, but I'm pretty advanced with Max and Maya. I'm pretty sure the weighting information isn't being compiled because my hat does the same thing even if I delete the bone and skinning information altogether. It still sticks to the sniper's hips.

    I've used the exact naming convention for testhat in this thread in my files and .qc file.

    Any suggestions how I can get the hat to follow my sniper's head and not his crotch?

    Thanks in advance! :)
  • Noors
    Online / Send Message
    Noors greentooth
    Did you select mesh+bones ? If you re-import the smd u've just exported, is it skinned ?
  • KrookedSaint
    I re imported it and all the skinning and bones information was intact. All vertices accounted for. I have a feeling that I should try replacing a different hat. Right now I jimmy rigged the 'parasite hat' to be my model. I'm going to try a different one. If there's anything else you can think of, I would appreciate it!
  • Noors
    Online / Send Message
    Noors greentooth
    It it skinned to bip_head ? :s Where comes from your testhat_idle.smd ? Does it load in the source model viewer ? It's hard to say, there are some many parameters. If you still struggle, you can upload your files somewhere so we take a look (and steal your work mewahahah)
  • Zipfinator
    Offline / Send Message
    Zipfinator polycounter lvl 9
    You can't use the hat you compiled through this tutorial as a hat replacement. To use it as a hat replacement you'd have to recompile it attached to a bone called bip_head and have it positioned correctly in Max so that it will be on the players head when it's used. The easiest way to do that is to decompile a hat model and position your hat over it in Max/Maya/ETC.
  • KrookedSaint
    OK! Thanks Zipfinator! I'll give that a shot when I get home.

    Also... is there any way to unlock hats in-game without earning them? I tried last night to get unlock the Ghastly Gibus, but I'm such a noob I can't dominate $#!% let alone a guy wearing a specific hat.

    I'm 3 years behind in TF2 skills.

    Thanks for your help!
  • cman2k
    Offline / Send Message
    cman2k polycounter lvl 17
    You could also overwrite the halo if you have it. I don't know of any way to unlock them otherwise.

    Even if you don't have any unlocked, you can test their attachment in HLMV (half-life model viewer) pretty easily. Just load up a character model (in models\players), then go to file -> load weapon and choose your hat model.

    Also, an alternative to decompiling a hat is to import a character's SMD into max. You can find them in your source_sdk_content folder (assuming you have the source sdk installed). Then you can properly position your hat onto the character, link it to the proper bone, hide the character and export from there.
  • KrookedSaint
    YAY I got it to work properly! It was my bad. I was skinning the hat with a bone that I had created instead of using the bip_head bone included with the source model. Makes sense that it wouldn't work without some connection to the character model.

    Here's something wierd. I was able to get the Ghastly Gibus, but for some reason it *sometimes* doesn't show up in my loadout. I loaded up the game yesterday and it wasn't there, but the day before it was... WTF?

    Note: NEM's GCP Scape utility may not be able to extract TF2 content packages. Apparently it won't work at extracting TF2 data until this weekend when he sends out the latest update. I was wondering why I suddenly started getting errors.

    http://nemesis.thewavelength.net/
  • Notavirus.exe
    I'm such a noob. I can't wait to get to the point until I can build a hat on my own.

    I've book marked this until I can learn how to use 3DS MAX 2011
1
Sign In or Register to comment.