SlideShare a Scribd company logo
1 of 83
Download to read offline
OPEN FRAMEWORKS +
   KINECT PART 1

      @GAFFTA
Open Frameworks is an open source,
creative coding platform.
Makes it easy to start c++
More power with less headache
Overscan
   SO SO Limited

http://www.creativeapplications.net/openframeworks/overscan-
openframeworks/
Scramble Suit
   Kyle McDonald + Arturo Castro + Others

http://www.creativeapplications.net/openframeworks/scramble-suit-face-tracking-
openframeworks/
Nodebeat
   Justin Windle + Seth Sandler

http://www.creativeapplications.net/iphone/nodebeat-iphone-ipad-
of/
Entrails
   By Lukasz Karluk

http://www.creativeapplications.net/openframeworks/entrails-
openframeworks/
University of Dayton Interactive Wall
   By Flight Phase

http://www.creativeapplications.net/openframeworks/interactive-wall-at-ud-openframeworks-
kinect/
Starry Night Van Gough Interactive
   by Petros Vrellis

http://www.creativeapplications.net/openframeworks/vincent-van-goghs-starry-night-interactive-by-petros-vrellis-
openframeworks/
Bloom Skin
   by Elttob Tep issey Miyake

http://www.creativeapplications.net/openframeworks/bloom-skin-the-wave-installation-for-elttob-tep-issey-
miyake/
Screen Lab #2
   Screen Lab + MediaCityUK

http://www.creativeapplications.net/environment/
screenlab-2/
CLOUDS Interactive Documentary
   James George + Jonathan Minard

http://www.creativeapplications.net/openframeworks/clouds-interactive-documentary-exploring-the-creativity-through-the-lens-of-
code/
Mclaren P12 Trailer
   Marshmellow Laser Feast

http://www.creativeapplications.net/processing/mclaren-p12-teaser-mclaren-vs-aerodynamics-by-
mlf/
Light Form
   Mathieu Rivier ( ECAL )

http://www.creativeapplications.net/openframeworks/light-form-interactive-landscape-by-mathieu-rivier-
ecal/
Saatchi and Saatchi New Directors Showcase
   Marshmellow Laser Feast

http://www.creativeapplications.net/openframeworks/light-form-interactive-landscape-by-mathieu-rivier-
ecal/
Paik Times Five
   By Flightphase

http://www.creativeapplications.net/openframeworks/light-form-interactive-landscape-by-mathieu-rivier-
ecal/
How do I use Open Frameworks ?

 A few IDE options:




       XCode                Code::blocks        Visual Studio
        mac              mac, windows , linux     windows
Image + Video Utilities
Vector Graphics API
Sound in / out , panning, volume, play speed
Geometry Shader
GLSL Shader Example
Open GL 3D Utilities: Vector Classes , Geometry and Texture
Utilities, Camera Control
String utilities, file system access
Core addons include...
XML Manipulation
Servers and Connections - TCP / UDP / OSC
OpenCV Wrapper
3D Model Animation loader
But the real power of Open Frameworks is in the community
Recently, www.ofxAddons.com was created which
makes finding these great addons easy !
ofxBullet - Bullet Physics Wrapper
github.com/NickHardemann/ofxBullet
Multiple Augmented Reality Libraries
SURF , ARToolkit , Qualcomm
and all of it is open source
Your first App !


  Download OF for your platform from :
  http://www.openframeworks.cc/download/

  Copy the OF download to somewhere more permanent.

  Everything you do for openFrameworks needs to be within
  this directory.

  You may need to do some initial setup, check http://
  www.openframeworks.cc/setup/ for details



Literally do this.
Recently the community created a project genearator which
makes it easier to get started.
You can also include any addons you want from the start to
avoid messing with any compiler settings.
Main.cpp

Sets up the window size and openGL context
Runs application class until quit
The Application Cake.

Ingredients - .h files
Instructions - .cpp files
testApp.h

declaration of class, functions, and variables
testApp.h

implementation of class, functions, and variables
setup ( )

 load assets
 initialize values
 initialize addons or components
update( )

 apply force to particles
 calculations
 increment video frames
draw ( )

 draw shapes/images/videos
 use GLSL Shaders
 Apply Blend Modes
 Save Pixels from screen
Look at the folder 00_basics for class outline
There is no var keyword.

