This is a project I recently created for an installation. It uses the kinect to place the user into a world that has many particles in it – and they basically interact with the particles which are also being influenced by some perlin noise.
It was a spin off of my previous project, CinderRibbons which I never finished because it was getting a little too out of hand.
For this project my goal was simple: Quads influenced by a 3d mapped human skeleton, and perlin noise
I figured that if i scaled down my previous goal, and made it something that was actually attainable i would actually be able to finish the project.
I also decided to put the project on Github, however the code inside is rather messy because as the installation deadline got closer I had to make some, ahem sacrifices. I was actually coding and changing it up until 1 minute before the performer started her dance, while my computer was already hooked up to the projector. That part was pretty frantic.
Here are some images, they are sort of in chronological order, sort of:
Initial “get something on the screen”
Creating a floor plane:
Making quads ‘rise’ from the floor plane
Now add some beautiful perlin noise (Actually this is simplex noise technically)
The view from above:
All hail the glowing cube:
User controlled gravity swarms using the kinect skeleton data mapped back into 3d space:
Project Source Code
I was really having a hard time with Xcode lately, specifically how its C++ code-completion leaves much to be desired especially if you have a very bad memory. I find myself constantly painfully looking through the header files to find the exact name/case of a function or property.
So I decided to try and see If i could get up and running with Cinder in Eclipse instead, it wasn’t too bad either !!! Just a couple of issues getting the linking right, but that was about it.
Download / Github
Xcode is a great IDE, however it is not great at C++ editing
It provides only very barebones syntax highlighting, even more barebones code completion, and no edit-time error checking.
Cinder is a great library, but it’s very vast – Without code-completion I was very lost/ nearly all the time poking through the header files and opening the .cpp files in other editors so I could learn it more thouroughly.
(Re)-Enter EclipseIDE for C++
This project is presented as is for anyone else who would like to use a C++ editor on osx that is actually aware of your classes.
From what I’ve used it so far, it is much better – but compile times are a little slower, however the time you save while editing is well worth it imo.
- Download this project
- Import into eclipse workspace (select import existing project in the ‘general’ drop down)
- In terminal browse to the projects path and create a symbolic link named ‘CINDER_PATH_LINK’ to where cinder is located
- “ln -s foo/bar CINDER_PATH_LINK”
- Where ‘foo/bar’ is the path to Cinder such as ‘~/GIT/LIBRARY/CINDER’
- [Optional] – RightClick project root, select properties
- Select C/C++ Build
- Select Settings
- Replace ‘g++’ with ‘clang++’ and ‘gcc’ with ‘clang’ for the:
- MacOS X C++ Linker
- GCC C++ Compiler
- GCC C Compiler
- [Optional] Do the same for the discovery tab
- After hitting, apply/ok and closing that window select Project->Build All and project should build successfully.
Debugger / Hitting a breakpoint
Better syntax highlighting, and code sense
Here is some stuff I’ve put together that does Skeletontracking via OpenNI on a separate thread in cinder.
This is based on some code that was posted by Sector9 on the cinder forums, and which is based on the example code that comes with the Nite module.
For some reason my skeleton is offset by some seemingly random number. I’m not sure what’s causing that if someone could take a look
In order to get this to work, you’ll need to get OpenNI working on it’s own first.
I recommend following these steps, http://c4c.posterous.com/installing-openni-kinect-drivers-and-nite-on
It’s weird porting something that was written into, c++ ported to AS3, back to C++. However If you’ve ever tried to find the C++ version of a boids class. They’re all too complicated for my needs, and i really like the way @soulwire ‘s version works so I started porting it into C++. Based largely on my iOS port of the same class.
BoidTrailTest from mario gonzalez on Vimeo.
float boidMaxSpeed = 100;
float boidMaxForce = 25;
_boid = new Boid( boidMaxSpeed, boidMaxForce );
_boid->setPosition( _target.x, _target.y, _target.z );
// Set wander properties
_boid->setWanderRadius( 75.0f );
_boid->setWanderMaxTurningSpeed( M_PI / 32 ); //
_boid->setWanderLookAheadDistance( 300 );
_boid->wander( 0.3f );
_boid->seek( _mousePositionXYZ, 0.8f );
One Day It Will Make
One Day from mario gonzalez on Vimeo.
I’m very happy to share a new painting application I have created for OSX called RibbonPaint
Continue reading Ribbon Paint