For my 3DSaV final, I partnered up with artist/composer/designer Matt Ganucheau. We wanted to create a dynamic set of 3D shapes that would move according to our hand movements and also according to our voices.
We decided we wanted to make use of the ofBox example (for creating the 3D shapes) that is part of the beta version of openFrameworks 007. We also needed the skeleton-tracking code, particularly the “Air Accordion” example that I’ve been working with, that I’d gotten from Eric Mika. So the first step in our project required a code merging between versions. Getting openNI to work with that ofBox example was quite difficult, because there was a code/file problem with that OF 007 project example. Zach helped me troubleshoot this by copying the project file from an example that did work (the “easyCam” one) into the folder for ofBox and then renaming the project file and deleting the bad one. Kyle helped me troubleshoot the openNI part — I had to copy the library (the “lib” folder inside the “openni” folder) into the bin/data folder inside our new OF 007 project folder. The Air Accordion example uses the “ofx3dGraphics” files that Zach wrote for our class, so I had to copy the .cpp and .h files, but because OF 007 re-definitions of some functions, I had to change all references of ofPoint to ofVec3f and remove all references to ofLine and ofSphere within the ofx3dGraphics files.
Once we got our project file running in OF 007, we changed ofBox to ofSphere; removed the line width and the image texture; changed all of the variables for movement speed, cloud size, numbers of sphere, and spacing; added smoothing formulas to the movement speed and spacing; and added openGL lighting and blending. Matt brought the ofxOsc addon into the project to make use of his MaxMSP patch that allows for microphone input to be recorded and utilized in the code. Matt will cover the details of the audio code additions in his blog post and will add a cleaned-up version of the code to his github account. Here’s the zip file of the code that we used for our video documentation (because of file size limitations on this blog, I had to delete the openni folder in the bin/data folder, and the following addon folders: ofxOpenCv, ofxOpenNI, ofxOsc, ofxVectorGraphics, ofxVectorMath): MG-NZ_Final_3-30_blog