#include is your new import

float = AS3 number

lots of similar of types
    string, int, uint
Functions look a little different, with the return type at
the start of the declaration.

Multiple functions can share the same name, as long as
they have different input parameters or return types.
C++ Compiler - Step 1

   Step 1
   Preprocessor runs through and combines all your code in one
   giant file. Target the preprocessor with the “#” symbol

   Step 2
   Compiler parses code and make sure there are no errors. Your
   code is broken down into a lower level language: Assembly.

   Step 3
   The Assembly code is turned into readable code by the
   computer inside object files.

   Step 4
   The object files are linked together into an executable file.
show person staring at a screen stereotypically
monkey at a computer works too

First you write some code. You could do this in your IDE ( xcode )
Github


Github is awesome.

Go there. like now and sign up.

github.com
Github

Github is a social coding platform that allows you to
host a git repository for free as long as it’s public and
open source.

Github has great resources for getting started with git
http://help.github.com/
Github

Github is a great way to move your own files between
machines.

It has built in issue tracker and and wiki capabilities.

Great way to collaborate and share code.
Git Quick Tip

.gitignore is a file specific to a repository that allows
you to specify what is not tracked by git.

with c++ normally this is excessive IDE generated
files, and build files.

Binary files don’t track super well on git because there
are no changes to track except files size. but
sometimes you need to include them anyway.
Translation with Transformation Matrices

Instead of moving an object on the screen,
the entire screen is moved.

Think of it as a global registration point.
Simple Translate

to build off of the current space or to end a local space
use:

ofPushMatrix( )

and

ofPopMatrix( )
Simple Translate
Simple Rotation
Simple Scaling
Order Matters
01 Circles

Step 1
  Draw a circle with a random color where the mouse
  cursor is.
01 Circles

Step 2
  Create struct ColorPoint, structs are like classes
  except they cannot have methods.

 A struct is useful for storing grouped data.

 Store each color point in a vector<> which operates
 similar to a dynamically sized array
01 Circles

Step 3
  Draw screen into a Frame Buffer Object ( FBOs )
  FBOs are called with begin() and end()
  Anything between those functions will be stored and
  be available for use later.

 Mirror the FBO vertical / horizontal for symmetry
01 Circles

Step 4 - BONUS
  Pull colors from a color palette.
02 Animator

Step 1
  Create a looping sequence of FBOs
  Draw a circle into wherever the mouse is
02 Animator

Step 2
  Scale the circle radius based on mouse speed
  And draw a random color
02 Animator

Step 3
  Including an addon
  We will use ofxUI to add some sliders to make our
  animator a little more fun.

 Adding addon files to a project
 Adding a RGB slider color ranges
03 Particles

Step 1
  Load an Image
  Create still particles from the raw pixels of the image
03 Particles

Step 2
  Add the repulse / attract modes to the system

 Add particle alpha trails
03 Particles

Step 3
  Update particles colors from a movie

 Loading a movie
Joining the Community !

Introduce yourself at :

http://forum.openframeworks.cc/index.php/board,
11.0.html

The OF community is very welcoming.
How to be a good community member ?


Read your IDE’s in depth forum walkthrough it will
save you a lot of hassle.

Search the forums for answers before making a post.

Ask questions and post your code.

DO NOT beg for code.
Additional Resources
There are now official OF tutorials !
http://openframeworks.cc/tutorials

Roxlu has a wonderful collection of slides to explain
some of the awesome features of OF 007
http://roxlu.com/blog/entry/145/openframeworks-007-
presentations

The new version of Programming Interactivity by
Joshua Noble is the goto book for OF
http://programminginteractivity.com/wordpress/
Additional Resources
Unofficial c++ reading list
http://forum.openframeworks.cc/index.php/topic,
9034.msg42670.html

Processing ‘s official site still has one of the best
explanations of core concepts
http://processing.org/learning/

The OF forums are a treasure trove of discovery and
works in progress. Subscribing to the RSS feed will
keep you very up to date.
http://forum.openframeworks.cc/
Additional Resources


Jeffery Crouse has some really good tutorials and is a
professor
http://www.jeffcrouse.info/teaching/

Creative Applications does an amazing job showcasing
and collecting installations and other creative apps.

http://www.creativeapplications.net/
Ben McChesney
Lead Experience Developer
Helios Interactive

