Introduction

A 2D or 3D interactive Processing Scene. ProScene (pronounced similar as the Czech word “prosím” which means “please”) provides an interface between Dandelion and Processing (Figure 1 depicts the software architecture).

ProScene provides seemless integration with Processing: its API has been designed to fit that of Processing and its implementation has been optimized to work along side with it. It supports all major Processing flavours: Desktop, JS, and Android.

ProScene support is led by the active and great Processing community at its forum where you can reach us. Please report issues at github.

Key features

  • Tested under Linux, Mac OSX and Windows, and properly works with the JAVA2D, P2D and P3D Processing renderers. No special dependencies or requirements needed (apart of course from Processing-3.x).
  • It supports all major Processing flavours: Desktop, Android and (soon) JS.
  • API design that provides seemless integration with Processing (e.g., providing flexible animation and drawing mechanisms), and allows extensibility of its key features.
  • Generic support to Human Interface Devices (HIDs), including not only the mouse and the keyboard, but advanced HID’s such as a touchscreen, a space navigator or a kinect.
  • Keyboard shortcuts and HID bindings customization.
  • Hierarchical coordinate systems (frames), with functions to convert between them.
  • Interactive frames (including the camera) which may be manipulated by any HID.
  • Arcball, walkthrough and third person camera modes.
  • Default interactivity to your Processing scenes through the mouse (or touchscreen) and keyboard that simply does what you expect.
  • Visibility culling: Back-face and view-frustum culling.
  • Keyframes.
  • Animation framework.
  • Object picking.
  • Screen drawing, i.e., drawing of 2d primitives on top of another (2d or 3d) scene.
  • Off-screen rendering mode support.
  • Save and load configurations.
  • 2D and 3D Interactive mini-maps.
  • Handy set of complete documented examples that illustrates the use of the package.
  • A complete API reference documentation.
  • Active support and continuous discussions led by the Processing community.
  • Last but not least, released as free software under the terms of the GPL-v3.

Origin of the name

ProScene not only means a “pro-scene”, but it is a two-phoneme word pronounced similar as the Czech word “prosím” (which means “please”), obtained by removing the middle phoneme (“ce”) of the word pro-ce-ssing. Thus, the name “ProScene” suggests the main goal of the package, which is to help you shorten the creation of interactive 2D/3D scenes in Processing.

Usage

All library features requires a Scene object (which is the main package class) to be instantiated (usually within your sketch setup method). There are three ways to do that:

  1. Direct instantiation. In this case you should instantiate your own Scene object at the PApplet.setup() function.
  2. Inheritance. In this case, once you declare a Scene derived class, you should implement proscenium() which defines the objects in your scene. Just make sure to define the PApplet.draw() method, even if it’s empty.
  3. External draw handler registration. You can even declare an external drawing method and then register it at the Scene with addDrawHandler(Object, String). That method should return void and have one single Scene parameter. This strategy may be useful when you have the same drawing code shared among multiple viewers.

See the examples BasicUse, AlternativeUse, and StandardCamera for an illustration of these techniques. To get start using the library and learn its main features, have a look at the complete set of well documented examples that come along with it. Other uses are also covered in the example set and include (but are not limited to): drawing mechanisms, animation framework, and camera and keyboard customization. Advanced users may take full advantage of the fully documented API reference (which is also included in the package file).

Installation

Import/update it directly from your PDE. Otherwise download your release from here and extract it to your sketchbook libraries folder.

Hacking

Read-only access setup

Use it as any other basic github repo, i.e.,:

1
2
3
4
5
# clone it:
git clone https://github.com/remixlab/proscene.git
cd proscene
# pull changes in:
# for pull requests simply refer to: https://help.github.com/articles/using-pull-requests

Read-write access setup

Clone the repo and add the remotes (here we refer to them as “subtrees”, see Figure 1):

1
2
3
4
5
6
git clone https://github.com/remixlab/proscene.git
cd proscene
git remote add -f bias https://github.com/remixlab/bias_tree.git
git remote add -f fpstiming https://github.com/remixlab/fpstiming_tree.git
git remote add -f dandelion https://github.com/remixlab/dandelion_tree.git
git remote add -f util https://github.com/remixlab/util_tree.git

Update from time to time:

1
2
3
#Fetching command, here <remote> is one of: bias, fpstiming, dandelion or util.
git fetch <remote> master
git subtree pull --prefix src/remixlab/<remote> <remote> master --squash

To contribute back to upstream:

1
git push

To contribute to a particular subtree (i.e., bias, fpstiming, dandelion, or util)

1
2
#Here <remote> is one of: bias, fpstiming, dandelion or util.
git subtree push --prefix=src/remixlab/<remote> <remote> master

Acknowledgments

Thanks to Eduardo Moriana and Miguel Parra for their contributions with the TUIO-based touch and kinect interfaces, respectively. Thanks to experimental computational designer Amnon Owed for his collaboration with polishing the KeyFrameInterpolator sub-system. Thanks to Jacques Maire for providing most of the examples found at the contrib section. Thanks to Andres Colubri for his continuous support and thorough insights. Thanks to Victor Forero who is developing the proscene Android port. Thanks also to all ProScene users whose sketchs and library hacks always amaze us and inspire us.