The
Texture application was a secret application I created at Fractal Design for creating paper textures and for testing out new technologies. But it fell into disrepair, and so it hasn't worked since 1996. But I have been resurrecting it under Mac OS X, and it is just now starting to come back to life. In part 1, I explained what
speckles are. They are a basic area of technology used by Texture. Here in part 2, I will give you an overview of another area:
FFTs.
The Spatial and Frequency Domains

For instance, the FFT window has a section for the spatial domain and another section for the frequency domain. The
spatial domain is the one in which we can open and save textures. The
frequency domain is used for applying sophisticated filters and other operations to.
You can apply filters to the frequency domain, and see the filtered result in the spatial domain in real time.
But, you may be asking yourself, what is an FFT? An FFT is a
Fast Fourier Transform: a fast way of transforming spatially-varying information into its frequency-domain equivalent and back again.
Above you see a diagram of the process. Texture information is imported into the spatial domain. A forwards transform converts that data (using an FFT) into frequency data in the frequency domain. Also, a backwards transform converts the frequency domain data back to the spatial domain (also using an FFT). In the window above, you see the
True-Lizard texture and its frequency-domain representation.
The frequency domain is organized so that the center of the square has the
bias of the data (you can think of that as the average of all the pixels into just one gray level). Around it are a small number of pixels corresponding to the biggest wavelengths. The farther you go out from the center, the smaller the wavelength of the corresponding spatial data. It's kind of like an inside-out representation of the texture.
Operating in the frequency domain has several advantages. You can easily filter the data to create different versions of it that are constrained to a limited number of wavelengths.
Another basic advantage of the FFT in particular is that it works
really well with wrap-around data. It's just
made to work with tiling textures.
All of the outputs of the FFT are tiling textures by definition! And, generally, they are powers of two in length, so most of the textures you see here are 256 x 256. But you can easily construct 512 x 512 and 1024 x 1024 textures, and larger. Well, there are some constraints, but these properties do make FFTs ideal for processing wrap-around tiling textures.
So, how do you filter in the frequency domain? Convolution is the best way. And that works by multiplying in the frequency domain. You can multiply two frequency domain FFTs to convolve their textures. Or you can just multiply by a spot function.
Here is the spot function window. You can define the size, hole size, the softness of the edge, and you can even define spots that are elongated and at different angles.
In this case, I have dialed up a small spot, and in the frequency domain section, I have checked
Filtered and so when I adjust the spot, I can see the spatial domain image change in real time.

This is particularly cool, and this also means that I can turn the lizard texture into a leopard-skin texture with just a slider-move.
You see that the texture closely resembles the original. The spot with a hole in it makes a bandpass filter that limits the spatial frequencies of the texture, but totally preserves its wrap-around quality.
Another thing that works easily in the frequency domain is the creation of fractals. In fact, I have a
Make Fractal button in the frequency section.
In the frequency domain this means creating a 1/f frequency spectrum, and randomizing the phase. You can also use the
Make button in the spatial domain section to make a spot and then randomize its phase in the frequency domain section.
Either way, this creates a perfect wrap-around fractal, which you see here. To get different fractals, just randomize its phase. Filter a fractal, and you can limit its spatial frequencies. This means you can make it appear to be composed of several smaller clouds instead of one large cloud.
Here is the result of filtering it using a
highpass filter (where the inside of the spot is black and the outside of the spot is all white to the edge).
The remarkable thing is that it's the
same fractal. You can see some of the features are still in the filtered result. Really the only difference is that the slowest-varying features are removed from the fractal.
Now that's cool!
The neat thing about fractals is that they also can make excellent paper grains.
When I filter this same fractal using a highpass filter so that only the smallest features get through, I end up with a pretty good paper texture just like that.
So, you can see how I can create a large number of paper textures with grains of arbitrary size and softness from one pattern. And remember, all I have to do is randomize the phase in the frequency domain, and I have another one just as good as the previous one, but with entirely different features.

I was quite clever in the Fractal Design days, but it appears that I am actually much more clever now because I have considerably more knowledge of the frequency domain. You see, it all makes much more sense to me now than it did then.
For instance, now I have arranged it so I can adjust a slider to change the filter and thus the look of the texture in real time. I couldn't do that before.
So part of the fun is that I am using Cocoa on Mac OS X to make the UI work. And it's much faster to write that now. And part of it is that computers
are a bit faster than they used to be. Maybe about 100 times faster, and with
multiple cores too. And
GPUs to get things to run
really fast. That's what I do for a living now.
Which is why Texture is coming up to speed at an amazing pace, considering how long it has been since it worked.
Anyway, back to the frequency domain.
So, I cal also construct a
lowpass filter. By making a spot that's white on the inside and black on the outside, and using that to filter he frequency domain. This allows me to create softer versions of something. Which can be quite useful.

For instance, I can load an existing texture,
thick-knit. This texture was made using an interesting technology for one of the future parts of the Texture posts. That technology was called
slice-and-dice, although it was based on crossfades made of Voronoi cells on a tile.
It made for quite complex programming, but it produced some of the more interesting textures I produced.
This texture has a lot of tiny details, and if I apply a subtle lowpass filter to the details, I get a slightly different result. Because I can change the edge softness of the spot, I can also control how hard or soft the lowpass filter's edge is. This is extremely useful in achieving specific visual looks.

In this case, a very natural blur is imparted. But with none of the ringiness of a Gaussian blur.
Real or Imaginary?
The FFT operates on complex-valued data. This means that each pixel consists of two floating-point numbers: the real part and the imaginary part. Each complex number is of the form:
a + bi
where
i represents the square root of -1. That's how I can alter the phase of the information independently. When I say that the phase is randomized, I mean that, in the frequency domain, I have to convert the complex number (a,b) into a polar coordinates (R, theta), put a random value into the phase angle theta, and finally convert it back to Cartesian coordinates.

When I'm all done with the operation, and I've transformed it back to the spatial domain, then the real value becomes the texture value.
So, when I randomize the phase of the low passed thick-knit pattern, I get the texture you see to the right. It's kind of like a shag carpet. But some of the features, like the tilt of the texture come through. This is called
anisotropic texture, which means that it favors some angles. Like the original think-knit texture.
Texture Synthesis From Geometry
In Part 1, I showed how speckles can be used to create cellular patterns called Voronoi tesselations, tree-like patterns called spanning trees, and now I have mentioned crossfade sets.
Here is a diagram for how these work together with textures to create even more textures.
In the next part, I will show how crossfade sets can generate the most interesting patterns by reference through the cellular arrangements derived from speckles.