soft-edged, regular, or irregular as needed.
However, many other functions do not work well
with this method, because the blending that is
performed to hide the edges can cause artifacts
to crop up that can disrupt the shape and flow
of the texture or create obvious patterns that
stand out.
This method tends to work best when
performed manually, as a post-process pass
performed by an artist, with an eye toward
explicitly blending and modifying regions
in order to enhance the final result from an
artistic standpoint. Figure 1 demonstrates
this technique. In Figure 1A, you see a texture
mapped from a function and offset by half.
Figure 1B shows another texture mapped from
the same function, not offset. In 1C there’s a
sample mask that can be used for blending,
which takes into account where the edges are
in the offset texture. And finally, 1D shows the
final texture after blending. Greater care taken
in mask creation can serve to eliminate many
of the artifacts you see in 1D, primarily around
the apexes of the mask. Unfortunately, this
method requires additional development time
for the creation of an appropriate mask texture
or function.
Weighted Regional Blend
Figure 1: A tex ture created by blending an offset texture with a non-offset texture using a mask.
I’ll discuss two commonly used techniques
that utilize blending of different layers. The first
involves offsetting a layer of the texture and
blending it with another layer using a mask. The
second entails blending four regions of the noise
function together using a weighted blend. I’ll
also touch on a final technique which involves a
procedure for producing the seamless mapping
as a product of a domain transformation applied
to a higher-dimensionality variant of the noise
function, in order to avoid the artifacts produced
by blending.
Mask creation is performed so that the
artifacts caused by superimposing the regions
onto the wrapped image are minimized,
otherwise inappropriate visual defects may
occur. For certain functions, this method works
well. The mask may be created sharp-edged,
¶ Another commonly used algorithm for
computing tiling 2D noise samples four different
locations within a region of the function, spaced
according to the dimensions of the output
texture, then uses weighting or interpolation
to blend between these values to obtain the
final output value. To visualize this in operation,
imagine a 2x2 block of regions sitting within the
domain of the function to be mapped, as in the
left side of Figure 2.
Offset and Blend
¶ This method of seamless mapping
requires the creation of two separate layers
of noise from the function, and offsetting one
of the layers by half the image dimensions in
each direction, wrapping the image around
so that the seams appear inside the image
while the edges of the images tile perfectly.
Then a blend operation is performed, which in
effect snips out regions of the non-wrapped
image and overlays them onto the wrapped
image in such a manner that the interior
seams are hidden.
Figure 2: A texture created by
blending four points sampled from
a region t wice the size of the final
texture. The blue dots correspond to
the blue dot in the final output.
game developer | august 2011 8