Emotional.Bubbles

Page 1



Get Facial Data from faceOSC import oscP5.*; OscP5 oscP5; // num faces found int found; // gesture float mouthHeight; float mouthWidth; float eyeLeft; float eyeRight; float eyebrowLeft; float eyebrowRight; float jaw; float nostrils; oscP5 = new OscP5(this, 8338); oscP5.plug(this, “found”, “/found”); oscP5.plug(this, “poseScale”, “/pose/scale”); oscP5.plug(this, “posePosition”, “/pose/position”); oscP5.plug(this, “poseOrientation”, “/pose/orientation”); oscP5.plug(this, “mouthWidthReceived”, “/gesture/ mouth/width”); oscP5.plug(this, “mouthHeightReceived”, “/gesture/ mouth/height”); oscP5.plug(this, “eyeLeftReceived”, “/gesture/eye/ left”); oscP5.plug(this, “eyeRightReceived”, “/gesture/eye/ right”); oscP5.plug(this, “eyebrowLeftReceived”, “/gesture/ eyebrow/left”); oscP5.plug(this, “eyebrowRightReceived”, “/gesture/ eyebrow/right”); oscP5.plug(this, “jawReceived”, “/gesture/jaw”); oscP5.plug(this, “nostrilsReceived”, “/gesture/nostrils”);


Facial Interaction if (right eye == wink){ bubbles turn blue; } if (red eye == wink){ bubbles turn red; }

if (be smile){ speed up; }else if { slow down; }

for(int i=0; i < bubbles.length; i++){ if(mouthWidth<14){ bubbles[i].X += bubbles[i].DX- random((mouthWidth-8)*2); }else{ bubbles[i].X += bubbles[i].DX+ (mouthWidth-8)*1; } bubbles[i].Y += bubbles[i].DY - (mouthWidth-8)*1.5; int d = bubbles[i].Diameter; if(bubbles[i].X < -d) bubbles[i].X = width; else if(bubbles[i].X > width+1) bubbles[i].X = -d; if(bubbles[i].Y < -d) bubbles[i].Y = height; if(bubbles[i].Y > height) bubbles[i].Y = -d; if(leftEye==2.8){ R = 255; B = 0; } if(rightEye==2.8){ B = 255; R = 0; } fill(R, 0, B); stroke(bubbles[i].R, bubbles[i].G, bubbles[i].B); ellipse(bubbles[i].X, bubbles[i].Y, bubbles[i].Diameter, bubbles[i]. Diameter); }



Effect with Audience


model - 2MO


Effect with Audience


model - 2MO


Effect with Audience


model - 2MO


Effect with Audience


model - 2MO


Effect with Audience


model - aster


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.