Post tutorial RSS UV Chopping for model textures

So Half-Life 1 is now 20+ years old. Yet I do believe it's pretty much still alive. The community is still working on custom mods and a lot of new content (maps, models, sounds etc are still produced). When we speak about models however there are some limitations. For example the texture size limits. In the below tutorial I will show you a technique I call "UV Chopping". This allows you to preserve the original quality of the large textures let's say a texture of size 1024x1024 or bigger.

Posted by on - Intermediate Textures

So let's peal about textures in Half-Life 1.

The engine (and the compiler) does not support high-resolution textures.

Below you can find the typical list of supported size for the textures.

1024x256; 768x384; 512x512; 512x384; 512x256; 256x256; 256x128; 128x128; 128x64; 64x64

So let's say you have original model that uses 102x1024 or 2048x2048 textures...
and you decide to compile it for Half-Life 1... The only way is to downscale the textures, thus losing quality...

Now that would be a shame...

Still there is a hope for you. In the below tutorial, I will show you a technique I call "UV Chopping".
This will allow you to retain the quality of the hi-resolution textures in Half-Life 1.

I plan to do a follow up tutorial, where I will show you how to "hack" / "swap" bones of already rigged models and to adjust the models to "fit-in" the new skeleton. (Probably I will use the mode I will be UV chopping for this tutorial)

What will be required:

1. A model and textures (I will use the Leet model and the texture from CSS for this example)
2. MilkShape 3D 1.7.8 (you can use any other model editing program that convenient for you )
3. PhotoFiltre Studio X 10.12.1 (again you can use any other texture editing software);

Note: I like PhotoFiltre since it's quite easy, light and intuitive to use.

So let start.

Disclaimer: This tutorial will not show you how to port models from Source engine, in other words I'm not going to show you how to decompile the HL2 mdl, vtf etc files.
If you decide to reproduce it you're more than welcome to acquire the models yourself, assuming you have parched the game.

Texture UV Chopping Tutorial for Half-Life 1 Engine

1. Assuming you have your model, load the model in MilkShape 3d. Note: From now on I will reference the MilkShape 3D as MS3D.

UV Chopping Tutorial

Make sure that when loading the model you have no check on "Auto Smooth" (located in "Groups" section). If you have it ticked you'll break the smoothing groups when you start to edit the model... and that's a pain to fix later (not that's impossible, but still why making our life hard...)

2. Load the texture in PhotoFiltre. I have 2 textures 1 that's 128x64 (we can live with that...) and 1 that's 1024x1024.

UV Chopping Tutorial

For that texture if you look closely we see that we can "crop" it to 5 or 6 pieces:

- pants
- arm + bags
- jacket
- face
- mix

The possibilities are many. It's basically up to you to decide and to fit your needs. I will chop the texture in 6 (in the end we'll have 7 textures for the model).

UV Chopping Tutorial

3. Go back to MS3D, go to "Groups" tab and select all the groups you have (I have 2); after this go to "Window" > "Texture Coordinate Editor" (or press CTRL + T)
We will work in the texture coordinate editor and in the main window for the MS3D.

My advise would be to also to change the projection to "Front" and the rendering to "Wireframe".

(click on the blue background and "Right" click to open the menu.)

You should see something like this:

UV Chopping Tutorial

UV Chopping Tutorial

4. Go to "Edit" > "Refresh Textures" - this will allow us to move different parts of the model (vertex by vertex)

UV Chopping Tutorial

5. Go back to the "Texture Coordinate Editor" and click on "Select" button. No select only the "pants" part of the texture you see.

UV Chopping Tutorial

You should be able to see that only those vertexes are selected.

UV Chopping Tutorial

6. Go back to MS3D - the selection looks strange does it not? That since we have only some parts selected now.

UV Chopping Tutorial

Go to the "Model" section d click the "Move" button. You can move by hand... but then later on you'll have to bring back the moved part to the original place... so I prefer to set a value for the move, and then to reverse the value.

Note: I moved ony on the "X" scale and used increment of 10. to get the model back I'll need to move again on "X" with increment of "-10" (4 times 10 to be exact)

7. Go to the "Model" section again and click the "Select" button. Click on the "Face" button and put a tick in "By Vertex" box.

UV Chopping Tutorial

This is needed to select only the parts of the model that we'll regroup.

8. After you have selected the desired part, go to the "Groups" section and click on the "Regroup" button.
This will create a new group.

UV Chopping Tutorial

Note: It's important to properly name your new group. If you leave it like this the model will not be compilable.

So in my case I will call it "t_leet_legs.bmp" - the ".bmp" part is also mandatory. After you have put your new name, hit the "Rename" button.

UV Chopping Tutorial

9. OK you have your new group, but the texture is still the old one of size 1024x1024. Let's fix that.

Go to PhotoFiltre; select the pants part of the texture with the selection tool and crop it out. OK now I have a new texture with around 512x512 size. (yeah you'll probably need to re-scale it; but it's not the same as downscaling 1024x1024 to 512x512 )

UV Chopping Tutorial

10. Go back to MS3D, make sure only the new group is selected. Go to "Materials" tab and create a new material. Click on the "New" button name your new material "t_leet_legs.bmp" - the ".bmp" part is also mandatory.

UV Chopping Tutorial

After you have created your new material click on the top button called "<none>" this will open a dialog box to select the texture file for the material.
point to our new texture. Select "Open".

UV Chopping Tutorial

Now you have the texture set for that material. Click on the "Assign" button. Congrats the model part has a new texture applied.
Now you only need to correct the texture coordinates.

11. Go back to texture coordinate editor. Select your new material and you'll see that the UV coordinates are looking strange.
Lets fix that. Go and click on the "Scale" button and use the mouse to scale up the UVs and to move them at the correct position.

UV Chopping Tutorial

Look here, that's more like it.

UV Chopping Tutorial

12. Minimize the "Texture Coordinate Editor" and go to MS3D window. Select the new group and go to the "Model" tab. Click on the "Move" button and put the "X" value to "-10". Move the group until it goes to it's original position (in my case that would be 4 times the value used)

UV Chopping Tutorial

UV Chopping Tutorial

13. OK... now do the same for all other parts of the model. I will leave that part for you and in the next few screenshots I will show you the end result.

Useful Tip: You can select the groups you already "UV Chopped" and click on the "Hide" button. That will help a lot in order not to accidentally select and move or delete something you should not have to selected.

14. The final result is below. I have a model that uses 7 textures instead of 2. Furthermore the quality of the original big 1024x1024 texture is preserved trough the technique I just showed you how to use.

So the original texture plus the new 6 UV Chopped textures.

UV Chopping Tutorial

Wireframe view of our UV Chopped model. :)

UV Chopping Tutorial

UV Chopping Tutorial

Happy Modding! In the next tutorial I will show you how to use this UV Chopped model am make it to replace the "Barney" or "Hgrunt" monster in Half-Life.

If you have any suggestions or feedback I will appreciate your feedback below.

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.