ARToolkitPlus Cinderblock released

I’ve finally had a moment to release this (much better) version of ARToolkitPlus for Cinder, for both Windows and OS X.

Get it here:

The long of it (otherwise known as the “README” file that comes with it):


This is the libcinder port of ARToolkitPlus by Evan Raskob (sometimes known as pixelpusher) :: /

The code has a variety of licenses, please refer to the files themselves for their license.  The original code from ARToolkitplus  – and ARToolkit – – was released under a GPLv2 license, the new additions (few as they are) are released under the GNU Affero 3.0+ license (which is better) and/or an Apache license (where we don’t care about derivative versions).  Sorry for the confusion.
If you find this useful, please let us know! If you find bugs or have other good ideas on how to optimize this code (and there are plenty of ways) then perhaps you’d like to contribute.


This version includes some example code for tracking multiple AR markers (the venerable Hiro and Kanji) and figuring out their position on the (camera) screen and their 4 boundary points (vertices). It also includes two pre-built libraries for both Windows 7 and OS X 10.6.  It will probably work on 10.5 as well, and maybe even Win XP, who knows?  There is an XCode project and a Visual Studio 2010 project included, as well as some files gleaned from the ARToolkit and ARToolkitPlus original projects that may come in handy.


Well, there’s no real “installation” process – simply copy to your “blocks” folder in your Cinder directory, and the example projects should build and run.
There are, unfortunately, a few caveats.

For one, on Windows I decided to load all the configuration files from a “resources” folder that sites next to the executable file.  This is for flexibility, so you could swap different markers and marker config files without re-building the whole project.  Another way to do it is to package everything into the EXE itself and use loadResource() to load the data and parse it – that would require changing the guts of ARToolkitplus and isn’t impossible at all but just a slight pain.  On OS X, everything is copied into the application itself.
One side-effect of this is that if any configuration files or pattern files are missing, your application will simply crash.  D’oh!  Of course, you may want to have it fail in a more elegant fashion, but for what I was doing with this project, if it failed than it might as well crash hard because it was useless.

Your results may vary.

If you decide to poke around, the ARToolkitPlus/src/core/ has most of the code you might find useful, especially the files I changed – arGetCode.cxx and arMultiReadConfigFile.cxx.  With the old ARToolkitPlus, you could only use numberical pattern ids in the marks config file, with this version you can use file names and your own custom (original ARToolkit-style) template ids, such as in the example.

A BIG PROBLEM is that on Windows you very easily get to the maximum path length, and your app just dies.  If it crashs unexpectedly on load, it could be that your code is nestled too deep in a cosy burrow of sub-folders, try building and then copying it to a folder closer to your C: root, or even better, uncomment out my DEBUG 1 compiler define in arGetCode.cxx and your main app and use a hard-coded path while debugging.


Now, you get it all…

It doesn’t do 3D transforms, yet.  It could, but they are processing-intensive, and I didn’t need them for this project.  In fact, you may not need them either – please have a look at the two included classes to see what I’m talking about.
This version doesn’t do those numbered template markers like this version did: A future version should, or you can help out! It’s not difficult to add that functionality on, just takes time.
In fact, you’d want to do something like make a new class based on the included ARTKpMultiTracker class except with this code (you can see where it should go…)

Happy coding!


4 responses to “ARToolkitPlus Cinderblock released”

    • Ok, there was a tricky bug in the last version that could cause a crash due to deleting the marker object while it was being used by the main app – there is a new download available that solves that.

  1. Hey pixelpusher,
    Thanks for the awesome awesome cinder block.
    I was playing around trying to create my own marker/pattern.
    Can we just create it the same way we create it for ARToolKit?
    or ARToolKitPlus has its own way?

    Would appreciate a reply!


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.