stuff growing and crawling - Venations - HDK version

I know, it's time to move on, enough with this growing and crawling stuff, but ... I just can't ! It's too much fun to see those tentacles growing and reaching out drawing crazy shapes in the virtual space. The problem with the previous version was that ... the algorithm is quite heavy because it relies upon two nested loops (for each seed, search for the closest root) : it was too slow.
So I decided it was about time to learn a bit of HDK and implement a prototype in C++.
This version is about 30 times faster and allows a real time feedback for way more complex structures than the OTL version.
In this video I am illustrating how to use this SOP node to create a simple tree and in the second part of the video , how to paint venations on a polygonal head.


Venation System - HDK version - demo from Alessandro Pepe on Vimeo.

Reference:
The venation algorithm is based on this paper by Adam Runions.


HDK Learning Notes - quick start on Linux

(tested on Linux - CentOS 6.4 and Ubuntu 13.04)

Install compiler and libraries (as mentioned here)

(CENTOS)
$ sudo yum install tcsh gcc-c++ mesa-libGL-devel mesa-libGLU-devel Xi-devel
(if yum cannot find Xi-devel, try libXi-devel)
 
(UBUNTU)
$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



OpenVDB

If you plan to use OpenVDB you've to install the OpenVDB headers , cause they are not shipped with Houdini (12.5.xxx) 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:

error:

io/Compression.cc:35:18: error: zlib.h: No such file or directory
fix:
  • edit the file /openvdb/io/Compression.cc
  •  change the line
    from
    #include <zlib.h>
    to
    #include </opt/hfs12.5.371/toolkit/include/zlib/zlib.h>

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

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

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


Featured Post

Cigarette Smoke - Part 3 - Houdini 19

Since a lot of people are asking me about this setup I thought it would be a good idea to update the setup for H19. The logic is pretty much...

Most Popular