Split Depth Illusion

Split Depth Animations are inspired by Split Depth GIFs, such as this one:

captain america standing in a alley throwing his shield directly at the viewer.

The white bars serve as a occlusion plane, giving the illusion of depth. Your brain will interpret objects that are behind the bars as farther away. Objects in front of the bars, or objects that occlude the bars, will seem closer.

Camera3D can use the same principles to make objects in your sketch seem to come out of the screen. In this example, we will animate some cubes moving in a spiral pattern. Consider this image:

spiral of colored cubes emerging from the center of the image.

Now re-render that with the scene cut in half, depth-wise. What Camera3D is actually doing here is using the frustum function to clip objects that are far away from the camera. It is also using the background function to make the background white. Notice that the more distant cubes are now gone.

arc of colored cubes gradually increasing in size.

From that image, apply a mask to copy out pixels for where the occlusion plane will be. Objects that are in front of the plane will still be visible.

three black rectangles with two white bars separating them, pieces of colored cubes are visible only in the non-black areas.

From the first image, apply the inverse mask:

arc of colored cubes gradually increasing in size, with two black bars covering up the image.

Adding the two together, yielding a picture identical to the first but with an occlusion plane. No shadows are cast onto the white occlusion plane, just like split depth GIFs.

spiral of colored cubes gradually increasing in size with two white bars in the center. The white bars are blocking the view of the cubes in the center of the spiral.

This works because of a clever use of the frustum function.

Here's what the animated sketch looks like:

Neat! 3D effects without the glasses.