Lighting with Processing

Setting Up Processing

Violet Whitney
Measuring the Great Indoors
4 min readOct 6, 2020

--

1 Download Processing. Place Processing in the Applications folder on your computer (or Program Files for Windows). When you double click Processing, it should install and launch the application with a new empty sketch. A sketch is where you will write your code. We’ll be writing code in Java inside of Processing.

Processing Documentation

Basics

You will have two basic parts in Processing, the “setup” and the “draw” loop. The setup loop runs once when launching your script, whereas the draw loop runs repeatedly. This allows you to save computing power by sticking parts of the code that only need to run at the start in the setup loop. The draw loop will continually update so it can change over time, or get realtime information such as the location of your mouse or update a camera feed.

Light

Time

Changing ellipse size, location, stroke weight, background color by time parameters.

For Next Class

2 With the help of the tutorials above, please create you own combination of colors, shape, time, Processing’s movie input, and video camera input to create your own lighting phenomena. Please also use one new function not referenced in this tutorial from the Processing Documentation, such as text().

3 Document your lighting effects through videos and gifs. Extra bonus points for testing some light projection with a projector! Can you play with aspects of the room to get your projection to align with the space?

Some other useful tips

If you are looking for more examples — you can find some great things to try under File > Examples.

This brings up a lot of various examples which you can play around with and learn how different bits of code are functioning.

Some useful things to know about the code:

Bonus: Referencing Your Webcam (not required)

For help with a video tutorial, follow Daniel Shiffman’s tutorial:

To get started you will need this library to capture video feed from your camera: Sketch > Library > Import Library > Video Library

  • Capture — captures live feed from a camera source or webcam
  • Video — takes in a video source
  • Capture and Video have the same functionality as a PImage

Some new concepts to understand. These Java functions require self referencing thru the use of this.

Referencing A Movie

To use the video referencing you’ll need to add your video file into a folder in your sketch folder named “data”.

--

--

Violet Whitney
Measuring the Great Indoors

Researching Spatial & Embodied Computing @Columbia University, U Penn and U Mich