Rock Textures Creation

From Valve Developer Community
Revision as of 01:16, 21 April 2006 by Brad Newsom (talk | contribs)

Jump to: navigation, search

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.

Requirements

The Tutorial

Finding the Right Texture for the Job

There are two ways of getting this step done. One is by searching for a texture using any image search, then checking to see if its publicly available and free to use, unless you get special rights to the image.
REMEMBER: You must make sure that the image you choose give you the right to use it freely. If not, the original owner can bring on legal actions to your project.

OR

You can check out the Free texture resources here on VDC to download a texture pack or hand pick a good seamless dirt texture from the links.


For tutorial purposes we will use this one:
Right Click to Copy or Save to Hard Drive
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'.

Screen1.jpg
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'.

Screen2.jpg
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'.

Screen3.jpg
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:
Screen4.jpg
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:
Screen5.jpg
Now you got a reasonable rock texture bumpmap, go to 'Filters', then 'nvTools', then 'NormalMapFilter'. Now set all the settings to the following image.
Screen6.jpg

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:

"LightmappedGeneric"
{
"$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, hdr, and added the texture onto a cliff-side terrain map at 1.00x1.00 texture size. Here is the outcome:
Screen7.jpg