A tutorial showing the usefulness of HLMV
A N00b's Guide to HLMV
Okay, so you've got your model compiled and it works in game. But you keep restarting CS:S or whatever so that you can look in it and see if there are any bugs and re-compiling. This takes a lot of time but you don't know if there are any other options...
Well, fortunately there is!!
HLMV is actually a very useful program for modelers, especially when making new character models. However, sometimes even the pros don't know how to use it properly. S-Low, the German skin modeler, saw preview screens of one of my models from HLMV and was all like how the heck did you do that? So, I will now impart my knowledge to the rest of you. :)
So, let's get started. For this tutorial I will use my Sailor Pluto model. If you want to get her to follow along she's in the Server Side Players category here on FPSB in the Outer Senshi pack. However, just about any model will work. Once you install her or the model you want to see, open it up in HLMV. It should look something like this:

As you can see, this isn't particularly useful. However, there are some good options in front of you already. You can display hitboxes or a background, etc. For this I'll be using the Ground, Background, Specular, and Shadow options. Also, you probably figured out that you can rotate your view by dragging in the view window. Well, you can also hold shift, then left click to drag the model around. Right clicking will let you zoom in and out, and control + left click gives you the option to change the angle of the sun. So, right now I'm going to set my view up how I like it, then click on the Sequence tab. Most cool stuff happens under Sequence.

Okay, so now our view is set up properly and we're on the Sequence tab. On the left is 5 drop-downs. These stack animations onto eachother starting with the top, and moving down. So, set the first one to Run_lower. It should look like this:

This is pretty basic. It will let you see roughly how the character would be posed in game, but doesn't give us many options. However, I'm about to explain that stacking bit which should help you out a lot. But first, we need a weapon. Well, we don't like NEED one, but it will make it cooler. So, hit File -> Load Weapon... I'm going to use weapons/wrifm4a1.mdl

Now that we have the gun loaded, it's onto animation stacking. This will let us do some cool stuff. Anyway, the animations have an order. I might be wrong, but trial and error has told me it goes like primary activity -> body offset -> hand position -> aim -> secondary activity. This is where the primary activity is like running, crouching, walking, etc and secondary activity is like shooting or reloading or something.
So, with the M4 selected, stack all the animations like in the next screenshot. You should see the character hold the M4 a little more accurately now as well. Don't forget to turn the dials all the way to the right, except for on shooting. (It gets annoying if they are constantly firing.)

With all the animations set properly, you're ready to see exactly how the model will look in game doing a number of things. But first I would like to point out the little dial at the bottom I highlighted with the circle around it. This one controls the speed of the animations. Full right is 100%, left is slower. Full left is a sort of pause, so you can use that to look for minor details while the model is in motion.
Now, to set up motions, look at the right of HLMV. You'll see moveyaw, movepitch, etc... moveyaw doesn't do anything from my experience, so just ignore it. But the others are useful. movex will make the character run forewards or backwards, movey will do left or right. Then the bodypitch will let them look up or down while body_yaw is left or right. In this way you can do combos with these animations to see how the model looks while doing something in particular.

So, here's Sailor Pluto running forewards while strafing right, but looking towards her left. Note: With the movey and movex you must always set them to 1, 0, or -1 or else they won't give accurate representations of how the model is moving. bodypitch and bodyyaw are different and can be used all the way or in smaller amounts.
Anyway, now you know almost everything about how to control the models animations. This can let you pinpoint problems with the model without having to constantly restart CS:S as you re-compile the model to get it right. :)
HLMV has some other useful features though so let's take a look at them.
First-off, under the Model tab you can select to preview different skins. This isn't so useful for player models, but can come in handy if you are working on static props.
Then, there are the attachments. They let you see where something can be attached to the model.

Here I have selected the forward attachment. This one corresponds to the center of the head, looking forwards. But you can also check out other ones like primary, which is where the gun is attached to your characters back. Rotating that in the .qc can put it upside down to make your model look cooler. The red line is the direction that the attachment is pointing. And with a final picture:

This is the n_gun attachment. This is a custom attachment I encourage everyone to add to their models. You just put this line of code in your .qc:
$attachment "ngun" "ValveBiped.Bip01R_Hand" -0.00 0.00 0.00 rotate -0.00 -0.00 0.00

It goes after the rest of the attachments, but before the $bonemerge lines. What this does is creates a right-hand attachment point to your model. This is very useful for scripters who are writing plugins for Source Mod. Since models don't typically have an attachment here, for CS:S they must often use the forward attachment to attach things where the players are looking. However this creates a problem of it being stuck to the model's head, not gun. So, with the ngun point, scripters are now free to write attachments for things like flame throwers and rocket launchers which actually look half-decent, instead of coming from the player's face. (ngun will always point in the general direction that the player is looking, unless they are holding a knife or grenade. This makes it very useful.)
Anyway, that's all. Hope this helps you!!









