1. The Wry Necked player model symptom (can be valid for hands too)
Link
2. The fake lack of smoothing groups (abnormal normals)
Link
3. The Tiled UV-Map problem (the UV overcome boundaries of the texture)
Link
Example pictures:
- Wry Neck symptom
- Wry Neck symptom also applies to Hands
- Abnormal Normals
- Tiled UV-Map
1. Wry Necked symptom:
Ok, so you've got your super cool hi-poly hi-shit hi-etc. model from star-wears or god knows what game and you want to convert it and rig it into a CS 1.6 suitable model.
So far so good.
After being very enthusiast about what it may be, you hit your head into first problem: The high poly count.
Ok, so you split your model into more groups, textures etc... you're all good again.
You continue, rigging your model, then compile it. Now you open the model in HLMV... SUCCESS ! ! !
Well, not really... not until you see your model in game.
Now you put your new model in the game folder and you anxiously run the game in the most desperate manner like the world's coming to an end...
Surprise! What the fuck is this ! ? ! your player model has a broken neck ! ! !
Oh noes ! ! ! how can this be happening... ? My model looks alright in HLMV. It cannot be ! This is impossible !
OK, so back to the drawing board... search for the problem, smoke some cigarettes, after hours of pain... FINALLY!
No... The problem it's still there... You're about to crack...
So here comes the Fix: Note that this problem can occur to the head and also the hands of the player models. Why ? Because the
Head and the
Hands have
bone controllers or
attachments. Do not confuse the two of them; bone controllers are one thing, attachments are a total different thing.
You are aware that your model has more then one reference meshes. You have now just took the first step into fixing the problem.
The next step is that you need to be aware that the
first mesh reference from your model (that means that it's first body reference written in the
.QC file) need to have some vertices assigned to the
head bone,
right hand bone and
left hand bone. Once you have
all these bones bounded to some vertices from the
first reference mesh then you are good to go.
Here's a reference player .QC file:
PHP Code:
/*
==============================================================================
QC script generated by Half-Life MDL Decompiler 1.2
2003, Kratisto. Based on code from Valve's HL SDK.
player.mdl
Original internal name:
"gign\gign.mdl"
==============================================================================
*/
$modelname "player.mdl"
$cd ".\"
$cdtexture ".\"
$scale 1.0
$cliptotextures
$bbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$cbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$eyeposition 0.000000 0.000000 0.000000
//reference mesh(es)
$body "studio" "reference_a" -> This is the first reference mesh in your model ! It needs to have some vertices assigned to Head/LHand/RHand bones !
$body "studio" "reference_b"
$body "studio" "reference_c"
$body "studio" "reference_d"
$body "studio" "reference_e"
$bodygroup "backpack"
{
blank
studio "defuse"
}
// 2 attachment(s)
$attachment 0 "Bip01 R Hand" 10.855000 -0.416715 1.870680
$attachment 1 "Bip01 L Hand" 10.855000 -0.416715 1.870680
// 1 bone controller(s)
$controller 4 "Bone01" ZR 0.000000 30.000000
// 21 hit box(es)
................................................
2. Abnormal Normals problem:
This is the situation where a model (player model or weapon model really doesn't matter) appears like it has no smoothing groups when in game; it looks alright in HLMV, however...
This happens when a model with
more then one texture, has at least one texture set to
additive mode.
As in the situation above, your model may have more then one reference meshes, but if it's not, it sure does have more then one group, each group being a texture.
One of the groups is mapped to the additive texture. Now contrary of the above situation fix you need to regroup the additive texture part of the mesh into a standalone reference and this reference needs to be
the last reference mesh in your model. Same thing as above, just this time the reference mesh with the additive texture needs to be
the last one.
Again a .QC file example:
PHP Code:
/*
==============================================================================
QC script generated by Half-Life MDL Decompiler 1.2
2003, Kratisto. Based on code from Valve's HL SDK.
player.mdl
Original internal name:
"gign\gign.mdl"
==============================================================================
*/
$modelname "player.mdl"
$cd ".\"
$cdtexture ".\"
$scale 1.0
$cliptotextures
$bbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$cbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$eyeposition 0.000000 0.000000 0.000000
//reference mesh(es)
$body "studio" "reference_a"
$body "studio" "reference_b"
$body "studio" "reference_c"
$body "studio" "reference_d"
$body "studio" "reference_e"
$bodygroup "backpack"
{
blank
studio "defuse"
}
$body "studio" "reference_additive" -> This needs to be your last reference mesh, the one with the additive texture !
// 2 attachment(s)
$attachment 0 "Bip01 R Hand" 10.855000 -0.416715 1.870680
$attachment 1 "Bip01 L Hand" 10.855000 -0.416715 1.870680
// 1 bone controller(s)
$controller 4 "Bone01" ZR 0.000000 30.000000
// 21 hit box(es)
................................................
3. Tiled UV-Maps
This happens due to bugs in decompilers for different model file formats or other unknown factors... When this does happen it appears to be quite hard to fix. Well, it's not. At least not in most cases.
Before attempting to make any edits to a mesh that needs to be converted make sure you won't mess with it's normals!
For this you need to go and
UNcheck the "Auto Smooth" Check Box or whatever your 3D editor has there to screw the normals.
After this has been done you can now start and fix your tiled UV-map.
Select all your model and go to
Vertex > Unweld. This will allow you to select vertices independently from the faces they belong to.
A vertex can belong to multiple faces -> so in the UV editor the same vertex will appear in multiple instances thus when you select one vertex, you forcibly select it in all it's instances. Unwelding all the vertices allows you to select every vertex without selecting it's other instances.
While the UV-map appears to be fucked-up, you will only need to select a set of tiled vertices and drag them back into the first square so to say...
locking X/Y axis one at a time can help you in the process. Most of the time, the groups of vertices have offsets just on a single axis...
I almost forgot... After all the editing process is done (that includes fixing the UV, realign textures, grouping/regrouping, etc... ) you select all your model again and weld the vertices together ->
Vertex > Weld Together
Some Modelling Tips:
- HL1 engine doesn't support textures with a pixel count greater than
512 X 512 !
- Don't use texture sizes as
768 X 384 ! Use only texture sizes that are
power of TWO, as the following:
2,
4,
8,
16,
32,
64,
128,
256,
512,
1024,
2048, etc.
For ex:
1024 X 256 or
2048 X 128
Using
768 X 384 will look the same as 512 X 256 ! So don't waste the pixels for nothing !
If you have a texture 1024 X 512 you should scale it to 512 X 512 for best quality !
- Use the default Microsoft Paint for resizing (downscaling) textures ! Believe it or not, it has the best downscaling filter quality wise !
- Do NOT use Microsoft Paint for converting the texture color depth to indexed 256 bit ! Use a dedicated Image editor as Photoimpact, Photoshop, etc...
- DO NOT clone textures ! I mean use the same texture twice with different name... If it's the case of a texture that has an additive part then cut the texture accordingly and regroup the result in two or more parts.
- Always realign UV-Maps on models you will convert or models you have decompiled for modifying before recompiling them ! You should also know that when you compile any HL/CS model the UV-Maps will be offset -1 ~ 2 pixels on X/Y axis so after you finish to realign the UV-Map you should move the entire UV-Map 1~2 pixels to the right and 1~2 pixels down.
- Use small textures for small or distant objects. Only use large textures for close objects or larger ones. If you fail to do this your models will look "pixelated" and ugly. A bigger texture doesn't always mean a better looking model.
- The correct way to get an alien format texture into a HL1 compatible texture:
a. Get your alien texture (tga/png/dds/vtf/etc.) into the appropriate converter
b. Export it as ".BMP" file type RGB True Color (24bit) bit depth
c. Now it's the proper time for the resizing (downscaling) process if necessary. (texture too big or model very small/distant in game)
There may also be cases when you need/want to cut/crop your texture into pieces...
d. Convert the "prepared" texture(s) to Optimized Indexed 256bit color depth.
- To be continued...
EDIT!
2,
4,
8,
16,
32,
64,
128,
256,
512,
1024,
2048, etc.
For ex:
1024 X 256 or
2048 X 128
^ ^ WRONG!
2,
4,
8,
16,
32,
64,
128,
256,
512.
For ex:
512 X 256 or
512 X 128
^ ^ CORRECT!
__________________