Images and Textures

It is often insufficient to create rich visualizations using only basic geometric primitives. Images are the building blocks that help in adding decoration, style, and even photorealism to an interactive scene. In this chapter we will cover the basic operations that we can perform on images:

  • Loading and drawing an image
  • Rotating images
  • Color modulation
  • Transparency
  • Creating and modifying images
  • Using ofTexture for memory optimization
  • Image warping and video mapping

Codes and executables for Windows, openFrameworks 0.074, Visual Studio Express 2010 C++: Download

Rotating images

This example draws a number of images in a spiral.

Rotating Images

04-Images/02-ImageSpiral

Color Waves

This example creates and draws an animated image of moving color waves.

04-Images/04-ColorWaves

Horizontal Distortion

This example distorts the geometry of an image by shifting its horizontal lines by sine wave, which also changes with time.

04-Images/06-HorizontalDistortion

Video Mapping

This is the simplest example of warping and video mapping; that is, warping a rectangular image by moving its corners. To select one of the four corners of the image, press the key 1, 2, 3, or 4. To move the selected corner, press any cursor key.


04-Images/07-VideoMapping

Leave a comment