How To Model Modeling Help

-Drake--Drake- -dn ʎɐʍ sıɥʇ- Join Date: 2003-04-02 Member: 15125Members
<div class="IPBDescription">original author maus</div> I think this thread would be helpfull here

original author was maus

A couple of important things before we begin:

(1) Back up your files
Before downloading anything from these forums, please back up your files. Its a good idea to copy your entire Models, Sprites, and Sounds directories. The more advanced people out there might wanna do it the elegant way and create a pak0.pak with all this stuff in it. Here is Insanity~Gizmo's guide to doing just that.

If you lose a file because you forgot to back it up, first ask the nearest person to kick you in the nuts. Then DO NOT post a thread asking for the model (it just annoys everyone). Simply join a NS server. If you are missing a required file, the server will automatically send it to you. Problem solved, many flames saved.

(2) How to preview what you download
Half Life Model Viewer – lets you look at the model in windows, check out its animations, skin, any extras like jetpacks, &c. Once you have it, associate MDL files with HLMV so you can open them easily from explorer. If you've never done this before, simply double click an MDL file in explorer, select "Other" and browse to wherever you installed HLMV.
Sprite View – lets you look at sprites, naturally. Again, it's useful to associate it with sprite files like HLMV and models.

MODELLING 101

First things first: Valve's Modeling Tutorial - The definitive reference. Valve distributed this as part of the HL SDK, though it's geared towards 3DSMax users. Since many people don't bother downloading the entire SDK to get it, DarKcyde hosted the file himself. This is the single most important resource in this entire thread! Get it! RTFM!

Some quick notes:
-HalfLife models are in MDL format.
-You cannot load MDL's into Milkshape or Max, but there are model viewers that can look at (not edit) them.
-Models are composed of Reference SMD's (the mesh itself) and Animation SMD's (uh... the animations).
-Skins are 256 color (8-bit) BMP's, each with their own pallette.
-Skins have a practical maximum resolution of 512x512. These are sometimes called High-res skins.

De-Compiling Models
Before you can edit anything, you're going to need to decompile the models.

Milkshape has a built-in decompiler, but it is far from perfect. Recent versions have started using Kratisto's Decompiler, which is far superior. For those who have been around for a while, weapons don't have to be re-origined if done with Kratisto's decompiler. The nice thing about Kratisto's Decompiler is he has released it in EXE format, so decompiling is no longer tied to Milkshape alone (MAX users rejoice). Mdldec.exe is a DOS program. If you click it in windows, nothing will happen (until you set it up, see below). I suggest placing this (and other related tools) in a \bin directory in your half-life folder. For the clueless, thats C:\Sierra\Half-life\bin

---

The Decompiler and Compiler are attached to this post. If anyone wants to mirror them please do, because I don't know how long the forum keeps attachments.

Steps to take so you can right-click MDL files to decompile them:

1. Create a .BAT file in the same directory as mdldec.exe. For convenience, call it mdldec.bat. I will use example paths throughout this tutorial, you MUST make sure your paths point to where ever you put the files. You can create BAT files with notepad. Your BAT must contain these commands:
CODE
C:\Sierra\Half-life\bin\mdldec.exe %1
pause

-if you put the decompiler exe in a different location, simply point this command there instead
2. In explorer, select Tools->Folder Options, File Types tab. Scroll down to the MDL entry, which should say "Opens with HLMV" by now.
3. Click "Edit..."
4. Click "New..."
5. Action: Decompile Application: C:\Sierra\Half-life\bin\mdldec.bat
6. "OK" "OK" "OK"
7. Right-click MDL files and select Decompile to decompile them. Its a good idea to stick them in an empty subdirectory when doing this, as it can generate a LOT of files (especially player models).

Compiling Models
So you've got a shiny new model. Now you have to compile it into an MDL so you can share your creation with the rest of us. If you've got this far, I hope you've read Valve's manual, cuz I'm not gonna tell you what needs to go into a model. I will tell you how to get it compiled though.

---

Models are compiled with a program called Studiomdl.exe. Milkshape has a built-in version, but it will NOT always compile player models (they can have too many animations, though NS models are fine ... for now). Studiomdl.exe, another DOS program, is better than Milkshape so we'll go through the setup process again.

Steps to compile by right-clicking QC files:

1. Create a .BAT file in the same directory as studiomdl.exe. Studiomdl.bat works nice. Put these commands in your BAT:
CODE
C:\Sierra\Half-life\bin\studiomdl.exe %1
pause

-if you put the compiler exe in a different location, simply point this command there instead
2. In explorer, select Tools->Folder Options, File Types tab. Scroll down to the QC entry, which should say "Opens with Notepad" by now. If you don't have QC's in there yet, double click one and associate it with notepad.
3. Click "Edit..."
4. Click "New..."
5. Action: Compile Application: C:\Sierra\Half-life\bin\studiomdl.bat
6. "OK" "OK" "OK"
7. When ready to compile, simply right-click your QC in explorer.


FAQ

Q: How do I create ironsights, shoulder views, or other-wise reposition a v_model?
A: This is done by using $origin in your QC file at compile time. Place it near the top of your QC file, before the $sequences.
FORMAT: $origin X Y Z
X is left/right. Positive values move to the right.
Y is in/out. Positive values move out, away from you.
Z is up/down. Positive values move down.

Weapons decompiled with Milkshape's old tool should start with an origin of 0 -25 0, and tweak from there.

Q: What are the T models (ie. w_hmgT.mdl), and why can't I open them?
A: T models contain only the texture (skin) for the model. They are part of the same model, so don't separate them. They are created using $externaltextures in the QC. This is the only way to compile a model once it reaches a certain size (about 2 mb).

<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->[<span style='color:red'>Maus</span>]*** I've compiled these links into an easier-to-navigate bit on my website: <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->

<a href='http://members.aol.com/handhyle/101index.html' target='_blank'>Click here</a>



Modeling Tools
<a href='http://www.swissquake.ch/chumbalum-soft/' target='_blank'>milkshape 3d</a>$20 Shareware. Great HL support, can import and export SMD's. Many other formats supported, also makes a good model converter.

<a href='http://www.discreet.com/products/gmax/' target='_blank'>GMAX</a>Discreet's free version of 3D Studio Max. Does not allow exporting or plugins, but otherwise has all features of MAX R4. Can create MD3's, which can then be converted to HL using other tools.

<a href='http://www.alias.com/eng/products-services/maya/maya_ple/index.shtml' target='_blank'>Maya personal learning edition</a>Free version of Maya. Fully featured, except all renders are watermarked, and doesn't support exporting.

The Rest of the links can be found here <a href='http://www.natural-selection.org/forums/index.php?showtopic=20223' target='_blank'>in the original thread</a>

i hope this is helpfull and dont flame meh >.<

Comments

  • Nemesis_ZeroNemesis_Zero Old European Join Date: 2002-01-25 Member: 75Members, Retired Developer, NS1 Playtester, Constellation
    Thanks for the thought, Drake, but I think it makes more sense to have the original in here <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
Sign In or Register to comment.