Adobe Photoshop or any other similar program
Notepad++ or any other text editor
Basic knowledge of Adobe Photoshop or any other image manipulation software, like resizing, copying and pasting of image etc
Okayyyy.. lets do it.
I am just going to assume that you have an image file which you want to convert to CS texture. But before we hit the gas, make sure to check that this image file can be served when tiled and that patterns are not out of alignment. I will show it next anyways. For the sake of this tutorial, you can use the image below.
I am also going to assume from now on that you are using photoshop, the tweaks i do in PS, you can do it in your program is different, like resizing etc
TWEAKING in PHOTOSHOP
- Open Photoshop (or the program of your liking) and open the image and open the image.
- We are going to make a texture of 256x256px, it can be of any size though, but make sure it is something like 128x128, 256x256, 512x512 etc
- We have to resize this image first, so just press Alt++Ctrl+i to open resize dialog and write 256 in both width and height and press OK
- Now next step is to make sure that this texture will just work fine when tiled, so we will do it manually. Copy this image and While still in photoshop, press Ctrl+N to open new document of 1000x1000 px.
- Paste the image in this new window and make 3 copies of this image layer. Press Ctrl+J two times to make copies.
- Now we will select each layer and put them on sides and bottom of first image. Refer to images below
- In the images above, we now see that the patters just sit fine, there are no gaps, no unaligned surfaces, this means we are good to go.
- Go back to original image which we had resized to 256x256 and save it as JPG with any name that you want. I saved it as wallbrick01.jpg.
- Close Photoshop.
CREATING THE NORMALS MAP
- Now that we have the texture file saved, we need to make its normals map first.
- Open CrazyBump and open the saved image. "Open > Open Photograph from File".
- CrazyBump will process the image for a second or two and will give you two options to select from the height maps, choose the one which you see is correct in vision.
- After you have selected the option, you will be presented with the initial map file in bluish pinkish colors. You can see different other tabs at the bottom but they are not our concern atm, we need to consider the normals map look with the option on the left side. You can adjust the slider to change the normals map to your liking, but I will leave it to default as it usually always is correct.
- Save it as desripted in the images below (Save Normals to File) and save it with name wallbrick01_normal.jpg
- Now we have a normals map created and its time to convert these both to VTF format.
CREATING VTF FILES
- Open VTFEdit.
- press Ctrl+i to open image import dialog and open the wallbrick01.jpg image first.
- After processing it will give you the settings dialog, we pretty much do not need to change anything in it but its better to keep both Normal Format and Alpha Format to DXT5. Press Ok to complete the settings
- Save this image as wallbrick01.vtf
- Now repeat the procedure.
- Import wallbrick01_normal.jpg and in settings dialog, select BGR888 in Normal Format and press OK. The Alpha Format doesn't matter at this point since we do not have any transparency in our image or that our image doesn't have an alpha channel to process
- After the image open, check the box which says "Normal Map". Now save it as wallbrick01_normal.vtf.
- Now that we have both files, its time to build it vmt file. Do not close the VTFEdit yet
CREATING VMT FILE for TEXTURESClick on Tools > Create VMT File to open its dialog.
In the dialog, Click on ... beside Base Texture 1 and select the image wallbrick01.vtf
At the bottom, beside Normal Map: click the dots to open and select wallbrick01_normal.vtf.
Now in the same dialog, at the top, click on Options tab and in Surface 1 list, select Brick. (If your texture is stone, you can select Rock, or if it is floor tile, you can select tile or "Wood_Panel" if its if wood floor etc. Different surface props generate their according sounds when walked over and act differently when fired at with bullet)
Click OK to save it as wallbrick01.vmt.
CAUTIONWe have to change the path in vmt file because VTFEdit simply writes the path of the folder it is present into atm.
Open Notepad++ or text editor and open wallbrick01.vmt file in it. Just remove the text highlighted in red and save the file, also, refer to the images below in other case.
We now have completed the texture creation for the brick image and place all these three files, that is
wallbrick01.vtf, wallbrick01_normal.vtf and wallbrick01.vmt
together in cstrike/materials/my_material folder.
You can now see this texture in hammer and in game, you will see the normals map creating depth in flat texture.
Thanks for reading, if you see something not correct or that if something can be improved in tutorial, please do notify in comment and I will update.
I wrote all this word to word, please do rate if you think its a valuable addition to the community.