Split Depth Illusion

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

/images/camera3D/split_depth_illusion/captain_america.gif

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:

/images/camera3D/split_depth_illusion/spiralsplitdepth-behind-component.png

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.

/images/camera3D/split_depth_illusion/spiralsplitdepth-front-component.png

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.

/images/camera3D/split_depth_illusion/spiralsplitdepth-front-component-modified.png

From the first image, apply the inverse mask:

/images/camera3D/split_depth_illusion/spiralsplitdepth-behind-component-modified.png

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.

/images/camera3D/split_depth_illusion/spiralsplitdepth-composite.png

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.