|
|
#1 |
![]() Join Date: Sep 2009
Reputation: 1143
Posts: 1,185
|
Beginner's Guide to Custom Hat Models
Hello. I've written this guide in an effort to present a glossary of everything you need to know about importing a custom hat into Source regardless of your modeling experience. While this tutorial is geared specifically towards making hats, most of the information here can be applied to creating custom weapons/props/anything. If you need help, feel free to PM me or, better yet, simply ask for it in this thread. There is also a Troubleshooting section at the bottom of this post with some solutions to many of the common issues you're likely to face.
Preparations Before you get started, you must get organized. Create a folder on your desktop to house all of your projects and materials. Name it "TF2 Stuff" or something like that. Inside that, make one folder for your hats and another for your decompiled reference models (just call it Models). It's also best to have a shortcut somewhere to your tf folder located at C:\Program Files\Steam\steamapps\(your username)\team fortress 2\tf\. You will be visiting there often. The hat we will be making today is going to be giant eyeball for the Demoman so make another folder in your hat folder called "Eyeball". If you do not have the Source SDK already, get it now. You can find it under the Tools tab in Steam. The Model Viewer is invaluable. Decompiling NOTE: Since the character Source files were officially released, you do not need to follow this method to obtain decompiled models for any of the nine classes. Rather, you can find them in C:\Program Files\Steam\steamapps\(your username)\sourcesdk_content\tf\modelsrc\player, already converted to smd format. You can skip this step for now but if you wish to decompile other models such as hats, props or weapons, you must do it manually. Programs you need: GCFScape MDL Decompiler (Place in sourcesdk\bin\ep1\bin) Notepad++ What we're going to do here is extract the Demoman model from Source and decompile so we can import it into our modeling program and use it as a reference to build a hat around. This is a very important step because without a reference, we won't be able to shape or size it right, let alone fit it on his head. Firstly, make a folder inside your Models folder called "Demoman". Then, make three new folders inside that called "mdl/smd/vtf". Mdl is for the original models, smd is for the decompiled models and vtf is for the materials and textures (should you ever want them). You can keep them all in one folder but it might get messy later on. Open up GCFScape and find your way into the "team fortress 2 materials" file in steamapps. Click tf>models>player and extract the seven demo files into your Demoman mdl folder. You can also use GCFScape to find materials and look through the source files anytime you like. For now, though, we are done with it. Go into your mdl folder, right click demo.mdl and choose "Edit with Notepad++". On the very first line, you should see IDST0. Change the 0 to a comma and it should become "IDST,". Save it and open the MDL Decompiler. Type in demo.mdl with it's full address on the first line. On the second line, put in the address for the Demoman smd folder and click extract. Don't check any boxes. You should now have a ton of SMD files and with this, we are done decompiling. Modeling Programs you need: 3DS Max/Maya/XSI/Blender/Milkshape/Gmax/Etc SMD Importer/Exporter (for 3DS Max) SMD Importer/Exporter (for Blender) There are a few different modeling programs out there. I would recommend 3DS Max as it's what I use and I believe it's the best program around. It's very expensive ($3,500) but there are ways to get it cheaper if you are a student. I believe there is also a free trial available after completing a short survey. Some of the other programs are entirely free and you should take the time to decide on exactly what you want. After you've found a program you like and installed the appropriate SMD Importer plugin, it's time to get to work. Open up your modeling program, import demo_morphs_low.dmx.smd from your Demoman smd folder and make sure you check "Convert from left handed coordinate space" so that he stands up straight. You can leave the bones in for now although you would usually import without them (they're distracting). I won't teach you how to model. I couldn't if I tried. There are tons of tutorials on the internet that can teach you how to use different tools and make different objects. It's an ongoing process like learning how to draw or play an instrument. I can say that if you have 3DS then there is a useful tutorial in the Help section that shows you how to make a viking helmet. Play around with it for awhile and learn a little about the user interface until you are ready to continue. Make a plain sphere and move/scale it so that it fits over the Demoman's head nicely. There's your model. Related Links 3DS Modeling Tutorial - A series of introductory videos to modeling in 3DS Max. Blender Modeling Tutorial - A comprehensive beginner's guide to modeling in Blender. UVW Unwrapping UVW Mapping, like modeling, is a difficult process that you must learn on your own time. For now, we need to deconstruct the model so that we may add a texture. We do this by splitting up the model into different pieces and laying them out on a flat surface that we overlay with an image. Add a "UVW Unwrap" modifier from the drop-down list, click the + symbol and choose face selection (http://img684.imageshack.us/img684/6301/tutorial1o.jpg). Highlight the entire front area of the sphere evenly and click on "Pelt". Repeat the process for the back end of the sphere so that you have two pieces stretched out in a little window titled "Edit UVWs". Scale both pieces down so that they are roughly the same size and can still fit within the blue box in the center of the window (http://img207.imageshack.us/img207/7611/tutorial2t.jpg). At the top of the same window, click "Tools > Render UVW Template > Render UVW Template" and save as a bmp file in your Eyeball folder. Hurray! Texturing Programs you need: Photoshop or Paint.NET VTF Plugin (for Photoshop) VTF Plugin (for Paint.NET) VTF Plugin (3DS Max) VTF Edit Open up Photoshop or a similar program and open the file you just saved. Everything within the green lines will show up on the model. The empty black space is irrelevant so don't worry about coloring in the lines (http://img27.imageshack.us/img27/8021/tutorial3a.jpg). Draw the best eye you can and export as a VTF into C:\Program Files\Steam\steamapps\(your username)\team fortress 2\tf\materials\models\player\items\demo. Check No Mipmap and No Level of Detail. Open the VTF with VTF Edit and choose "Tools > Create VMT File" and create it in the same demo folder. The VMT decides things like reflectiveness and translucency. An easy way to create a detailed VMT without learning all of the commands is to go into GCFScape, think of an official Valve hat that looks similar to what you want, find and open the corresponding VMT file, copy the contents, paste them into your own VMT and change the file path at the top. Now go back into your modeling program, select your model and press M to open the materials window. Click the box next to diffuse, choose bitmap and find the vtf you made earlier. Hit the "Assign Material to Selection" and "Show Standard Map in Viewport" buttons to apply the texture (http://img20.imageshack.us/img20/2066/tutorial4o.jpg). Related Links Texturing for Team Fortress 2 - A guide on how to recreate the TF2 art style in your textures. AO Bake Tutorial - Ambient Occlusion. Essential for creating a great texture. Exporting Delete the Demoman model and every single bone except for bip_head. Select the sphere, add a "Skin" modifier using the drop-down list, click "Add" and double-click bip_head. Now the bone is attached to the model. Export the model into your Eyeball folder as an SMD. Compiling Programs you need: GUI StudioMDL Now you need an idle file. Extract an official Valve hat the same way you did with the Demoman model earlier on. When you decompile, it should have a file called "idle.smd". Copy this into your Eyeball folder. Now you need a qc file. To save time, just copy the code from this pastebin link into a new text document and figure out the rest later. Make sure you edit the first line to match your own files. Save it as "eyeball.qc" into your Eyeball folder using Notepad++. http://pastebin.com/f2e66b65a GUI StudioMDL can be frustrating the first time you use it. Can't help you there. When you figure it out, load up eyeball.qc into the program. Choose Orange Box, set the game to TF2 and compile. The good news? You're finally done and a custom model YOU created now replaces the Ghastly Gibus for the Demoman. The bad news? It's butt-ugly. Make something better. http://img34.imageshack.us/img34/8241/tutorial5d.jpg Recommended Websites & Tutorials: Valve Developer Community - General Source wiki, extremely useful information on qc commands, vmt commands, jigglebones and much more. Assorted Tutorials - A collection of modeling tutorials compiled by Campin Carl on Facepunch. Anti-Aliasing in HLMV Tutorial - High quality models for the Source SDK Model Viewer. Trust me, you want this. Jigglebones Tutorial - A video detailing ways to give your model organic movement in the Source Engine. Troubleshooting Can't find the decompiled models in sourcesdk_content\tf\modelsrc\player. If you've just installed the SDK, you need to launch it at least once for the files to appear. If you've had the SDK since before the character source files were released, you must refresh SDK content. When compiling, an error occurs: "WARNING: Leaking 1 elements" This happens when either your file name is different in the .qc or the file is not present in the same directory as the .qc. Are your qc and and smd files both in the same folder? If yes, right click your smd and see that it's location matches the first line of the qc. When compiling, an error occurs: "(Check for write enable)" Studiomdl won't create folders that don't exist; you must manually create a path to your .mdl before compiling. Compiling worked but the model appears invisible in-game. The problem is with your vmt. Make sure it is in the correct folder as determined by the qc and that the first line when you open the vmt reads: "VertexLitGeneric" The model appears in-game, but without a texture. There are three possible reasons for this to happen: 1) The texture wasn't applied to the model before exporting. 2) The texture wasn't in the correct folder when exporting and was moved afterwards. 3) The file path in the vmt doesn't correctly lead to the vtf. http://www.kathar.net/hl2modding/errors.php - A more comprehensive list of errors and solutions. Last edited by Mnemo: 01-06-2011 at 10:37 AM. |
|
|
|
|
|
#2 |
![]() Join Date: May 2009
Reputation: 721
Posts: 2,412
|
Thank you sir, may I recommend this thread be stickied for the good of forum users?
|
|
|
|
|
|
#3 |
![]() Join Date: Sep 2009
Reputation: 24
Posts: 528
|
OMG probaly i will be in the first page for a LOOOOOOONG time ;D
Sticky NAW!! +rep & 5 stars |
|
|
|
|
|
#4 |
![]() Join Date: Oct 2009
Reputation: 0
Posts: 88
|
Excelent, I just hope people will decide to give modeling a try. Not many allready know how to do it
|
|
|
|
|
|
#5 |
![]() Join Date: Jan 2008
Reputation: 3071
Posts: 12,409
|
Milkshape 3D? YOu missed it.
|
|
|
|
|
|
#6 |
![]() Join Date: Sep 2009
Reputation: 1143
Posts: 1,185
|
|
|
|
|
|
|
#7 |
![]() Join Date: Dec 2009
Reputation: 176
Posts: 1,758
|
I hope that valve won't make TOO many hats.
|
|
|
|
|
|
#8 |
|
Banned
Join Date: Oct 2009
Reputation: 86
Posts: 786
|
Know why not many know how to do it? Because modeling/texturing isn't a simple pick-up-and-use thing. Hell, look at all the programs you need.
Anyone that's completely new to modeling and the like won't know the hell what you're talking about, especially since you "can't teach you how to do this or that", so you're pretty much leaving them in the dark. |
|
|
|
|
|
#9 |
![]() Join Date: Jan 2008
Reputation: 3071
Posts: 12,409
|
Its free (to a certain extent), and a small program. Not all computers are capable of running 3DS Max, but Milkshape is easier on older processors (I'm working on Pentium 4 1.6Ghz XP Desktops here, and the plastic has oxidised to a nice sheen of yellow).
|
|
|
|
|
|
#10 |
![]() Join Date: Jan 2007
Reputation: 1144
Posts: 2,273
|
repped for quality of instructional material. good to see people that want to help others learn the trade
|
|
|
|
|
|
#11 | |
![]() Join Date: Sep 2009
Reputation: 1143
Posts: 1,185
|
Quote:
People just want to be able to load up the game and see something that they created. There are plenty of other guides that can teach them the finer details of modeling. Also, if anyone has any questions, I'd be glad to try and help or at least point them someplace where they can find an answer. A thread doesn't end with the first post. Last edited by Mnemo: 01-13-2010 at 10:45 PM. |
|
|
|
|
|
|
#12 |
![]() Join Date: Dec 2009
Reputation: 334
Posts: 3,019
|
I just checked sourcrforge for free 3dmodelling programs.
http://sourceforge.net/softwaremap/t...p?form_cat=109 Not sure where to start. Can I use FreeCAD to make something? edit - nevermind, freecad doesn't like this. Last edited by Hippy Pacifist: 01-16-2010 at 02:14 AM. |
|
|
|
|
|
#13 |
|
Guest
Posts: n/a
|
nice. thank you kind sir.
|
|
|
|
#14 |
|
Guest
Posts: n/a
|
*Bookmark*
Thanks! This will be very helpful in the near future. |
|
|
|
#15 | |
![]() Join Date: Sep 2009
Reputation: 1143
Posts: 1,185
|
Quote:
Still, I really recommend 3DS Max. You can get a free trial after filling out a short survey: http://usa.autodesk.com/adsk/servlet...12&id=13571450 Last edited by Mnemo: 01-13-2010 at 10:57 PM. |
|
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|