@bendesigning on twitter

benmcchesney.com/
benmcchesney.com/blog

github.com/benMcChesney
THANK YOU

More Related Content

Similar to Hacking the Kinect with GAFFTA Day 1

Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedWojciech Koszek
 
How to develop a Flutter app.pdf
How to develop a Flutter app.pdfHow to develop a Flutter app.pdf
How to develop a Flutter app.pdfSmith Daniel
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkitPaul Jensen
 
Understanding ScratchX Extensions with JavaScript
Understanding ScratchX Extensions with JavaScriptUnderstanding ScratchX Extensions with JavaScript
Understanding ScratchX Extensions with JavaScriptDarren Adkinson
 
DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.JooinK
 
DIY- computer vision with GWT
DIY- computer vision with GWTDIY- computer vision with GWT
DIY- computer vision with GWTFrancesca Tosi
 
Exploring the Internet of Things Using Ruby
Exploring the Internet of Things Using RubyExploring the Internet of Things Using Ruby
Exploring the Internet of Things Using RubyMike Hagedorn
 
Introduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).docIntroduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).docMayurWagh46
 
iOS Indie Developer Toolkit - CocoaHeads 3city
iOS Indie Developer Toolkit - CocoaHeads 3cityiOS Indie Developer Toolkit - CocoaHeads 3city
iOS Indie Developer Toolkit - CocoaHeads 3cityMichał Zygar
 
Introduction to Box2D Physics Engine
Introduction to Box2D Physics EngineIntroduction to Box2D Physics Engine
Introduction to Box2D Physics Enginefirstthumb
 
C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...bhargavi804095
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopmentgillygize
 
Legacy of Void*
Legacy of Void*Legacy of Void*
Legacy of Void*Adam Crain
 
Introduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptxIntroduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptxNEHARAJPUT239591
 
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJIntroduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJmeharikiros2
 
What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...Sławomir Zborowski
 

Similar to Hacking the Kinect with GAFFTA Day 1 (20)

Building an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learnedBuilding an Open Source iOS app: lessons learned
Building an Open Source iOS app: lessons learned
 
Android studio
Android studioAndroid studio
Android studio
 
How to develop a Flutter app.pdf
How to develop a Flutter app.pdfHow to develop a Flutter app.pdf
How to develop a Flutter app.pdf
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
 
Understanding ScratchX Extensions with JavaScript
Understanding ScratchX Extensions with JavaScriptUnderstanding ScratchX Extensions with JavaScript
Understanding ScratchX Extensions with JavaScript
 
SWT - Technical Deep Dive
SWT - Technical Deep DiveSWT - Technical Deep Dive
SWT - Technical Deep Dive
 
DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.
 
DIY- computer vision with GWT
DIY- computer vision with GWTDIY- computer vision with GWT
DIY- computer vision with GWT
 
Exploring the Internet of Things Using Ruby
Exploring the Internet of Things Using RubyExploring the Internet of Things Using Ruby
Exploring the Internet of Things Using Ruby
 
Introduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).docIntroduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).doc
 
iOS Indie Developer Toolkit - CocoaHeads 3city
iOS Indie Developer Toolkit - CocoaHeads 3cityiOS Indie Developer Toolkit - CocoaHeads 3city
iOS Indie Developer Toolkit - CocoaHeads 3city
 
Introduction to Box2D Physics Engine
Introduction to Box2D Physics EngineIntroduction to Box2D Physics Engine
Introduction to Box2D Physics Engine
 
C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...C++ helps you to format the I/O operations like determining the number of dig...
C++ helps you to format the I/O operations like determining the number of dig...
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopment
 
Legacy of Void*
Legacy of Void*Legacy of Void*
Legacy of Void*
 
Introduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptxIntroduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptx
 
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJIntroduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
 
C++Basics2022.pptx
C++Basics2022.pptxC++Basics2022.pptx
C++Basics2022.pptx
 
What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...
 
Game Studio
Game StudioGame Studio
Game Studio
 

Recently uploaded

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 

Recently uploaded (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Hacking the Kinect with GAFFTA Day 1

  • 1. OPEN FRAMEWORKS + KINECT PART 1 @GAFFTA
  • 2. Open Frameworks is an open source, creative coding platform.
  • 3. Makes it easy to start c++ More power with less headache
  • 4. Overscan SO SO Limited http://www.creativeapplications.net/openframeworks/overscan- openframeworks/
  • 5. Scramble Suit Kyle McDonald + Arturo Castro + Others http://www.creativeapplications.net/openframeworks/scramble-suit-face-tracking- openframeworks/
  • 6. Nodebeat Justin Windle + Seth Sandler http://www.creativeapplications.net/iphone/nodebeat-iphone-ipad- of/
  • 7. Entrails By Lukasz Karluk http://www.creativeapplications.net/openframeworks/entrails- openframeworks/
  • 8. University of Dayton Interactive Wall By Flight Phase http://www.creativeapplications.net/openframeworks/interactive-wall-at-ud-openframeworks- kinect/
  • 9. Starry Night Van Gough Interactive by Petros Vrellis http://www.creativeapplications.net/openframeworks/vincent-van-goghs-starry-night-interactive-by-petros-vrellis- openframeworks/
  • 10. Bloom Skin by Elttob Tep issey Miyake http://www.creativeapplications.net/openframeworks/bloom-skin-the-wave-installation-for-elttob-tep-issey- miyake/
  • 11. Screen Lab #2 Screen Lab + MediaCityUK http://www.creativeapplications.net/environment/ screenlab-2/
  • 12. CLOUDS Interactive Documentary James George + Jonathan Minard http://www.creativeapplications.net/openframeworks/clouds-interactive-documentary-exploring-the-creativity-through-the-lens-of- code/
  • 13. Mclaren P12 Trailer Marshmellow Laser Feast http://www.creativeapplications.net/processing/mclaren-p12-teaser-mclaren-vs-aerodynamics-by- mlf/
  • 14. Light Form Mathieu Rivier ( ECAL ) http://www.creativeapplications.net/openframeworks/light-form-interactive-landscape-by-mathieu-rivier- ecal/
  • 15. Saatchi and Saatchi New Directors Showcase Marshmellow Laser Feast http://www.creativeapplications.net/openframeworks/light-form-interactive-landscape-by-mathieu-rivier- ecal/
  • 16. Paik Times Five By Flightphase http://www.creativeapplications.net/openframeworks/light-form-interactive-landscape-by-mathieu-rivier- ecal/
  • 17. How do I use Open Frameworks ? A few IDE options: XCode Code::blocks Visual Studio mac mac, windows , linux windows
  • 18.
  • 19. Image + Video Utilities
  • 21. Sound in / out , panning, volume, play speed
  • 24. Open GL 3D Utilities: Vector Classes , Geometry and Texture Utilities, Camera Control
  • 25. String utilities, file system access
  • 28. Servers and Connections - TCP / UDP / OSC
  • 31. But the real power of Open Frameworks is in the community
  • 32. Recently, www.ofxAddons.com was created which makes finding these great addons easy !
  • 33. ofxBullet - Bullet Physics Wrapper github.com/NickHardemann/ofxBullet
  • 34. Multiple Augmented Reality Libraries SURF , ARToolkit , Qualcomm
  • 35. and all of it is open source
  • 36.
  • 37.
  • 38.
  • 39. Your first App ! Download OF for your platform from : http://www.openframeworks.cc/download/ Copy the OF download to somewhere more permanent. Everything you do for openFrameworks needs to be within this directory. You may need to do some initial setup, check http:// www.openframeworks.cc/setup/ for details Literally do this.
  • 40.
  • 41.
  • 42. Recently the community created a project genearator which makes it easier to get started.
  • 43. You can also include any addons you want from the start to avoid messing with any compiler settings.
  • 44. Main.cpp Sets up the window size and openGL context Runs application class until quit
  • 45. The Application Cake. Ingredients - .h files Instructions - .cpp files
  • 46. testApp.h declaration of class, functions, and variables
  • 47. testApp.h implementation of class, functions, and variables
  • 48. setup ( ) load assets initialize values initialize addons or components
  • 49. update( ) apply force to particles calculations increment video frames
  • 50. draw ( ) draw shapes/images/videos use GLSL Shaders Apply Blend Modes Save Pixels from screen
  • 51. Look at the folder 00_basics for class outline
  • 52. There is no var keyword. #include is your new import float = AS3 number lots of similar of types string, int, uint
  • 53. Functions look a little different, with the return type at the start of the declaration. Multiple functions can share the same name, as long as they have different input parameters or return types.
  • 54. C++ Compiler - Step 1 Step 1 Preprocessor runs through and combines all your code in one giant file. Target the preprocessor with the “#” symbol Step 2 Compiler parses code and make sure there are no errors. Your code is broken down into a lower level language: Assembly. Step 3 The Assembly code is turned into readable code by the computer inside object files. Step 4 The object files are linked together into an executable file. show person staring at a screen stereotypically monkey at a computer works too First you write some code. You could do this in your IDE ( xcode )
  • 55. Github Github is awesome. Go there. like now and sign up. github.com
  • 56. Github Github is a social coding platform that allows you to host a git repository for free as long as it’s public and open source. Github has great resources for getting started with git http://help.github.com/
  • 57. Github Github is a great way to move your own files between machines. It has built in issue tracker and and wiki capabilities. Great way to collaborate and share code.
  • 58. Git Quick Tip .gitignore is a file specific to a repository that allows you to specify what is not tracked by git. with c++ normally this is excessive IDE generated files, and build files. Binary files don’t track super well on git because there are no changes to track except files size. but sometimes you need to include them anyway.
  • 59. Translation with Transformation Matrices Instead of moving an object on the screen, the entire screen is moved. Think of it as a global registration point.
  • 60. Simple Translate to build off of the current space or to end a local space use: ofPushMatrix( ) and ofPopMatrix( )
  • 65.
  • 66. 01 Circles Step 1 Draw a circle with a random color where the mouse cursor is.
  • 67. 01 Circles Step 2 Create struct ColorPoint, structs are like classes except they cannot have methods. A struct is useful for storing grouped data. Store each color point in a vector<> which operates similar to a dynamically sized array
  • 68. 01 Circles Step 3 Draw screen into a Frame Buffer Object ( FBOs ) FBOs are called with begin() and end() Anything between those functions will be stored and be available for use later. Mirror the FBO vertical / horizontal for symmetry
  • 69. 01 Circles Step 4 - BONUS Pull colors from a color palette.
  • 70. 02 Animator Step 1 Create a looping sequence of FBOs Draw a circle into wherever the mouse is
  • 71. 02 Animator Step 2 Scale the circle radius based on mouse speed And draw a random color
  • 72. 02 Animator Step 3 Including an addon We will use ofxUI to add some sliders to make our animator a little more fun. Adding addon files to a project Adding a RGB slider color ranges
  • 73.
  • 74. 03 Particles Step 1 Load an Image Create still particles from the raw pixels of the image
  • 75. 03 Particles Step 2 Add the repulse / attract modes to the system Add particle alpha trails
  • 76. 03 Particles Step 3 Update particles colors from a movie Loading a movie
  • 77. Joining the Community ! Introduce yourself at : http://forum.openframeworks.cc/index.php/board, 11.0.html The OF community is very welcoming.
  • 78. How to be a good community member ? Read your IDE’s in depth forum walkthrough it will save you a lot of hassle. Search the forums for answers before making a post. Ask questions and post your code. DO NOT beg for code.
  • 79. Additional Resources There are now official OF tutorials ! http://openframeworks.cc/tutorials Roxlu has a wonderful collection of slides to explain some of the awesome features of OF 007 http://roxlu.com/blog/entry/145/openframeworks-007- presentations The new version of Programming Interactivity by Joshua Noble is the goto book for OF http://programminginteractivity.com/wordpress/
  • 80. Additional Resources Unofficial c++ reading list http://forum.openframeworks.cc/index.php/topic, 9034.msg42670.html Processing ‘s official site still has one of the best explanations of core concepts http://processing.org/learning/ The OF forums are a treasure trove of discovery and works in progress. Subscribing to the RSS feed will keep you very up to date. http://forum.openframeworks.cc/
  • 81. Additional Resources Jeffery Crouse has some really good tutorials and is a professor http://www.jeffcrouse.info/teaching/ Creative Applications does an amazing job showcasing and collecting installations and other creative apps. http://www.creativeapplications.net/
  • 82. Ben McChesney Lead Experience Developer Helios Interactive @bendesigning on twitter benmcchesney.com/ benmcchesney.com/blog github.com/benMcChesney