User:Mr. Magoolachub/HLMV Stuff

From Team Fortress Wiki
< User:Mr. Magoolachub
Revision as of 10:38, 23 August 2011 by Mr. Magoolachub (talk | contribs) (Loading more than one 'Weapon' in HLMV: Minor correction.)
Jump to: navigation, search

So I noticed there wasn't all too much documentation or resources surrounding HLMV, and while taking images there were many thing that I didn't know how to do that I had to bumble through and figure out for myself. This page will serve as an ongoing list of stuff that I've figured out how to do so that you don't have to.

Setting up HLMV

This one I thankfully didn't have to walk through on my own, you can find out everything you need to know right here: Template:Painted_variants/Tutorial#Setting_up_HLMV

Moving Around in HLMV

  • Left-click in the center of the circle to rotate the model.
  • Left-click at or around the edge of the circle to tilt the camera.
  • Right-click to zoom in and out.
  • Shift + Left-Click to pan the camera.
  • Ctrl + Left-Click to adjust the lighting.

Ubercharged Weapons

So you need to have that minigun ubered for a picture, but you don't know how? No worries, I've got you covered:

       "$basetexture"	      "effects/red"
       <dx90
       {
                              "$bumpmap" "water/dx80_tfwater001_normal"
       }
       "$bumpmap" "water/tfwater001_normal"
       "$envmap" "effects/invun_red"
       "$surfaceprop" "metal"
       "$halflambert" "1"
  
       "$selfillum" "1"
       "$selfIllumFresnel" "1"
       "$selfIllumFresnelMinMaxExp" "[0 18 13]" // 0.0 1.0 1.0 is the default
  
       "$invulnlevel" "1"
       "$invulnexponent" "1"
       "$invulnfmax" "18"
       "$invulnscale" "0"
       "$invulnphong" "1"
  
       "$half" "0.5"
  
       "$invulnphongfading" "0"
       "$invulnphongfull" "1"
       "$invulnphongoutput" "1" 
  
       "$invulnexponentfading" "1"
       "$invulnexponentfull" "13"
       "$invulnexponentoutput" "1"
  
       "$invulnfmaxfading" "-31"
       "$invulnfmaxfull" "18"
       "$invulnfmaxoutput" "1"

Copy and paste that block of code, comment out any existing conflicting values (e.g. place // in front of the existing "$basetexture"), press f5 in model viewer and you should now have yourself a red (or blu) hot glowing piece of Ubercharged weaponry.

Painting Hats takes Ages

You're correct, it does! Changing the values and then pressing f5, taking a screenshot, pasting and editing each photo takes forever. Fortunately for you, I found a slightly quicker way.

  1. When pasting the screenshot in Photoshop (sorry any other image editor users), instead of creating a new image for each paint, instead, just continuously paste each screenshot on to a new layer of the same image.
  2. Now, crop your image to not include anything other than the model and the background (don't try to be precise, photoshop can do this for us later, leave a wide area of background around your model).
  3. Put all your layers in to a new group
  4. On any of the layers, now use the Magic Wand tool to select the background, and use Refine Edge twice (I like to use the values Radius: 0, Smooth: 1, Feather: 0.2, Contrast: 0 and Shift Edge 0, make sure to leave Smart Radius and Decontaminate Colors unchecked).
  5. Now, invert the selection and select the Group (as opposed to the individual layer), then press the "Add Layer Mask" button. You should see the background of your image become transparent.
  6. Crop the image to just around the borders of the model, allow Photoshop's automatic snapping to assist you.
  7. File>Scripts>Export Layers to Files with file type png-24, transparency and trim layers ticked. Set your directory and prefix to whatever, and click Run. This will take a while, so just do something else while Photoshop works.
  8. You're done! Optionally, you can choose to rename your images with a more descriptive name than their layer number, I like to use gX_Y_<Z_>name (where X is the group the image belongs to (based off the painted variants table), Y is it's position in the group, Z is the team colour (r or b where applicable), and name is the name of the paint (feel free to shorten, I use "badpink" for Color No. 216-190-216 and "pants" for The Color of a Gentlemann's Business Pants))

Rotation Values

I've been slipped up by the registry's rotation values before, sometimes it doesn't save the values until you load another model, so it's best to close HLMV or open another model before taking note of your Rot, Trans and lightrot values.

Posing All-Class Hats which have Animation sequences

Hats like the Alien Swarm Parasite are annoying, they store the individual character poses in animation sequences rather than any form of unencrypted file or separate .mdl files (like the Mann Co. Cap). Theoretically, it should be possible to decompile the model, change the animation sequences so say the Heavy sequences values replace the idle sequences values, however no current mdl decompiler can seem to decompile the models without borking the animation sequences, so this is a give up and go home situation for now unless you want to use some tricky photoshopping.

Loading more than one 'Weapon' in HLMV

So you want to load both the shotgun AND the Tyrant's Helm? "Too bad," says HLMV "you're gonna have to photoshop that shit." Not anymore! By using the registry, you can load two weapons on to a model. To continue with the above example, if I wanted to load both the Shotgun and the Tyrant's Helm on to the soldier, I would open the Registry, navigate to HKEY_CURRENT_USER>Software>Valve>hlmv>models.player.soldier.mdl then change merge0 and merge1 to "models\weapons\w_models\w_shotgun.mdl" and "models\player\items\soldier\soldier_viking.mdl". Now, after loading up the Soldier model in HLMV, bam, he's got his classy hat on AND he's holding the shotgun. There are 4 merge entries, so you can do this for 4 weapons.

Note: Do not try to alter registry values for a model while you currently have that model open, it won't work, load up a different model and then alter the values.