No More Room in Hell

No More Room in Hell

57 ratings
NMRIH Viewmodel Guide
By mage and 1 collaborators
This guide only covers blender 2.7 era in specific, the 2.8 era and newer should be similar

Many of the methods shown here might deviate in other softwares, be completely different or nearly useless.
   
Award
Favorite
Favorited
Unfavorite
Tools
Blender
Source Tools
Crowbar
VTFEdit Reloaded[gamebanana.com]
GCFScape[gamebanana.com]
GIMP[www.gimp.org] or Photoshop
Glossary
  1. Mesh - The raw model without any rig or animation
  2. Rig - The skeleton of the mesh, required for animation
  3. Topology - Polygon distribution

  4. Viewmodel - A model rendered in first person view
  5. GoldSRC - Half-Life 1 engine
  6. Decompiling - The recreation of a compiled model

  7. Compilling - The packaging and optimization process of a decompiled model
  8. Rest pose - The standard "T-Pose" of the model so to speak
  9. QC file - The code of a decompiled model

  10. Diffuse - The main texture of a model
  11. Normalmap - The more complex details of a model that comes from a sculpt and is baked onto a texture
Videos


Highly recommended to use empty groups instead of automatic weights
Mesh & Topology


Mesh is the model itself without the rig and textures
  • If the arm has too many polygons, it will deform much worse in animations
  • If the arm has a good poly count it should look very good in a animation
  • If the arm is too low poly it will look hard around the edges
  • If the arm has a bad topology, expect terrible weights
Decompiling
Get a vanilla survivor viewmodel as a base. Open nmrih_dir.vpk which is located in steamapps/common/nmrih/nmrih/nmrih_dir.vpk



After opening the VPK, go to models and then arms. I'lll take hunter's viewmodel as an example



As for the custom viewmodel I'll be porting one from Cry of Fear



Start the decompiling process on both



And this is the result

Importing & Posing
IMPORT WITH THE "MAKE NEW ARMATURE OPTION"

If you ignore it, both viewmodel rigs will be merged and you won't have proper control over both




What you gotta do now is select the custom viewmodel, and use its old skeleton rig to pose it and match Hunter's arm pose. It doesn't need to be perfect. The result should be something like this


If you don't have any skeleton rig on the custom viewmodel, you have to do it manually in Edit Mode. which can be a painful process.


Hit the small guy button and then "Apply as rest pose".


There is no mistery in merging, just select both arm meshes, hit space and type join.
Now we gotta take Hunter's arms out of the picture for good, remove unused any materials as well


Now you gotta see if all of Hunter's rig bones matches with the custom viewmodel. Take your time and make sure each bone actually match with the custom arm mesh. Doesn't need to match perfectly, just do it proper


Mirror the arm model now.


Remove any shape keys.

Match the left arm's mesh to the left arm bones


How it should look like in the end


If you see any deformities, you must correct them yourself in Edit Mode or Sculpt Mode. So you better do all the corrections you can. And finally we parent Hunter's rig to the custom arm model. First select the rig, then the mesh. CTRL+P is the hotkey for parenting

Weightpainting
Weightpainting is basically giving a bone a functionality. For example the index finger bone, when you paint the area that the bone takes it will become a functional component of your rig. You should start by the shoulder bone, then proceed to paint all the other bones. Use your arm IRL as reference

Ignore bones like PSNULL, SphereGizmo and LeftElbow/RightElbow. Paint their alternatives instead: LeftElbowTwist, RightElbowTwist, LeftWrist, RightWrist.

My weightpainting areas

Start rough, everything red, and be sure to have the Auto Normalize option on

After you finish the red part, you can now start to use green, blue and cyan tones for smoothing the weights manually. Don't use the blur or the SUBTRACT tool. If a bone has taken a territory that they weren't supposed to take, select the previous bone and paint the whole part red again

My stress values:

10.000
0.800
0.550
0.250
0.100

The higher the value the more stress you put into a weight
Compiling
You can just use my .QC as reference for this one



Change what you need to such as $cdmaterials, this parameter will tell the model where the textures are located. $sequence is a important command and should be in all viewmodels, the extra sequence is for testing the model. $bodygroup is a essential command and it is the model itself, properly rigged and game ready

Make sure you have a animations folder and If there is any $definebone parameters, remove them.

After you finish everything up, hit the compile button and see if the model is working all right
Testing
Finished compiling? Let's take a look at the viewmodel



You can also enter viewmodel mode


Don't forget to check on weapons


Q & A
QUESTION 1 "How do I use the mirror modifier?"

ANSWER: Go to the modifiers tab and choose the mirror modifier. Be sure to have no shapekeys and make the mirror modifier be the first one in the list, then apply it



QUESTION 3 "How do I select everything related to a certain model? Like for example, I have mesh A merged into mesh B, I want to remove mesh A completely without affecting mesh B, how do I do that?"



ANSWER: I think you mean this situation, right?

QUESTION 4 "How do I weightpaint in X-RAY? Like, through the model and all"



ANSWER: Just disable the "Limit selection to visible" feature.

QUESTION 5 "Why cant I apply the rest pose on my viewmodel?"



ANSWER: Make sure you have selected the correct rig in the plugin.

QUESTION 6 "The old viewmodel skeleton is haunting my new viewmodel skeleton! If I remove it, my rest pose will be gone and all my work too."

ANSWER: This happens when you applied the mirror modifier too early. Bring back the old viewmodel mesh or re-import it again, then merge your custom viewmodel into it, apply empty groups again and try to delete the old rig again. (Remember, to apply empty groups you must first select the OLD viewmodel skeleton then the custom viewmodel mesh, hit CTRL+P and select empty groups.)


3 Comments
mage  [author] 29 Dec, 2022 @ 8:18am 
thanks!
8sianDude 28 Dec, 2022 @ 10:11pm 
very cool guide :steamthumbsup:
Sea-Basstian Äggbaguette 28 Nov, 2022 @ 10:53am 
Wow, thanks!