Split Depth Illusion

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


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:


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.


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.


From the first image, apply the inverse mask:


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.


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.