Wednesday, September 11, 2013

Creating a seamless texture


September 11th, 2013

If you do any 3D work you will eventually find yourself needing to add your own textures. For these textures to work well in your 3D environment they will need to be seamless. Fortunately this is not difficult to do.

My tutorial does require you to have photoshop. I will try to keep it simple and not skip any steps.

Step 1 : take your photo. This is an image take from the Hennepin Avenue Bridge in Minneapolis. It is surprisingly difficult to find spots to get overhead shots of streets and grass.


I am going to focus on creating a semi-dead grass texture from this image. Here is my selection:


If I expand my image to have 4 copies of it you can see the seam issue. We need to eliminate these seams.


Fortunately Photoshop has the perfect filter for the job. It is called the offset filter. What it does is takes the corner of the image and moves it towards the center.


Our objective is to move the corner exactly into the center. To do this you need to look at the current size of your image and divide it by 2. My image was 1562x1562 pixels. I need to move the corner 781 pixels down and the right.


This shows you what happened:

The center of your image is now the edge and the edges are now running horizontally and vertically into the center. Now you just need to fix the center area to not have a seam and you are good.

We are going to use the clone tool:


Update (July 22nd, 2014): ------------------------------------------
I've built a lot of seamless textures since I did this posting and one thing is very important: Use a hard clone, not a soft/blurred clone. 

Sometimes if the image has a lot of lighting transitions I will cut it down to half size and copy it vertically (transform: flip vertical) and copy it horizontally (transform: flip horizontal). Then you just need to remove the mirrored look to the image which can be a lot easier than fixing the lighting differences.
---------------------------------------------------------------------------

To use the clone tool you press the alt key on top of where you want to clone from (the red circles in this image) and the left click. This will set the clone position. Then click on the area you want to clone onto and you can start cloning. You will need to experiment based on what your seam looks like


Once you are done clone out any obvious noise. In the above image I cloned out those white specs.


I always sharpen my images. The best filter to use is the smart sharpen tool.


The amount and radius will vary based on the size and make up of your image.


To get your texture to work within UDK you need to have the image be square and be a multiple of 2. I picked the closest smaller value from my image size (1024 x 1024). I may not use this size in the final game but I have kept the largest quality image I could.


Here is the final image for you:


No comments:

Post a Comment