FaceOSC is an application by Kyle McDonald that transmits face landmark geometries over OSC. There are a wide variety of clients (Processing, openFrameworks, etc.) which can receive this data for further artistic play.
To get started, download the following:
- FaceOSC for OSX or Windows (2016 version, 1.1+)
- OSCp5 library (enables Processing to receive OSC data)
- Template FaceOSC projects for Processing
(Download by clicking on the green button on Github).
Then:
- To receive OSC messages from FaceOSC, you will need to install the oscP5 Processing library by Andreas Schegel. This can be done with Processing's "Add Library" tool, instructions for which can be found here. If you don't install this, nothing will work! Install OscP5 into your Processing "libraries" folder. You'll need to restart Processing after installing the library.
- Windows users, it's possible that you may also need to install the following system components, in order for the FaceOSC application to work properly:
- You'll need a camera on your computer. Run the FaceOSC app and keep it open. If it sees your face, it should start transmitting data to whichever app is listening.
- If you can't get the camera to work, or if you'd like to create a puppet driven by a character from a movie file, then please note that FaceOSC (for Mac OSX) can use a locally-stored movie file instead of the camera. Instructions for this are in the README file that accompanies the FaceOSC download.
- Open and work on FaceOSCReceiver.pde (inside the boldfaced FaceOSC download zip linked at the top) or, preferably, a duplicate of it. When your sketch is running it should automatically communicate with FaceOSC.
Here's some additional info you might find helpful:
- Here's the FaceOSC message format specification:
https://github.com/kylemcdonald/ofxFaceTracker/wiki/Osc-message-specification - The FaceOSCReceiver is quite simplistic. Don't forget that FaceOSC is also transmitting things like 3D rotations!
- Here's an older (2014) OSX version of FaceOSC, in case you encounter any problems:
FaceOSC for OSX. - Rebecca Fiebrink maintains a forked version of the Mac OSX FaceOSC and Processing template which is specially modified to work with the Wekinator, her machine-learning toolkit.
In case you're interested, here's the code for my interactive face-controlled box (which also comes in the download zip):
import oscP5.*; OscP5 oscP5; int found; PVector poseOrientation = new PVector(); //---------------------------------- void setup() { size(640, 480, OPENGL); oscP5 = new OscP5(this, 8338); oscP5.plug(this, "found", "/found"); oscP5.plug(this, "poseOrientation", "/pose/orientation"); } //---------------------------------- void draw() { background (180); strokeWeight (3); noFill(); if (found > 0) { pushMatrix(); translate (width/2, height/2, 0); rotateY (0 - poseOrientation.y); rotateX (0 - poseOrientation.x); rotateZ ( poseOrientation.z); box (200, 250, 200); popMatrix(); } } //---------------------------------- public void found (int i) { found = i; } public void poseOrientation(float x, float y, float z) { poseOrientation.set(x, y, z); } |