Anamorphic Lens Simuluation

How does an anamorphic lens work?

last updated by AJ Young on 1/30/2023


An anamorphic lens creates a look, considered by many filmmakers, that is uniquely cinematic. Anamorphic lenses work by squeezing the image into the camera. When we look at the image, it'll look squeezed, so we have to desqueeze the image back to normal.
So, how do we squeeze an image? There are currently two methods:
  • Cylinder Lenses - The most popular method for a variety of reasons. This lens is block of glass that has a cylinder shape cut out of it. The cylinder shape then squeezes the image.
  • Prism Lenses - Once popular in the 50s, but big and heavy. This lens uses two (or more) triangular prisms to squeeze an image via Brewster's Angle.
Let's try to re-create each in a virtual 3D environment. Our tool of choice: Blender

This will be a simulation. The following lenses are not accurate real-world recreations, but a close approximation.

Cylindrical Anamorphic Lens

With the use of Blender's geometry nodes, I've create a simple cylindrical anamorphic element:

Geometry nodes allows me to non-destructively create the lens, which essentially means I can change certain aspects of it. Most importantly, how fine the curve is, noted as resolution. The above screenshot shows a cylinder lens made at 2048 resolution. Let's take a closer look:

The above screenshot shows the high resolution version of the cylindrical lens. The cruve is incredibly smooth. What if we lower the resolution?

The above screenshot shows the low resolution version of the cylindrical lens. Notice how we can clearly see the individual slices of the glass.

How will these two resolutions turn out when we render?

The above, squeezed, render is of the 2048 lens. Even at that high of a resolution, we can still see the "stair stepping" of the cuts in the glass. Look at the circle in the bottom right for a clear example of the stair stepping. For posterity, let's look at the desqueezed version:

The stair stepping is more exaggerated, but of course in the real world cylinders are cut at a higher resolution, almost near infinite.

Now, let's go lower in resolution to see what happens:

Wow! That's definitely low resolution. Look at how blocky the image is! Let's desqueeze it and see what happens:

Desqueezing definitely makes the image more...legible, but it's still so blocky.

The most interesting part of this simulation is by and far the resolution of the cut glass. Again, this isn't a problem in the real world because of how cylinders are made, but this does demonstrate how the squeezing of the image only takes place horizontally.

Prism Anamorphic Lens

Prism anamorphic lenses use a pair (or pairs) of identical triangular prisms to squeeze the image with Brewster's angle. Here's what it looks like:

The aboe image shows light going from left to right, expanding. Our lens will flip this so the image will be squeezed rather than expanded. Here's what our virtual lens will look like:

To keep down on reflections, we'll also construct a housing to go around the prism:

Now that we have our lens made, what does it look like?

That's incredibly clean! Because we're using an infinitely flat surface in our virtual environment, there will be no imperfections on the image. Let's desqueeze it:

Sooo clean! Notice the curvature beginning to happen on the sides of the image. We're definitely stretching our virtual optics!

Try it yourself!

I've included the blender files for both lenses. Load them up yourself and play around with resolution, position, focal length, etc.

NOTE: You this simulation will only work with Blender's Cycles render enigne. I'm not sure if it will work with other ray-tracing engine, but they definitely will not work with any real time engines like Blender's EEVEE.