Articles

Recipe 56: Relief

General Principles

  • Creating evenly spaced 3D objects

  • Making a 3D volumetric relief effect using video input

Commentary

To make volumetric objects like clouds, 3D developers will often use evenly spaced texture planes that represent different slices of the object. For this patch, I wanted to create a 3D relief effect using video luminance based on this idea of stacking planes.

Ingredients

  • jit.gl.videoplane

  • jit.anim.node

  • jit.jit.gl.pix

Technique

To create the effect, we start with 5 layered, evenly spaced jit.gl.videoplane objects. To do the positioning, we give each jit.gl.videoplane it's own jit.anim.path object. Since each jit.anim.node is parented to the one behind it, sending the same position value to all of them will result in an evenly spaced set of planes. The rotation is done on just the topmost jit.anim.node and all the videoplanes move as if they are a single object.

The next thing this effect needs is to take the video input and create luminance-based slices. To do this we do a simple lumakey using a couple of jit.gl.pix objects. One of the jit.gl.pix objects is just used to create a luminance image (similar to jit.rgb2luma for textures) that is passed to the right inlets of the other jit.gl.pix objects. The other jit.gl.pix objects are all identical, and take the right input and generate an alpha channel for the texture based on a threshold luminance value. The resulting textures are applied to the videoplanes.

by Andrew Benson on June 15, 2012

Creative Commons License
jpratcliffe's icon

Hello. I am trying to utilize this patch with the RGB camera on the Kinect with the jit.freenect.grab object. I have simply rewired your jit.grab object to be a jit.freenect.grab, using the RGB outlet, and the sliders seem to be effecting brightness rather than creating the same sense of depth. Any thoughts as to what a fix for this might be?