Wednesday, June 12, 2013

HDK Learning Notes - quick start on Linux

(tested on Linux - CentOS 6.4 and Ubuntu 13.04)

Install compiler and libraries (as mentioned here)

$ sudo yum install tcsh gcc-c++ mesa-libGL-devel mesa-libGLU-devel Xi-devel
(if yum cannot find Xi-devel, try libXi-devel)
$sudo apt-get libgl-dev libglu-dev libxi-dev

To initialize houdini environment variables and commands:

$ cd /opt/hfs12.5.371/
$ source houdini_setup
The Houdini 12.5.371 environment has been initialized.

Now you'll be able to use the command houdini, houdinifx, hcustom, etc.
The command hcustom is a little wrapper to g++ that will take care of searching for houdini sdk headers and linking with the correct libraries:

$ hcustom SOP_mynode.C

... if we need OpenVDB (see below for installing OpenVDB headers)

$ hcustom -I /tmp/OpenVDB/include/

When you try to compile the first time you might get this error:

/usr/bin/ld: cannot find -lXi

which might be related to the fact yum wasn't able to install the library Xi-devel in the first step. In that happens, try this:

sudo yum install libXi-devel


If you plan to use OpenVDB you've to install the OpenVDB headers , cause they are not shipped with Houdini ( so far. 
Download the library and unzip it somewhere (for instance in /home/$USER/Download).

$ cd /home/alex/Download/openvdb
$ make clean
$ make install

... this will install the libraries into /tmp/OpenVDB

You might get the following errors:


io/ error: zlib.h: No such file or directory
  • edit the file /openvdb/io/
  •  change the line
    #include <zlib.h>
    #include </opt/hfs12.5.371/toolkit/include/zlib/zlib.h>

cmd/openvdb_view/Viewer.h:50:21: error: GL/glfw.h: No such file or directory
  • edit the file /openvdb/Makefile
  •  search for line starting with

    and remove vdb_view (it's on the same line of "install :")

/bin/bash: doxygen: command not found
  • $ sudo yum install doxygen

No comments :

Post a Comment