The Texturize plugin for GIMP
NEW : Texturize 2.0 (with tileable textures) released !
Welcome to the Texturize plugin webpage. This plugin works with the
GIMP (the GNU Image Manipulation
Program). Its purpose is to
generate large textures from a small
sample. It can also generate
tileable textures.
What is the texturize plugin ?
What is it good for ?
Imagine that you have an image with a small sample of a texture, like a
few strawberries (out of a plate full of them), a few square inches of
grass (from a large grassy field), or a few dozens of your cat's hairs
(your cat really has more than that). If you want to
generate a
larger texture with this small image, you could just copy-paste it,
and put the copies (or "patches") one next to another, but that wouldn't
produce a very good result, since the right (or top) part of the image
usually doesn't correspond to its left (or bottom) part, when two copies
of the image are assembled.
A few images are indeed designed to be copy-pasted one next to another
and still look natural, but the result is usually periodic and very
monotonous (it looks like wallpaper -- the one on your walls, not the
one on your computer desktop!).
The Texturize plugin allows you to get all the strawberries, the whole
grass field, or your whole cat (well, it doesn't guess you cat's shape,
but you can at least get a lot of his hairs!). Moreover, Texturize
lets you actually create tileable textures (which is great for game
design). Have a look at the
examples section to see what it looks like.
A program named "The GIMP" ? Is that a joke ?
It sure isn't! GIMP stands for "GNU Image Manipulation Program". You
probably already know Photoshop, the leader image program by Adobe.
Well, GIMP does pretty much the same as Photoshop (if you are a
Photoshop power user, you'll find that it still lacks some functions,
though). With a small difference: Photoshop costs several hundreds of
dollars, whereas GIMP costs absolutely nothing (it is "open source"
software, just like
Firefox,
Linux, or
OpenOffice.org). You can download
it for free from
www.gimp.org, for
Windows, Mac OS X or Linux. And our plugin is designed for The GIMP.
Who wrote the plugin ?
The two authors of the first version are
Emmanuel Cornet and
Jean-Baptiste
Rouquier, students in the "École normale supérieure" (ENS) in
France. This plugin is the result of a school project in a Computer
Vision class, for
Renaud
Keriven (teacher). However, its development continues even after
the class is finished.
The Texturize plugin is based on a theoretical computer science article,
called
"Graphcut
Textures: Image and Video Synthesis Using Graph Cuts",
written by
Vivek
Kwatra,
Arno
Schödl,
Irfan Essa,
Greg Turk and
Aaron Bobick.
We also borrowed a little part of our code (the graph cut part) from
Yuri
Boykov and
Vladimir
Kolmogorov.
Here
is the webpage of their article (with a link to the code).
The plugin is fully translated into French.
Download the plugin (version 2.0)
The Texturize plugin is available under the
GPL license. This, among
other things, means that you can use this program
free of charge,
for any use (including commercial), and that you are free to distribute
it to other people.
Binaries
Windows version
The Windows version of our plugin (version 2.0) is available
here. Thanks to
Michael
Schumacher for compiling our plugin for Windows !
See
here how to install it on your system.
Debian package
A Debian package (version 2.0) is available thanks to Mohammed Adnene Trojette and is
extremely popular !
We are not yet able to provide you with binaries for Mac OS X. If you
know how to compile a GIMP plugin for this system, please contact us.
Sources
You can download the Texturize 2.0 sources from
here (just choose a mirror near to you).
You can still download the sources of Texturize 1.0 here.
Texturize is also hosted on SourceForge : here.
Installation
For all systems, you should already have The GIMP (version 2.2 or
higher) installed on your computer. You can get The GIMP
here for Windows,
here for Mac OS X and
here for Unix/Linux.
Windows
After
downloading the Windows version of the
plugin, just unzip the file and put it into your GIMP plugins directory.
The plugins directory should be located at
C:\Program
Files\GIMP-2.2\lib\gimp\2.0\plugins (replace the beginning of this
path by wherever you installed the GIMP program).
Then quit The GIMP if it was open, and launch it again to let it load
the new plugin.
Linux
You need to compile and install the plugin following these steps :
- Expand the archive :
tar xvzf texturize_gimp_plugin_version_1.0.tgz
- Move to the texturize directory :
cd texturize
- Run the configure script, compile and install the plugin :
./configure && make && make install
This last command (make install) needs to be run with root
privilieges (make it sudo make install if you have
sudo installed).
If the
configure script tells you that it needs libraries that
are not yet installed (the GIMP development environment for instance),
install them first with your usual package manager then run
./configure again.
Howto
How to use the plugin
Using this plugin is pretty straightforward. Once it is installed, you
will find it in Gimp, from the "Filters" menu, then the "Map"
category.
For your first use, try not to use too large an image (200 x 200 is a
good start) and stick to the default values. Then you can ask for larger
images and higher overlaps (see the next paragraph), when you know
approximately how long the rendering is going to take.
You only need to set four parameters:
- the width of the new image you want Texturize to produce (by
default, it is equal to two times the width of the original image);
- the height of the new image;
- the amount of overlap (in pixels) between patches. The
program duplicates the original image and patches it in several places
(with quite a complicated placement strategy) on the new image. You can
ask two given patches to have only a few pixels in common, or you can
ask them to have more in common, so that the program can use a larger
area to determine where it is best to place the new pacthes. Anyway, you
only need to remember this: a larger overlap makes a better texture,
but a longer rendering time. Also compare the overlap you want
to set with the dimensions of the original image.
- whether you want the texture to be tileable or not. This means the
right side of the image corresponds to its left side, and its top side
to its bottom side, so that you can tile the image and still get natural
textures.
Once these three parameters are set, just click "OK". If you asked for a
large image, or a high overlap, you should go drink a coffee (it can
take several minutes)!
Small tips
If you want to create really large images from a small sample, it is
usually a better idea to run the Texturize plugin several times : create
a middle-sized image using the plugin, then run the plugin again on this
middle-sized image (you can even take more than two steps if you want a
really large image, but the result might not be as natural as you
could hope). See the "More tulips" and "More grass" images in the
examples section.
If you can't get a great result the first time, try to run the plugin
again, changing the parameters (including width and height) to get
a better result.
You will need a high overlap for images that have long range structures,
like "Blanket" or "Escher horses" in the
examples section.
Screenshot
Contact us
If you have any suggestions, questions, or if you would like to
contribute (by translating the plugin for other languages, or by
providing us with a Windows how-to or Mac OS X binary, for example), feel free
to send us a message at
gimp (dot) texturize (at)
gmail (dot) com.
Examples
Here are a few samples of what the Texturize plugin allows you to do.
Some of the original textures were downloaded from the
Mayang website. Some other ones were
downloaded from the
graph cut
textures article webpage. And some of them are personnal pictures.
| Title | Original | Texturized |
| Strawberries |
|
|
| Carpet |
|
|
| Fur |
|
|
| Rice |
|
|
| Pineapple |
|
|
| Greek text (well, it doesn't mean
anything anyway !) |
|
|
| Bricks |
|
|
| Grapes |
|
|
| Shiny tiles |
|
|
| Seashells |
|
|
| Etna |
|
|
| Grass |
|
|
| Snow |
|
|
| Earth |
|
|
| Tulips |
|
|
| More tulips |
|
|
| Leaves |
|
|
| Chive |
|
|
| Escher horses |
|
|
| Nuts |
|
|
| Penguins |
|
|
| Tomatoes |
|
|
| Keyboard (how'd you like that to write your next email ?) |
|
|
| Blanket |
|
|
| More grass |
|
|
| Marbles |
|
|
| Pebbles |
|
|
| Pigeons (now you'll really want to come to Paris to
visit us !) |
|
|
Tileable examples
Here are a few examples of what you can get if you check the "Tileable" box.
| Title | Original | Texturized & tileable | Tiled |
| Earth (tiled : 6 copies) |
|
|
|
| Big leaves (tiled : 6 copies) |
|
|
|
| Greek (tiled : 6 copies) |
|
|
|
Known limitations (work to do for
next versions)
- A refinement step isn't yet implemented. It would improve some
of the discontinuities in the texturized images, and decrease the
periodicity.
- When the image's brightness is not uniform, the resulting
texture doesn't look good. This could be solved by removing the
very low frequency brightness variations before applying the
algorithm. Here are a few examples of this problem :
| Title | Original | Texturized |
| Clouds |
|
|
| Drops |
|
|
| Wood |
|
|