• home
  • About the project
  • Miniature know-how
  • Language
    • Polski
    • English
Mi

Painting by Light

interaction and light (and darkness)
Preview: default camera Preview: back camera
Parameters
gui
lang
pointer
alpha
blend
colpicker
colsrc
cut
displaymode
fade
feedback
mirror
mul
points
polys
synth
threshold
ttl
vol
Description

“Painting by Light” is a web-based version of the interactive installation of the same title by Dominika Sobolewska and Paweł Janicki. The original version of “Painting with Light” was premiered as part of the “Interactive Playground” exhibition (Patrycja Mastej, Dominika Sobolewska, Paweł Janicki) — opening the new WRO Art Center in 2008.

The work explores several important and interesting issues: non-semantic interaction (mutual and with the work) with multiple people simultaneously, the use of light/color/darkness as fundamental visual qualities, and the use of code as the material of art. Traditionally, exhibition versions of “Painting with Light” — and there’s nothing stopping you from using the same strategy at home — use various light-emitting objects (toys, ordinary, inspection, and workshop lamps, etc.), establishing a relationship to objects closer to readymades and performance art than to a staged approach and “props.”

Technical documentation

Parameters passed via URL

  • alpha 0 … 255; default 255; transparency (0 – completely transparent objects, 255 – no transparency)
  • blend 0 or 1; default 0; color blending method: 0 – overlay (“BLEND”), 1 – additive (“ADD”)
  • colpicker 0 or 1; default 1; method for determining the center of a moving object: 0 – center of “mass”, 1 – geometrically determined center
  • colsrc 0 or 1; default 0; image from which colors are taken: 0 – amplified image, 1 – background image
  • cut 0.0 … 1.0; default 0.01; normalized threshold of minimum pixel brightness considered by the motion detector
  • displaymode 0 … 5; default 5; display mode: 0 – unprocessed image and detected moving objects, 1 – amplified and dark-object-filtered image and detected moving objects, 2 – background and detected moving objects, 3 – differential image (between current image and background) and detected moving objects, 4 – binary representation of differential image and detected moving objects, 5 – light painting (final effect)
  • fade 1 … 10; default 3; object fade-out time
  • famo user | environment (or env); default user; [facingMode] allows forcing the use of the front (user) or rear (environment) camera on devices equipped with dual cameras (most modern mobile devices)
  • feedback 0.0 … 1.0; default 0.5; feedback intensity for the background image
  • gui 0 or 1; default 1; hides/shows the graphical user interface panel
  • h vertical camera resolution
  • lang en or pl; default pl; sets the content language of the installation (additional languages can be added)
  • midioutchnoldblobs 1 … 16; default 2; MIDI channel number on which messages related to objects detected by the motion detector are sent
  • midioutchnoldblobs 1 … 16; default 3; MIDI channel number on which messages related to objects transitioning to the fade-out state are sent
  • midioutport disabled by default; MIDI port number for external control of Miniature (sending messages)
  • mirror 0 or 1; default 1; disables/enables mirroring of the image from the capture device (usually a camera)
  • mul 0.0 … 1.0; default 0.1; normalized amplification level (brightness boost) of the image
  • pointer 0 or 1; default 1; hides/shows the mouse cursor
  • points 3 … 20; default 8; number of points of the polygon representing a moving object
  • polys 0.0 … 1.0; default 0.5; normalized size corresponding to the maximum number of objects on the screen
  • synth 0 or 1; default 1; disables/enables the internal sound generator
  • threshold 0.0 … 1.0; default 0.5; brightness threshold above which a pixel is considered to contain motion information
  • ttl 0.0 … 1.0; default 0.3; normalized time objects remain on screen
  • vol 0.0 … 1.0; default 0.63; volume of the built-in synthesizer
  • w horizontal camera resolution
  • worker 0 or 1; default 0; allows blocking the browser’s built-in mechanisms that suspend the program when the window is not visible
  • ws address; disabled by default; enables and sets the address (usually localhost:9001) for WebSocket communication (allows external control of Miniature and customization)
  • xws address; disabled by default; enables and sets the address (usually ws://localhost:9001) with protocol specification for WebSocket communication (allows external control of Miniature and customization)

Messages passed via WebSocket

Messages to which Miniature responds

not applicable

Messages sent by Miniature

  • pbl new new objects (detected by the motion detector): x (normalized horizontal position) y (normalized vertical position) s (normalized size)
  • pbl old objects transitioning to the fade-out phase: x (normalized horizontal position) y (normalized vertical position) s (normalized size)

MIDI

Messages to which Miniature responds

not applicable

Messages sent by Miniature

  • note on/off on channel 2 (default channel can be changed via URL parameters) two notes with pitch calculated based on the horizontal and vertical coordinates of an object detected by the motion detector; on channel 3 (default channel can be changed via URL parameters) two notes with pitch calculated based on the horizontal and vertical coordinates of an object transitioning to the fade-out phase;

Communication with MaxMSP

Messages to which Miniature responds

not applicable

Messages sent by Miniature

not applicable

Source code

index.html

sketch.js

p5.vida.js

pbl.js

gui.js

midi.js

shaders.js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Ij4KCTxsaSBjbGFzcz0icXRyYW54cy1sYW5nLW1lbnUtaXRlbSBxdHJhbnhzLWxhbmctbWVudS1pdGVtLXBsIG1lbnUtaXRlbSBtZW51LWl0ZW0tdHlwZS1jdXN0b20gbWVudS1pdGVtLW9iamVjdC1jdXN0b20gbWVudS1pdGVtLTk2NSI+PGEgaHJlZj0iaHR0cHM6Ly9taS53cm9jZW50ZXIucGwvcGwvbWFsb3dhbmllLXN3aWF0bGVtLyI+UG9sc2tpPC9hPjwvbGk+Cgk8bGkgY2xhc3M9InF0cmFueHMtbGFuZy1tZW51LWl0ZW0gcXRyYW54cy1sYW5nLW1lbnUtaXRlbS1lbiBtZW51LWl0ZW0gbWVudS1pdGVtLXR5cGUtY3VzdG9tIG1lbnUtaXRlbS1vYmplY3QtY3VzdG9tIGN1cnJlbnQtbWVudS1pdGVtIG1lbnUtaXRlbS05NjYiPjxhIGhyZWY9Imh0dHBzOi8vbWkud3JvY2VudGVyLnBsL2VuL21hbG93YW5pZS1zd2lhdGxlbS8iIGFyaWEtY3VycmVudD0icGFnZSI+RW5nbGlzaDwvYT48L2xpPgo8L3VsPgo8L2xpPgo8L3VsPjwvZGl2Pgk8L2Rpdj4KCTxidXR0b24gY2xhc3M9ImpzLWExMXkiPjxpbWcgYWx0PSJIaWdoIGNvbnRyYXN0IiBzcmM9Imh0dHBzOi8vbWkud3JvY2VudGVyLnBsL3dwLWNvbnRlbnQvdGhlbWVzL21pMjAyNi9pbWcva29udHJhc3Quc3ZnIj48L2J1dHRvbj4K
Painting by Light — Mi
KPO Unia Europejska #NextGenerationEU Rzeczpospolita Polska
WRO ART CENTER
  • About the project
  • Miniature know-how