Parallel Controllable Texture Synthesis Tutorial


Uses this ... ... to generate more!


Quick links


  • The source code (+binary) TSynEx.zip . Please read carefully the included notice. In particular the part about educational and research uses only.
  • The publication (pdf), accompanying video and supplemental results are here.


Change log


  • [2009-06-22] fixed name collision with exemplar files in \bin
  • [2009-03-18] initial release


What is this about?


On this page you will find a tutorial implementation of the algorithm detailed in the SIGGRAPH 2005 paper Parallel Controllable Texture Synthesis by Sylvain Lefebvre (that's me ;-)) and Hugues Hoppe.


What is a tutorial implementation?


The original algorithm is entirely implemented on the GPU, and supports many neat features, such as a texture cache, incremental updates, drag and drop of texture features, magnification, and so on.

Hence it is quite complex. Additionally it is research code, and has the drawbacks that come with it (understand: it is quite unreadable!!). So, to make a long story short, there was no simple implementation I could give to my students so that they can get a good understanding of the algorithm.

I decided it was about time to produce such a code, and chose to make a 'small and clean' implementation of the algorithm on the CPU. There are many things left out, including many important optimizations, so don't hope for blazing fast performance. Nonetheless it has all the basic elements in place, supports multi-threading, and the synthesis quality is more than reasonable.

Please cite our publication if you use this code, or part of it, in your research work.


Ok, so where do I start?


First, download the source code (+binary) TSynEx.zip .

There is a '.bat' file which will directly launch texture synthesis using the included binary file.

The code source and VisualC++ 2005 project are in the code sub-directory.


I found a bug!


Please fix it and send me your changes ;-)


I only have Linux


Sorry but the code will not compile directly under Linux. There are several issues: Thread calls will not compile, as well as the library I am using for loading images and tons of other things. I am more or less planning to work on this, but the conversion from VisualC++ to gcc is not direct (gcc is more strict and I have been working with VC++ for a very long time now).

So, I strongly recommend using VC++ 2005 or 2008 to compile this code.


ANN


ANN (Approximate Nearest Neighbor Searching) is a great library. I have been using it in many projects and never had a problem with it. However, it does not support multi-threading because it uses a set of global variables during recursive calls. In order to implement the multi-threaded analysis I had to slightly modify the ANN library. My modified version: tsANN.zip .