Graphics Programs Reference
In-Depth Information
Testing the Texture
Creating Seamless Textures with GIMP
To create a seamless texture, the edges of the image
must align with one another, and the features of the
image must continue smoothly across the bound-
ary. It helps to make sure that the texture doesn't
have features that repeat too obviously when tiled
(large, distinctive features are easily noticed when
they repeat often). We also want to make the image
square so that we won't have to scale an object's UV
coordinates when applying the seamless texture.
To create a seamless rock texture for the stone
blocks of the walls and floors, I began with a rock
texture from CGTextures. First, I increased the size
of the image to make it square with Image 4 Canvas
Size. Next, I used Layer 4 Add Alpha Channel to give
the layer a transparent background, which we'll fill
shortly, and Layer 4 Layer to Image Size to match the
size of the layer to the image.
Now we have to fill in the remainder of the
image and make its edges align with each other. To
do this, I used the Offset tool and the Resynthesize
filter. First, I offset the image by 50 percent on the
x - and y -axes (Layers 4 Transform 4 Offset), choos-
ing the x/2 y/2 option and clicking Offset. This
shifted the image and repeated it, placing the edges
against one another, as shown in Figure 11-23 at .
The new edges now matched up because they were
in the middle of the image previously.
To fix the areas where the edges met, I used
GIMP's Resynthesize feature to fill selected areas
seamlessly. To create a selection, I used GIMP's
Quick Mask feature ( ctrl -Q) to paint my selec-
tion directly with GIMP's paint tools. Areas painted
white are selected, while areas painted black are
unselected. While working in Quick Mask mode,
an image will be highlighted in red, but selected
areas will appear as normal. I pressed ctrl -Q to
enable quick masking and roughly painted a white
stripe down the seams where the image edges met,
and filled in the gap left in the middle. Then, I
pressed ctrl -Q again to convert my quick mask to
a selection.
Next, I used Filters 4 Map 4 Resynthesize to fill
the selected area. I turned on Make Horizontally
Tileable and Make Vertically Tileable, and kept the
texture source as the current layer. After running
the filter, I offset the image again by a different
amount (a third in each direction) and resynthe-
sized any remaining problem areas. The result is
the texture shown on the right of Figure 11-23 at .
This texture will now tile seamlessly.
To test the texture, create a duplicate of the image
in GIMP ( ctrl -D) and scale it way down (for exam-
ple, to 512×512). Then, use Filters 4 Map 4 Tile
to create a tiled version of the texture. If any areas
show obvious repeats, remove them by going back to
the full-size texture and selecting and resynthesizing
any trouble spots. Once you're happy with how the
texture tiles, save it as a .tga file.
To test your texture in Blender, select an object
and then assign the image to it in the UV Texture
editor. Switch to Text u red V iew por t shading and
set the shading type to Multitexture in the display
panel of the Properties region so that you can see
the image assigned to the object. You may need to
scale the UVs up or down or tweak the texture a bit
to get the best results.
Creating Additional Textures
I repeated the process for producing a seamless tex-
ture to create a second rock texture, a bark texture
for the trees, and a dirt texture for the ground, as
you can see in Figure 11-24. I also created specular
maps using the same techniques to modify and
supplement the diffuse maps that I used for the Bat
Creature. For the bark texture, I didn't make the
texture square since I would be wrapping it around
the trunk of the tree. Instead, I opted for a narrow,
tall texture. This results in a more efficient use of
texture space, as the texture will repeat often along
the length of the tree while only once around the
circumference of the trunk.
To make different textures—like the two
rock textures—work better together, you can use
GIMP's Hue-Saturation and Curves tools. By adjust-
ing the hue and saturation of an image, you can
make the overall coloration of one texture more
similar to the other, and by using the Curves tool,
you can brighten or darken the image to make the
range of values of the two textures more similar.
For example, the two rock textures in Figure 11-24
initially had quite different colors and levels of
brightness, but I adjusted them to make them look
more similar. This makes it much easier to blend
these two textures later on when creating further
textures and materials.
Texturing the Ground and Trees
To create textures for the ground and the trees in
my scene, I made heavy use of Blender's Project
Search WWH ::




Custom Search