Skill Level: Easy
What will you accomplish in this tutorial
In this tutorial, I'll take you through a step by step detail on how to create a rock texture, and producing a bumpmap/normal map that will bring out depth to the texture.
Finding the Right Texture for the Job
With the Internet Browser open, go to Google Images. Then in the search box, type in 'Dirt Textures'. You will be looking for a dirt texture, seamless preferably, that could be used as a rock texture. For tutorial purposes we will use this one:
Notice that it doesn't even look like a rock wall or which can be used as one. This is because for now, we don't want to use a texture that has TOO many shadows or large depth to it. In other words, we are just using a seamless ground texture.
Putting the Texture to Use
Now that we have the dirt texture we will use, please either right click it to copy, or save it to the hard drive.
Open up Photoshop. When the program has finished loading, either open up the file in which you save onto the harddrive, or go to file and click 'New', don't change anything then click 'ok', then 'Ctrl+V' or click 'Edit' at the top and click 'Paste'.
There, now the texture is in photoshop. Now we are going to export it to VTF for use with HL2. Since you should have the VTF plugin for Photoshop installed, this shouldn't be a problem. Click on 'File' then down to 'Save As'.
Change the format to VTF and save the file as 'rock_diffuse.vtf'. Save this file into your Materials folder of your mod. Then click 'Save'.
If you get an error just like the image above, then you must convert the image into RBG format. To do this, click on 'Image' at the top menu, then click 'mode' then 'RBG Color', then click ok. Now do the same step to save to VTF.
Creating the Normal Map
Now that the file has saved successfully, create a new image file with the same dimensions at the dirt image, then click 'New'. Now do everything as said in the next image:
Now that you have an image with the clouds effect applied to it, now click 'Image', then 'Adjustments', then 'Levels'. Here you can play around with the levels of the image. The left most arrow will make the darker colors darker when moved to the right. The right arrow will make light colors lighter when moved to the left. The middle will change the moderate colors to whatever direction you want (Left: Lighter, Right: Darker). By playing around with it, you may make an image looking like this, depending on how you played with the levels:
Now you got a reasonable rock texture bumpmap, go to 'Filters', then 'nvTools', then 'NormalMapFilter'. Now set all the settings to the following image.
Click 'Ok'. Now the normal map is complete. Save the file in vtf format just like we did with the diffuse map. Save it as 'rock_normal.vtf'
Putting It All Together
Now we got the diffuse and normal map finished. Now whats next? Well we need to create a vmt file which tells the game that the texture files are here. So now, open up notepad, and copy and paste the following into it:
- "$baseTexture" "rock_diffuse"
- "$bumpmap" "rock_normal"
Now save as 'rock_texture.vmt' in the same folder you save the vtf's. Now it should be useable ingame. Open up Hammer and Add the texture to a wall or a terrain surface. Enjoy!
What it looks like in the end?
I created a map with water and a low saturated grayscale post process, hrd, and added the texture onto a cliff-side terrain map at 1.00x1.00 texture size. Here is the outcome: