intro to openframeworks

17
Intro to openFrameworks

Upload: kyle-mcdonald

Post on 26-Jun-2015

834 views

Category:

Technology


1 download

DESCRIPTION

This workshop was given at FITC Toronto 2012. Most of the details were shared by browsing code and talking together, so there isn't very much "content" in the slides themselves.

TRANSCRIPT

Page 1: Intro to openFrameworks

Intro to openFrameworks

Page 2: Intro to openFrameworks

Overview

Intros from me, and you OF history and inspiration OF structure and syntax Running and modifying the examples Using addons and contributed code Getting started on a project you want to make

Page 3: Intro to openFrameworks

Intros

Me http://kylemcdonald.net/ https://twitter.com/#!/kcimc

You Name Experience level What you want to make with OF

Page 4: Intro to openFrameworks

Let's go!

Page 5: Intro to openFrameworks

Tour de openFrameworksaka

Page 6: Intro to openFrameworks

aka

openFrameworks safari

me

Page 7: Intro to openFrameworks

A (Rough) History of OF

Pre-2003: ACU library at MIT Inspired Processing via Ben Fry and Casey Reas Golan Levin also studies at MIT, uses ACU to teach

Zach Lieberman studies under Golan Zach can't teach ACU, develops OF

Theo Watson studies under Zach (2004+) Theo does OSX, Zach does Windows

Arturo Castro meets Zach + Theo (2007/8?) Arturo ports to Linux, joins the OF core team

OF lab (Ars Electronica 2008) OF dev conferences (2011 Pittsburgh, 2012 Detroit)

Page 8: Intro to openFrameworks

OF Inspiration

Let's check out some awesome OF work! openFrameworks on Vimeo openFrameworks on Flickr openFrameworks on Creative Applications

Page 9: Intro to openFrameworks

OF Structure

OF is a bunch of classes and functions that simplify things by reducing the amount of code you have to write

The “core” of OF is in libs/openFrameworks/ A good way to see everything in one place is

the OF reference Some more notes on folder structure

Page 10: Intro to openFrameworks

OF Syntax

It's just C++ syntax, except for the “of” prefixes and some other minor conventions

Some great resources for learning C++ at the bottom of the about page

So...

Page 11: Intro to openFrameworks

C++ Syntax

<> are for templates, called “generics” in java . (dot operator) is for accessing children of

objects, :: (colon colon) is for classes and namespace access

You don't normally use an “int[] arr;” like in Processing, you have to use a “vector<int> arr;”

Operator overloading means you can use complex types with mathematical notation: for example, ofVec2f

Page 12: Intro to openFrameworks

Comparison to other Environments

Cinder has a steeper learning curve, but was created by “real” programmers

Pocode is more like Flash in having a scene graph, where everything is drawn implicitly

Processing is most similar, but the community is more focused on sketches than addons.

Page 13: Intro to openFrameworks

Running and Modifying Examples

007 and before, everything is in apps/examples/ and apps/addonsExamples

0071 and after, everything is in examples/ There are a lot more examples online, we're

continually working to bring in more.

Page 14: Intro to openFrameworks

Running and Modifying Examples

imageSequenceExample noiseField2dExample videoGrabberExample asciiVideo pointPickerExample ...

Page 15: Intro to openFrameworks

Using Addons and Contributed Code

Sometimes people share their entire project! rise and fall perfume-global face++ and feedrdio ...

Page 16: Intro to openFrameworks

Using Addons and Contributed Code

Q: Why is openFrameworks amazing? A: ofxAddons

ofxBox2D ofxKinect ofxFft ofxCv ...

Page 17: Intro to openFrameworks

Getting Started on a Project / Hacking Together

What project do you want to make? Let's brainstorm about what you need to make it happen.

What techniques do you want to play with? Let's see if there's something out there that you can wrap or use.