Parallaxograms: Etching selected data from 3D SDFs in acrylic

Motivation

My goal in this assignment is to etch a subset of the information in various 3D signed distance fields (SDFs) into acrylic plates, with the help of an SDF visualization approach that simulates parallax between object-like entities in the SDF based on the mouse's onscreen position.

Visualizing a subset of SDF data

The signed distance field of a sphere, for example, is simply the distance of an arbitrary point in 3D space from that sphere's center, minus the sphere's radius. By using an alternate convention to define a distance from the sphere's center, such as the cross product of two vectors associated with three points including the sphere's center, information can be extracted from the same SDF formula in a different way.

For example, imagine that the 2D screen that displays a shader is in the z = 0 plane, placing a point S on this screen at coordinates (x, y, 0). A virtual camera at point C, which has coordinates (xc, yc, zc), where zc > 0, is located in the space in front of the screen. Next, define another point P located behind the screen at coordinates (xp, yp, zp), where zp < 0. Next, define vector SC as (x-xc, y-yc, zc) and vector SP as (xp-x, yp-y, zp), noting that the sign conventions for these vectors' components are intentional. Finally, define a new vector that is the cross product of vectors SC and SP, and use this new vector as an input into 3D SDF calculations.

This is a key process that I use in this assignment, i.e. after the "Preliminary Test Etches" section. Combined with a few other steps, some of which add complexity to the visuals, I simulate parallax like effects using a basic 3D SDF structure as a starting point.

Preliminary Test Etches

These images and laser etchings represent my first use of the laser cutter to etch snapshots of procedurally generated images that simulate parallax for certain mouse movements. The process used to generate these source images (which are derived from 4D environments from a separate project) differs from the process I use to generate source images in this Assignment, but the etching tests were useful.

Etching test 1
Etching test 2

Intermediate Process Videos

These videos show the generation of parallax like effects from 3D grayscale SDFs. The mouse's position acts as a proxy for the location of the virtual camera in a plane parallel to the screen showing the shader. The SDFs in the videos use the same basic scaffolding of code, but vary in the combination of 1) a multiplier used to generate color with 2) how three vector cross products are algorithmically used.

Final Results

These laser etchings on 3/16" acrylic board (middle and right columns) essentially freeze views of a variety of 3D grayscale SDFs (left column) in both time and matter.

Parallaxogram 1
Parallaxogram 2
Parallaxogram 3
Parallaxogram 4
Parallaxogram 5

"Caustics" Examples

These are some interesting patterns (known as "caustics") that sunlight made when shining through acrylic "parallaxograms" onto a windowsill. A grid pattern from a window screen is visible too.

Caustics example