Introducing a new an easy way to create a single high-resolution Linux desktop using multiple projectors. Anyone can achieve this with the following easy-to-use tools:
lt-align: the LightTwist projector alignment tool is a simple point-and-click interface that lets the user specify a single projection area with multiple overlapping projectors and generate distortion and blending maps.
lt-compiz-plugin: A plugin for Compiz 0.9x that warps and blends the output of your projectors using the deformation maps produced by lt-align, creating one single seamless high resolution desktop area.
The LightTwist projector alignment tool and compiz plugin have a few dependencies which must be met. It has been developed on Ubuntu 11.04 which includes Compiz 0.9 in its distribution.
The plugin cannot be used with Compiz versions prior to 0.9x.
Ubuntu 11.04 users can simply execute the following command:
sudo apt-get install subversion cmake cmake-curses-gui libpng12-dev\ libnetpbm10-dev libavcodec-dev libavformat-dev libavutil-dev\ libswscale-dev libcv-dev libcvaux-dev libhighgui-dev libfftw3-dev\ libopenscenegraph-dev libboost-dev libboost-serialization-dev\ compiz-dev compizconfig-settings-manager xsltproc
For earlier releases of Ubuntu and other distributions, you can get the latest version of Compiz on their website: www.compiz.org
Downloads and installation
IMGU is our extensive image manipulation library, which is used in both the plugin and the projector alignment tool.
First, checkout the source using subversion:
svn co https://svn3d.iro.umontreal.ca/svn/imgu/devel imgu
then go to the newly created directory and build the library:
cd imgu cmake . make sudo make install
Download, compile and install lt-align:
mkdir ~/svn3d cd ~/svn3d svn co https://svn3d.iro.umontreal.ca/svn/vision3d/lt-align cd lt-align cmake . make sudo make install
Download, compile and install lt-compiz-plugin (Compiz plugins cannot be built from the base directory. You must create a ‘build’ directory and compile from there):
mkdir ~/svn3d cd ~/svn3d svn co https://svn3d.iro.umontreal.ca/svn/vision3d/lt-compiz-plugin cd lt-compiz-plugin mkdir build cd build cmake .. make make install ## no sudo! it will be installed ## in .compiz-1/ in your home directory
How to use lt-align
command line options
$lt-align -h LightTwist projector alignment tool Version 0.1 Usage: -h Displays this help message -screen<n> <x0> <y0> <width> <height> Defines a screen and its dimensions -o <filename> Saves setup to file -i <filename> Loads setup from file (overrides -screen args) no arguments Uses Xinerama to initialize all screens
<PageUp> or <PageDn> : Cycle through all overlaps. Pairs of projectors will become blue. When no projector pair is selected, you may define/adjust the four white crosshairs defining your desired projection area.
<space> Deselect current projector pair, so you can edit your desired projection area (white crosshairs).
Keys <1> and <2>: Select which of the two screens of the current overlap you wish to define/modify points.
Arrow keys: subpixel adjustment.
<s>: Save setup and generate distortion maps.
1 – Define the desired projection area:
Make sure no projector pair is selected (press <space>).
Click on the four full screen corners (left top, right top, right bottom, left bottom)
2 – Specifiy matching points for each projector overlap
First, press <PageDn> to select the first projector pair. If they do not overlap on the projection surface, continue cycling with <PageDn>. When you have selected a pair of projectors that do overlap, click on 4 points in the first screen WITHIN the overlapping zone.
Then press <2> to select the second projector of the overlap pair. Now, click on the same 4 points, but in the second screen. Be as precise as you can. The crosshairs with 2 circles should be together. Since the crosshairs and lines in the first screen are red, and green in the second screen, the crosshairs and lines will turn yellow if they are well aligned.
You may make sub-pixel adjustments to a crosshair’s positions with the arrow keys while the mouse points hovers over it.
Do this for every pair of overlapping projectors, until lines appear connecting the 4 white crosshairs defining your desired projection area.
When you are satisfied with your alignment, press <s> to save your setup and generate your distortion maps.
You may now use those maps with the LightTwist Compiz plugin
How to use lt-compiz-plugin
First of all you must manually restart compiz un a terminal:
compiz --replace ccp
The default Ubuntu installation does not include the ‘ccp’ option when launching Compiz at startup. Without the ‘ccp’ option, Compiz will not load the LightTwist plugin at all. Until that is fixed, you will have to manually restart Compiz every time you want to use th plugin.
Enabling the plugin
Start the CompizConfig Settings manager from the System>Preference menu, or start it from a terminal by typing ‘ccsm’.
Go to the Utility section, to the Mouse Position Polling and set the Mouse Poll Interval to 1 (default value is 40)
Go to Effects section. Enable the lighttwist plugin
Locate the fragment shader : set it to
<your home directory>/.compiz-1/lighttwist/data/deform.frag
Leave the vertex shader field empty.
Now enter the distortion maps and parameters for each screen:
In the Edit window:
Lut: select the lut_<n>.png file generated for each projector
Blend : (leave empty)
Blend embeded : checked
Proj num : set it to the projector number <n>
Gamma : set to 1 initially. You may adjust it to your liking afterwards
Your settings should look something like this:
And now you are ready to activate the LightTwist Compiz plugin! Simply use the following hot keys:
<shift>F9 : activate/deactivate plugin
<shift>F7 : activate/deactivate deformation
… and enjoy!