1. Introduction:An unfortunate side effect of compiling & recompiling GoldSrc models is that the model UVs get slightly shifted out of scale when compiled with studiomdl.exe. This can cause texture alignment problems on your newly made model or worse on an edited/recompiled model.
1. UPDATE: There is a new Studiomdl.exe that will not shift model UV's on compile and can be found here:https://gamebanana.com/tools/6236
As of this new compiler, you will no longer need to shift for new models right out of the 3D editor. However, this tutorial will still be useful for existing IMPORTED and decompiled older models that suffered shifting.
Furthermore, if you are still using mdldec.exe, ditch it for the latest version of Crowbar which supports goldsrc decompiling:
Before attempting these fixes be sure to make a backup copy of your model or SMD.
2. Method For 3DSMAX:
1) For your newly created model put a unwrap UVW modifier on it. Go to face mode, CMD-A to select all faces, then put into script box:
$.modifiers[#unwrap_uvw].unwrap2.ScaleSelectedXY 1.007 1.007 [0,1,0]
then hit enter to scale your UV's. In your viewport it may look slightly off but the nature of this fix is compensating for the downscale that happens upon compiling the model. Export your model.
For IMPORTED models, we have the challenge of fixing UV's on geometry with explicit normals. 3DSMAX tends to break these normals on editing geometry & other modifiers. In addition imported SMD's from decompiled SMD's tend to have worse shifting so a higher compensation number than 1.007 may be needed.
1) Select the editable mesh, add a "edit normals" modifier to save a snapshot of the models normals
2) then select the editable mesh again, then put your UVW unwrap modifier (you will notice the smoothing breaks, but when done the edit normals modifier above fixes it due to stack hierarchy).
3) Proceed with the shifting method as above but this time I upped the number to 1.012 instead of 1.007 (because this particular model I had was badly shifted). This code will look like this:
$.modifiers[#unwrap_uvw].unwrap2.ScaleSelectedXY 1.012 1.012 [0,1,0]
4)Now with the stack in this order select the skin and go to export and be sure to make explicitly set.
As you can see here the fix is noticeable.
3. Method For Blender:1)Go into Edit mode and open UVs view
2)Open display tab and check the "cursor location" & "normalized" boxes
3)Set the cursor location to X 0.00 Y 1.0
4)Make sure your pivot mode is set to cursor, then press "S" to scale and type in 1.007 and hit enter
4. Method For MilkShape3D
1)Select all groups, go into texture editor (Cmd-T) and press scale button.
press the S button to commit scale.
3)Repeat the same for any other textures.