Creating a seamlessly tiling image

From LightWiki

Jump to: navigation, search


Contents

Creating a seamlessly tiling image map

When texturing an item, image maps provide a far more realistic method of texturing than procedurals. However, procedurals have the advantage of seamlessly covering your whole surface without any indication that they are tiled. We'll start with a simple image map for the colour channel and then go on to describe how you can conceal its tiled nature.

Get your image

First find an image to use. Make sure that it isn't too small or too big – the rough guide is that it should be no bigger or smaller than twice its size on the screen, i.e. when you render, the maximum size for something that takes up the whole of a 640 x 480 render should be no bigger than 1280 x 1024. (Point for pedants: I know that is actually four times the size. Deal with it). For our tutorial, we are using one of the images from NewTek's freely downloadable image library as our example. You can find all these images at: http://www.newtek.com/freestuff/textures-001.php.

Let's make it seamless

Load the image into your image editor, and make use of a function that has been variously called roll, offset, wrap, pan or tile. The idea is that you can "wrap" the image around, as though it were wrapped around a soft drink can and you rotated the can so that you could see the seam. We are going to use Aura, NewTek's excellent video paint package for this tutorial, so anyone with that app will be able to follow the pictures just as easily as the text.

Panning the image

In the Filters > Basic menu you will find the Panning filter. Select this and change the Pan X value. I've set it to 800 because I have an image that's 1600 wide and panning the image around halfway gives you plenty of space to work either side.


Photoshop users will find a similar tool called Offset in Filters > Other > Offset. The controls for this are straightforward, simply type in the number of pixels you want to offset the image, and make sure that "undefined areas" is set to "wrap around".
Photoshop Offset filter
Photoshop Offset filter

Using the Panto tool

If you use the standard airbrush tool in Aura and set the mode to Panto (F4), you will be ready to start smudging the seam and thus repairing it for use in LightWave. You need to also open the Shape Settings window so that you can set the offset that the Panto tool will use. In the Shape settings window click on the Panto Set button and then click the mouse button whence you would like to take wood grain. Don't let the mouse button go but move the mouse to where you want it copied to and start painting. You'll see the original detail disappear as it gets replaced with the area you are copying from. Pay careful attention to the edges of the planks. You'll notice that the planks are somewhat warped and bend down in the middle, which is why the ends don't match up properly. You'll need to fudge the ends well enough to cover this up. Make sure that when you are smudging the areas you don't do them all in the same place, otherwise you will still have an image with a seam on it, albeit not as noticeable as before. The Panto tool in Aura is also known as the Clone Brush, Stamp Brush, Clone Stamp and Pantograph tool in other packages. Although the way you set up an offset will differ, the overall methodology should remain the same.

Keep going

The Panto tool will take you some time to master. Don't be afraid, it needs a minimum of artistic talent and by Pantoing details like knots you can be sure you are concealing areas on the original picture with details that looked untiled.

Now roll the image vertically

Once you have finished editing your vertical seam, it's time to roll the image again, this time vertically to expose the horizontal seam. Again, since the image is 1200 pixels high, I have rolled it 600 to get the seam in the middle of the image.

Pantoing the horizontal seam

As you can see, the seam means that the middle plank (the one with the seam running through it) is actually fatter than the others. There's not a lot that can be done about that, apart from making a brand new seamless image from the detail in this image, which may not be a bad idea as you'll see later. Even so, we'll persevere with this and make sure that the image is seamless.

Putting it back the way it was

This is a completely optional step, but if you now pan the image -800 horizontally and –600 vertically, the image will be back in the starting position, but with a seamless edge now. Unless you look very carefully, you can't see the difference between the two!

Into LightWave!

I've loaded a nice shed model made by Mark McClean Hall for the purposes of this exercise. Now, we're only looking at the plank texture on the end of the shed, but you can see with the standard image, the seams are visible, running vertically to the left of the door.

Going seamless

Replace the image used with the one that you've edited and the result is instantly more appealing. In both shots, the planks had already been lined up with the modelled planks on the shed and a diffuse map added to emphasis the dents.

Getting clever

If you carry on adding layers to the colour part of the texture for this surface you can conceal some of the repeating details with procedural textures that don't repeat, covering up the fact that the image map does. Here we've used the smoky procedural in dull brown and a gradient in the same colour to make the repeats less obvious.

Too clever by half...

The only trouble with leaving those shadows on the original image map (remember? We discussed this back in step 7) is the fact that even though we now have a light shining on this side of the shed, we still have those dark shadowed areas, where there should be none! The only way around this is to get rid of the shadow areas on the original image and the best way to do that is to create a fresh image with planks separated by detail stolen from the original image. At least that way you can make sure you have straight planks (unlike the side of our shed in the renders, which looks very obvious) and an easily repeating map, but it's more work... :)
Views
Personal tools