Creating textures from real life photography

Nikola Drincic
nik@childplaystudio.com
www.childplaystudio.com

This tutorial will address the creation of textures from real life photography. Do not get me wrong, I've seen great textures that are painted from scratch but I think that much faster way of creating textures is from real life photography.

Camera

First, lets start from camera selection. There are all sort of cameras that you can pick nowadays, but my recommendation is any Digital Camera.

I am not saying that digital cameras are better then the ones that uses film, but they are just more convenient and faster to work with. Especially if you are starting to play with textures. Actually the best way to preserve photography is to use film, but we are just going to shot the picture and download it to computer for additional painting, so why spending time and money on films, scanners, film development...

And if you are buying digital camera, any camera from 2megapixels and up is ok and try to pick one that has a famous brand name. I've tried all sorts of cameras and ones that come with the name are usually better. Even ones that have a brand name but do not have any additional program adjustments beside automatic ones. I know that you all are waiting for same names so... Nikon Coolpix series can be pretty useful and not expensive. What you get when shooting photos with low quality camera are often images out of focus, not the right color /tend to be greenish/ a lot of sparkles all over the image, etc.

 


image taken with non brand camera

image shot with brand name camera
When to take photos

The best time to take photos of surfaces is during the day when sky is all over covered with grayish clouds. Sun is too strong when directly shining on to the surface so layer of clouds act like filter and area light. When taking photos we need soft light, soft or no shadows at all, basically everything different then the photo below.


image of the day covered with clouds
When Sun shines directly to the surface photo will have bright areas and dark shadows, that we do not need when making textures. Two images below will show what I am talking about. Both photos are taken at the same place, just that left one is shot on a sunny day and right one on cloudy day. Both images are converted to black and white so the difference can be seen easier /color can be distraction here/. You can clearly see that right has less disturbing shadows and that left on is more three dimensional.

image of texture taken on sunny day

image of texture taken on a cloudy day
Where to take photos
Depends on the size of the texture map you need, you should stand closer of far away from the surface you are taking picture of, but try to avoid any obstacles in between (electric posts, cars, people...) that you will have to remove later from the photo. Try to stand in front or above the surface and to have clear picture as possible.
  • Try to avoid surfaces that are at the border between shadow and light parts.
  • Try not to use flash. You will get parts of the photo that are too much illuminated and other that are too dark.
  • Try not to take photos of surfaces that are inside of a tunnel. Light in tunnels comes from the side and photos will always have left or right side lighter then the middle.
  • Try not to take photos of curved surfaces.
  • Try not to take photos of reflective surfaces like parquet floor, treated wood, plastic, etc.

 

 


light and shadow


reflective surfaces are always too bright in some parts

photo taken in tunnel like passage
How to take photos
The most important thing is that your camera is stable when taking the shot.
Using tripod is always a smart thing, but the problem is that you do not have it all the time by yourself. Useful thing is to use your own body:

When standing, try to spread your legs so you are in stable position. If you are taking photo of a vertical surface /wall/ put both of your elbows on to the stomach, wide as you can, while holding camera and use your head as third support. If you are taking photo of the horizontal surface /floor, ground/, spread your legs a little bit wider, you do not want to have a top of your shoe in the corner of the photo, lean both of your elbows beside your chests, do not breath :) and take a shot.

When you want to be closer to the ground or lower parts of the wall, try to kneel with one leg while other is supported with the foot. So you are supported at three points /foot, knee, foot/.

Those small LCD displays on digital cameras are great, because they show you small size pictures. And a lot of times you can not see the difference in parts of the photo if you are looking it in big screen. At the image on the right dark areas around the photo are sometimes difficult to spot when image is seen in big size.
Another useful thing is to use Timer. Place your camera, set the timer, zoom and press the On button. Now just step beside and wait for the camera to finish with the shooting. In this way you do no touch camera while the photo is taken and avoid shaking.  
Working with Photoshop
So after we are satisfied with the photos, its time for some additional work, for example in Photoshop. I know that a lot of you use other painting software then Photoshop, so I will try to explain these in most general way that I can.
Making seamless tiling texture map

