Free Sample
+ Collection

Mastering openFrameworks: Creative Coding Demystified

Denis Perevalov

openFrameworks is the doorway to so many creative multimedia possibilities and this book will tell you everything you need to know to undertake your own projects. You’ll find creative coding is simpler than you think.
RRP $26.99
RRP $44.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849518048
Paperback364 pages

About This Book

  • Create cutting edge audio-visual interactive projects, interactive installations, and sound art projects with ease
  • Unleash the power of low-level data processing methods using C++ and shaders
  • Make use of the next generation technologies and techniques in your projects involving OpenCV, Microsoft Kinect, and so on

Who This Book Is For

If you are a visual artist, designer, or programmer interested in creative coding with openFrameworks then this book is for you. Basic knowledge of object-oriented programming, such as C++, Java, Python, and ActionScript 3, would be helpful.

Table of Contents

Chapter 1: openFrameworks Basics
About openFrameworks
Installing openFrameworks and running your first example
Installing on Mac OS with Xcode
Installing on Linux with Code::Blocks
openFrameworks' folders
File structure of a project
Code structure of a project
Creating a new project
Creating your first project – the Pendulum example
Running the book's examples
Basic utility functions
Chapter 2: Drawing in 2D
Drawing basics
The background color of the screen
Geometric primitives
Using ofPoint
Coordinate system transformations
Drawing with an uncleared background
Using FBO for offscreen drawings
Screen grabbing
Additional topics
Chapter 3: Building a Simple Particle System
The basics of particle systems
A single particle
An emitter
The attraction, repulsion, and spinning forces
Graphical user interface
Additional topics
Chapter 4: Images and Textures
Raster and vector images
Loading and drawing an image
Rotating images
Color modulation
Creating and modifying images
Using ofTexture for memory optimization
Image warping and video mapping
Using images for internal calculations
Chapter 5: Working with Videos
Video basics
Playing a video file
Controlling the video playback
Processing a single video frame
Processing multiple frames
Processing a live video from the camera
Using image sequence
Chapter 6: Working with Sounds
Sound basics
Playing sound samples
Generating sounds
Using a microphone
Getting spectral data from sound
Chapter 7: Drawing in 3D
3D basics
Simple 3D drawing
Using ofMesh
Drawing sharp edges
Drawing line segments and points
Coloring the vertices
Working with vertices
The oscillating plane example
Additional topics
Chapter 8: Using Shaders
Basics of shaders
Structure of a shader's code
A simple fragment shader example
Creating video effects with fragment shaders
Deforming objects with a vertex shader
Using vertex shader in our project
Using a geometry shader
Additional topics
Chapter 9: Computer Vision with OpenCV
Understanding computer vision and OpenCV
Using ofxOpenCv
Working with ofxCv images
Image filtering
Geometrical transformations of images
Searching for objects in an image
Using OpenCV functions
Chapter 10: Using Depth Cameras
Depth camera basics
Installing the ofxOpenNI addon
ofxOpenNI examples
Creating interactive surface
Additional topics
Chapter 11: Networking
Networking basics
Using OSC protocol
Using TCP protocol for streaming images

What You Will Learn

  • Install openFrameworks in Windows, Mac OS X, and Linux
  • Load images and videos from files, and learn rendering and low-level processing
  • Learn to use sound samples, sound synthesizing, and how to record sounds from a microphone
  • Work with 3D graphics, including shaders
  • Extend your project with additional graphics, sound, networking, and computer vision functionality with the help of numerous openFrameworks addons
  • Create distributed projects, which work on a several computers by synchronizing via OSC protocol
  • Leverage computer vision basics, including optical flow, and perspective transformations
  • Use depth cameras, like Microsoft Kinect, for creating interactive walls.

In Detail

openFrameworks is a powerful programming toolkit and library designed to assist the creative process through simplicity and intuitiveness. It's a very handy software library written in C++ to reduce the software development process, helping you to kick-start creative coding. With the help of C++ and shaders support, openFrameworks allows for the processing of all kinds of media information with your custom-developed algorithms at the lowest possible level, with the fastest speed.

"Mastering openFrameworks: Creative Coding Demystified" will introduce you to a world of creative coding projects, including interactive installations, audio-visual, and sound art projects. You will learn how to make your own projects using openFrameworks. This book focuses on low-level data processing, which allows you to create really unique and cutting-edge installations and projects.

"Mastering openFrameworks: Creative Coding Demystified" provides a complete introduction to openFrameworks, including installation, core capabilities, and addons. Advanced topics like shaders, computer vision, and depth cameras are also covered.

We start off by discussing the basic topics such as image and video loading, rendering and processing, playing sound samples, and synthesizing new sounds. We then move on to cover 3D graphics, computer vision, and depth cameras. You will also learn a number of advanced topics such as video mapping, interactive floors and walls, video morphing, networking, and using geometry shaders.

You will learn everything you need to know in order to create your own projects; create projects of all levels, ranging from simple creative-code experiments, to big interactive systems consisting of a number of computers, depth cameras, and projectors.


Read More