Bilateral Grid Source Code

Current Version is: 0.1 (10/22/2007)

System Requirements

This code has been tested on Windows XP SP2 (32-bit) and Windows Vista (64-bit running as a 32-bit process). One alpha tester managed to compile and run it under Fedora Core 6. It should run on any GPU from the NVIDIA GeForce 8 series and has been tested on the GeForce 8800 GTX and the mobile GeForce 8600M GT on the MacBook Pro. I have not tested it under any AMD hardware.

Compilation Instructions

List of external dependencies

Being a GPU application that also has a GUI, we unfortunately depend on quite a few external libraries. I will try to release a version that depends on only GLUT, GLEW, and Cg in the future. We use the following:

Installing external dependencies

  1. Visual Studio and Cg are straightforward to install.
  2. Qt
    1. The open source version of Qt is only supported by Trolltech under MinGW. To build it using Visual Studio, please follow the instructions below. Trolltech also offers a free license for Academic Users that comes with a very nice installer, documentation, and examples for Windows.
    2. First, download the Open Source Windows version of Qt 4.3.1. Make sure it's the open source one and not the binary MinGW one.
    3. Next, follow these instructions to compile it using Visual Studio. When running qconfigure.bat, please use the following options:
    4. qconfigure.bat msvc2005 -debug-and-release -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg
  3. ffmpeg
    1. We use an "unofficial Windows" build of ffmpeg that can be found here.
    2. Download ffmpeg-r9017-include.tar.bz2 and ffmpeg-r9017-lshared-win32.tar.bz2.
    3. Those are all you'll need to programmatically access ffmpeg. If the page is down, please email me and I will provide a copy.
  4. msinttypes
    1. It can be found here
    2. We used r19.
  5. GLEW
    1. It can be found here. Just download the Windows binaries.
  6. libcgt
    1. libcgt is my static library of "computer graphics tools".
    2. Binaries are here
    3. Sources are here

Library Paths

  1. INCLUDE path (defined by the environment variable INCLUDE)

    1. If Qt was built correctly, qmake automatically knows how to #include Qt.
    2. Put glew.h and wglew.h in a directory called "GL" and put its parent in the include path so that it can be included using "#include <GL/glew.h>". For example, I have glew.h under C:\work\include\GL
    3. Similarly, for cg.h and cgGL.h, add the parent of the containing directory in the include path. I reference them using "#include Cg/cg.h".
    4. ffmpeg-r9017-include.tar.bz2 has a single directory inside called "include", which contains a single directory named "ffmpeg". Extract it so that the parent of "ffmpeg" is in the include path. For example, I have it set up as C:\work\include\ffmpeg. The absolute path for swscale.h would be "C:\work\include\ffmpeg\swscale.h". It's referenced as "#include <ffmpeg/swscale.h>".
    5. For msinttypes, put the directory that contains inttypes.h and stdint.h in your include path. It's referenced as "#include <inttypes.h>"
    6. For libcgt, put the contents of "include" in your include path. Vector3f.h is referenced as "#include <vecmath/Vector3f.h>"

  2. Library path (defined by the environment variable LIB)

    1. Library paths are easier. Just ensure that the directories that contain the .lib files from all the dependencies are in your library path.

  3. DLL path (defined by the environment variable PATH)

    1. Make sure all the DLLs from all the dependencies are either in your PATH or copied to the current directory.

Compiling libbilagrid and libcgt

libbilagrid and libcgt both use Qt and are built using qmake. qmake is a fantastic build tool that generates either Makefiles or Visual Studio Projects.

Running the tests

libbilagrid operates by parsing a Directed Acyclic Graph of GPU kernels specified in an XML file and pulling data at the output node. The input data is read from the "data" directory. The data files I used for our SIGGRAPH paper are located: here. I have a few batch files set up to get everything started. More graphs and batch files will be forthcoming (along with the associated data).

Email me if you have any problems!

License

Copyright (c) 2007 Jiawen Chen, Sylvain Paris, Fredo Durand

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.