First, open the photo. Then we should check the size of it. By now you should probably know what is the size of the texture map you need. But what ever that size be, the width and height should be even numbers, like 1600x1200 pixels or 1024x768 pixels so you can easily divide them by 2. If for instance one dimension is odd number like 1201 pixels it can not be divided in half (600+600) its 600+601.

So why is this? Because we can create texture map for one particular object (house wall with all the dirt painted and ...) and that map can probably be used only for that object or you can create a map that can be seamlessly tiled and that can be used many times. Ok the first method is much more better and gives more realistic results.. but when you have seamlessly tiled map, you can also use it to texture specific parts of the model that needs additional map painting. So for making seamless tiled texture maps we need width and height that are even numbers, because of the offset filter we are going to use.

Offset Filter will allow us to modify the edges of the photo.

So adjust the size and go to Filters>Other>Offset and fill the fields with the amount that is equal to the half of the width and height of the image. If the images is 1600x1200 then you should put 800 in horizontal and 600 pixels in vertical field. Be sure that Wrap Around option is checked.

So what this Offset filter does, is that cuts photo by the middle in horizontal and in vertical and arrange those 4 parts so the edges of the photo are now at the middle of the photo (image below).

Now its time to paint those edge connections that are visible so they become invisible and everything is just one flat surface.


original photo


after offset filter is applied

edge are marked with green lines

The best results to paint edges is to use Clone Stamp Tool. Take source for cloning from the middle of one of four parts and apply it to edge connection. To take the source press and hold Alt and click at source point.

There is no particular size of the Clone Stamp you should use. Just try different sizes that are around 10th of the size of the image height. Sometimes is useful to try to adjust opacity of the tool. But this is all up to you.

 


source and where to apply it

This is the end result after Clone Stamp Tool work.

Now, what is left is to apply again Offset filter with the same numbers for horizontal and vertical as first time, to return the image in original position. That is why we adjusted the size of the image at the beginning(size of width and height to even numbers).

Now we have a texture map that is seamlessly tiled in every direction.


some parts of the image are repeating and that is not good
Another thing you can use instead of Clone Stamp Tool is to copy parts of the photo and paste it on the edges connection. Edges of the pasted parts of the image can be soften by using Erase Tool with opacity set to 50%.
Making matching bump map

Now when we have texture map we will create a matching bump map very easy. For example, creating bump map for the reddish texture map above we just have to convert the existing file to black and white and adjust brightness and contrast a little bit.

To convert image to black and white go to Image>Mode>Grayscale

What we have now is grayscale version of our texture map. Depends on the kind of surface we want to get, brightness and contrast can be adjusted.

Go to Image>Adjustments>Brightness/Contrast, and try to move values up and down. For the image below right I decrease brightness a little bit and increase contrast. Image below is much more detailed than the one above, again it depends on your needs what are you going to do.

Other two useful tools are Burn Tool and Dodge Tool. Burn tool will increase the darkness on the areas that its applied and Dodge Tool will do the opposite, increase the brightness.

For example, image below 01 is just stone tiles photo converted to black and white. To make a useful bump map out of it you will need to make stone cubes brighten and ground between stones much darker.

Start with Burn Tool. Size of the Burn Tool will be a little bigger then width of the area between two stones. Or just try what suits you the best. Exposure is put to 52%. And now go over each line between stones and Image number 02 should be the result. It can be clearly seen that space between stones is much darker, what means that those parts of the surface will be deeper.

Then you can use Dodge Tool to make brighter stones. Adjust the size of Dodge Tool a little bit smaller then the average stone size. Set the exposure to around 75% and go over the stones. Result is Image 03. Difference is very noticeable comparing to Image 01.

At the end, the best way to check what you've done is actually to put it in use. Open your favorite 3d software, make a plane object and apply material with texture maps created. Tile maps at least 2 times in x and y direction. connection should be seamless.

 

Feedback will be greatly appreciated.
E-mail the author

© Nikola Drincic 2006 - All rights reserved.

Back to ChildPlayStudio Home Page