Settings

Theme

Piranesi's Perspective Trick (2019)

medium.com

352 points by amatheus 9 months ago · 91 comments

Reader

bemmu 9 months ago

I'll take this opportunity to drop the fact that I'm kind of obsessed with the book "Piranesi", where the main character (named after the artist in the article) survives in a world which is just endless corridors of classical architecture, statues, and staircases.

It's an incredibly calming experience, I've listened to the audiobook over 10 times before sleep. Highly recommended.

  • asicsp 9 months ago

    A very different book, but I loved reading "Jonathan Strange & Mr Norrell" [0] as well by the same author.

    [0] which used footnotes to great effect

  • WD-42 9 months ago

    Clicked the article for the book, stayed for the awesome explanation on how perspective works.

  • echelon_musk 9 months ago

    This must have been the inspiration for the Counter-Strike map de_piranesi !

    • teraflop 9 months ago

      No, the CS map predates the novel by almost 20 years. Almost certainly they were just both inspired by the same artist.

  • AndrewStephens 9 months ago

    I second this review - Piranesi is a fantastic and inventive novel.

  • OnionBlender 9 months ago

    I remember being very frustrated with the main character while listening to the audio book. I enjoy the memory of the story a lot more than I remember actively listening to the story. I think I kept trying to "figure out" the world like it was a puzzle. I also find naive characters very frustrating. It wasn't until I finished the story that I really appreciated it.

  • whatrocks 9 months ago

    I think about this book ALL the time. It was way more terrifying than calming to me. But still absolutely love it / haunted by it.

  • nmca 9 months ago

    A truly wonderful novel that I also opened the comments to shill.

  • flopsamjetsam 9 months ago

    Loved the book. Bought it in hardcover, based just on the blurb, which sounded so futuristic and imaginative. Surprised me in ways I didn't expect.

  • bityard 9 months ago

    I absolutely adored Johnathan Strange and Mr. Norrel, I don't read a _ton_ of fiction, but somehow stumbled into it and recommend it to anyone who will listen.

    But I couldn't get into Piranesi at all. The first few chapters never seem to actually go anywhere. It got terrific reviews so maybe it's just too abstract for me.

    • justonceokay 9 months ago

      It reads like a parable and you are right there isn’t a lot of action. I thought the imagery was very stark and the relation the main character had to the world is similar to an abuse victim rationalizing their situation.

  • jackstraw14 9 months ago

    Read the book once, will definitely check out the audiobook. I got in the habit of reading it before bed too, sounds perfect.

  • henrebotha 9 months ago

    Absolute banger. I am convinced it will be held up as a true classic.

  • vagab0nd 9 months ago

    There are a few "wait what?" moments in the first half of the book that no other books have matched.

  • agnishom 9 months ago

    Came here to say this. I loved the voice of the main character.

SamBam 9 months ago

> By legibility I mean that the Piranesi distortion is easier to read, and that to anyone unfamiliar with photographs, that hasn’t grown up with TV, photographs and magazines, the Piranesi version would look much better, and the true perspective would look rather odd.

I think this is a key point that people are often unaware of. For instance, whenever I see a modern artist who has painted photorealistic art, I read discussion about how amazing it is that this artist can paint something so perfectly life-like, and the Renaissance artists were clearly inferior, since they couldn't paint with such skill.

Besides the obvious discussion about the purpose of art, the other question is whether a photorealistic painting is actually more "lifelike?"

Sure, it represents the world exactly the way that a camera sees it, but does it represent the world exactly as we see it? With our human brains we are filling in details, we are focused on the subject of the painting, we are distorting, we are re-mapping shades of color to what we know they ought to be. "Lens blur" in particular isn't remotely the way our eyes perceive the world: our eyes can never roam around the unfocused parts of our own image, rather we ignore the blurry parts unless we specifically try to notice them, and anything we try to focus on becomes sharp.

So I appreciate the authors recognition that Piranesi's perspective may indeed be closer to how we perceive the world than "correct" perspective.

  • bonoboTP 9 months ago

    > rather we ignore the blurry parts unless we specifically try to notice them, and anything we try to focus on becomes sharp.

    Unrelated to perspective: Artists often put more detail in places that you're "supposed to" look at, and leave other things more as a blurry sketch, and our eyes naturally don't linger on those parts. What's interesting to me is that I can often recognize AI art by the way it doesn't make use of this, it tends to make everything equally detailed.

    • jcalx 9 months ago

      I learned this back when I used to make maps for Source games (Team Fortress 2, CS:Source, etc.) — at first I sprinkled props and detailed geometry equally throughout the level, but it's better (in terms of art direction, player attention, and performance optimization) to put details in places that "matter". Valve does this [0] in their official maps and it's actually hard to notice until you really pay attention to it.

      [0] https://nodraw.net/2010/08/tf2-density-of-detailing/

    • dhosek 9 months ago

      One of the most dramatic things in this respect is to look at a photograph of a flame. Our lived experience of what flames look like is very different. The same is true of nearly any dynamic object in life (flowing water is another great example where the photograph doesn’t look like what we experience).

      • semi-extrinsic 9 months ago

        Those examples are very challenging because they are volumetric objects, in addition to being dynamic. The flame does not even have a well-defined surface. What you see as red/yellow in the flame is in fact just glowing soot particles, and the point where this disappears is just a temperature difference in the gas such that the soot stops glowing.

  • roughly 9 months ago

    One of my favorite books is "Seeing Like a State"[1], which talks about how the modern world has transitioned from talking about things like distance and space in human terms ("an hour's walk", "six bushels' worth of crops") to a surveyor's terms ("3 miles", "5 acres"). In the modern world, we're very used to thinking about things as mediated by technology (maps, cameras, compasses), and that affects how we think about arts, as well - matching what a camera produces is "photorealistic", but isn't how we actually _see_ things. This is one example, another I've always found fascinating is that the large Chinese landscape paintings play a trick where the perspective shifts depending on where you're looking - the whole work does not share a single perspective point, but any given point on the scroll looks "correct" for that spot and its surroundings.

    [1]https://bookshop.org/p/books/seeing-like-a-state-how-certain...

  • kqr 9 months ago

    I strongly agree.

    > The distinctive feature of Piranesi’s perspective trick is that when you have a series of similar objects receding into the distance, such as houses or arches in a bridge, the nearer versions are just drawn as larger versions of those in the distance

    This makes so much sense. When nature presents me with a series of identical arches, that is how I'm going to interpret them. Not as the geometric shapes that are actually projected onto the backs of my eyes.

  • Etherlord87 9 months ago

    You make good points, but if we really perceived reality differently than cameras, someone would write an article about that - after all you can take a photo on your smartphone and compare to your IRL view. Yes it's hard to make it match but it's possible. Since no one made an experiment to show this, and since we understand pretty well the optics of a human eye, I think the cameras actually reproduce human vision decently. The aspect of a psychological bias and filling stuff in perhaps distorts in each possible way, so the camera shows the average human perception.

    • WantonQuantum 9 months ago

      One thing that cameras can do that we can't do with our (unaided) eyes is change focal length. When a camera zooms in or zooms out, there is a change in the geometry of perspective. When zooming in, the change is difficult to see but is well documented. Portrait photographers are well aware of this because it tends to make people look better. When zooming out, especially when zooming out to a very wide field of view, the effect can be very noticeable. When people use a phone camera to take a picture of a group of people, the people at the edges of the photo can look very flattened and unnatural. Again, this effect is well known and very much discussed and written about in photography and art. In the article about Piranesi's work, we see a very interesting remedy to the perceived distortion of a wide view. Again, these works show a field of view, and therefore a focal length, that is not possible with our eyes. We can visualise in our mind's eye what the scene looks like but what our eyes are doing is moving around the scene while our visual cortex and ultimately our mind's eye construct a mental model. In our minds, we know that the arches of the bridge are the same size and shape despite being distorted by distance. We can look at what's in front of us and see that in the receding row of arches the nearest appears to be bigger than the farthest but we also know that's just an artefact of our point of view. Things are subtly different when we look with our eyes at a photograph, painting or drawing. It's not the same as when we see something in real life, we're looking at a 2 dimensional representation of a 3 dimensional scene. We do see the perspective in the picture - we don't see a bunch of lines on a two dimensional plane. Our brains are making that happen and are making some adjustments along the way. It just so happens that something we have difficulty adjusting so it "looks right" is a very wide angle scene. That's because we don't ever see a very wide angle scene in one glance in real life.

      • kqr 9 months ago

        > When a camera zooms in or zooms out, there is a change in the geometry of perspective.

        This is the opposite of what happens. The perspective is exactly the same, only cropped to a narrower field of view.

        Changed perspective would be counteracting the lens zoom with foot zoom -- now this causes the change in perspective you talk about. But it's caused entirely by moving the camera. The zoom is just to preserve framing and could just as well be accomplished by cropping in post, assuming sufficient resolution.

        • WantonQuantum 9 months ago

          You are 100% correct! I was unconsciously assuming the foot zooming. Thanks for picking that up!

        • nyanpasu64 9 months ago

          I think foot zoom is the primary reason for faces looking weird (big noses) in smartphone selfies, while "a photograph occupying less of your FOV than the camera was capturing" is why people at the edge of a photo look distorted.

    • bazoom42 9 months ago

      Just one well known difference: Human have two eyes and we use the difference to determine distances. A photo is flat.

      Another difference: In human sigth you can only focus on the center of the vision field, while on a photograph you can look at unfocused points and observe the distortion on the edges of the picture. Human observation (like looking at the bridge in the pic) is really a series of observations where we move the focus.

  • bazoom42 9 months ago

    Notably, photorealism is called photorealism because it deliberatley tries to reproduce photography, not because it tries to reproduce observable reality.

jcalx 9 months ago

Panini projection is built into Unity and Unreal. From the documentation from the latter [0] you can see how it's essentially a cropped fisheye-ish projection. That doc also has (in my opinion) a clearer comparison on how the two projections differ, especially looking at the layout of the square tiles on the floor in the first set of pictures.

[0] https://dev.epicgames.com/documentation/en-us/unreal-engine/...

ibaikov 9 months ago

Wow, this is SO cool! It looks better because you can see the details of objects far from the 'camera'. This is basically what you do when you are there in reality, constantly refocusing on objects. This perspective trick to me is a map of zones on the picture on which I will focus.

I wonder what would happen if we'd render videos using it, and maybe games? Could this be a solution to better graphics? Would movement ruin it? Please tell me!

dust42 9 months ago

The panotools wiki has a good comparison of different projections of the same photo. Google Streetview uses equirectangular pictures to store 360° images. Panini is another type of equirectangular.

Examples

Panini: https://wiki.panotools.org/File:Ben_Equirectangular_panini.j...

Equirectangular: https://wiki.panotools.org/File:Big_ben_equirectangular.jpg

Full list: https://wiki.panotools.org/Projections

nyanpasu64 9 months ago

My theory is that most perceived perspective errors arise when a photograph captured with a wide field of view is shown in a narrower one; a perspective-"distorted" image looks more realistic if you put your nose up to the screen so the photograph fills more of your field of view (enlarging the center and eventually squashing the edges). And tricks like Panini projection and Piranesi's arches are ways of making features at the edge of the screen "take up" the correct amount of viewing angle (without bending straight lines) when the painting takes up less of your vision than the original scene.

01HNNWZ0MV43FF 9 months ago

> it isn’t possible to construct a camera or a computer program to render a view that does this

Hmmm

> The mathematics of this is quite simple

If so then surely a program could be written

  • jmilloy 9 months ago

    Doing it with a camera/computer requires identifying the objects that need to be drawn in "Piranesi Perspective". The mathematics of laying out the objects is quite simple, but rendering a raster image into a view such that the key objects have this perspective probably isn't possible. You would need to vectorize the image in a general way. I don't know the state of the art in that field, but it sure seems hard.

  • hulium 9 months ago

    He has written a program:

    https://github.com/brunopostle/piranesi

    The problem is that it is a method for projecting a rectangle, not a full 3D scene. I can imagine though that it could be extended to a full projection if you specify a central axis along which the perspective trick happens.

  • jihadjihad 9 months ago

    It confused me too, and maybe I am wrong, but I took it to mean, "can't render an existing (i.e. non-Piranesi) view into Piranesi perspective." Meaning, if you're an artist starting from scratch, you could do it (using the math given)--and some of those examples seem like aspects of one drawing employ Piranesi perspective while others don't.

    So maybe the author was just saying if the work was drawn with "true" perspective throughout, there isn't a programmatic way of converting the entire thing over to Piranesi. That's at least how I read it, I'm curious about it too!

    • JKCalhoun 9 months ago

      Yes, perhaps the computer needs information on which pixels belong to which buildings in order to apply perspective-per-object, rather than perspective-to-the-entire-image?

  • 01HNNWZ0MV43FF 9 months ago

    Something is up with that green building on the right, too. It's wider in the "true perspective" views, wider even than the ortho view

rozab 9 months ago

Here is the Panini projection paper, it's a good read[0].

Unreal Engine has support for it as a post-processing filter[1], but I don't know of any games using it.

[0]: http://tksharpless.net/vedutismo/Pannini/panini.pdf [1]: https://dev.epicgames.com/documentation/en-us/unreal-engine/...

thewellis2 9 months ago

Piranesi's imaginary prisons are worth a viewing. Great gothic prisons from a fever dream rendered in a similar fashion to these engravings.

brookst 9 months ago

Came expecting commentary on the POV used in the (excellent) novel, learned great stuff about visual arts and incidentally more context about the book. Thanks for posting!

damnitbuilds 9 months ago

In the image with the caption:

  "Normal homography perspective transformation produced in GIMP. Note how squashed the buildings at the right and left are when taken in isolation"
The building at the right is not squashed ? It is wider than in the Piranesi picture above.
  • SamBam 9 months ago

    It would have been nice to show a few more easy-to-understand comparisons. The "street view" image was nice, but blurry. Ditto with the map. I think if the last image of the two buildings had been shown side-by-side with the "correct" perspective, that might have helped explain the article.

    • inanutshellus 9 months ago

      This was a really cool article and I hope others read it through, but yes, it took me way too far into the article to "get" what he was saying was wrong with the perspective.

    • morley 9 months ago

      I wonder how hard it is to change a game engine to render images like this, and if the effect would be preserved while panning.

      • svachalek 9 months ago

        I think the difficulty comes from it being context dependent, it's not a consistent distortion of the true image the way most projections are, it identifies synthetic structures in the foreground and warps everything else (including similar structures in the background) around them. It should be possible for an AI filter though.

    • JKCalhoun 9 months ago

      Yeah, I thought better (cleaner?) examples would have helped.

  • stronglikedan 9 months ago

    > The building at the right is not squashed ? It is wider than in the Piranesi picture above.

    The building on the right is squashed, in isolation. When you take the building by itself (in isolation), it is indeed wider than the picture above, but it is also the same height, i.e., squashed.

  • achr2 9 months ago

    They mean distorted, not squished for both.

kazinator 9 months ago

This reminds me of an issue in vintage computer graphics. Say you have a game with some polygons happening, and they're nicely rendered in 3D perspective. You'd like to add some snazzy textures to them.

Here's a problem. The textures have to be put through a perspective projection. As in every pixel.

It's possible to cheat. You can simply use a bicubic stretch or even linear. It really shows up when the polygons are large and they rotate to create deep perspective. You see an artifact whereby the center of the texture does not stay centered on the polygon as it rotates.

bonoboTP 9 months ago

If liked this, you might also like:

https://aaronhertzmann.com/2024/06/10/perspective-distortion...

https://aaronhertzmann.com/2024/09/09/dvc-multiperspective.h...

achr2 9 months ago

This is really interesting, I'd love to see this perspective incorporated into mapping software like google maps/streetview.

ChrisMarshallNY 9 months ago

That's a really cool article!

TIL.

It makes absolute sense, but I never even thought about doing it that way. I was trained as an artist, and I always did perspective the "classic" way. It's entirely possible that this might not work on some subject matter, but it works great on buildings.

Fraterkes 9 months ago

I half remember an articled or docu from a while ago where someone was analyzing the perspective in some studio Ghibli backgrounds, finding that many are artistically "distorted". When this was brought up to one of the artists, they responded along the lines of: "The western idea of 1, 2 and 3 point perspective is just one way of drawing perspective and not necessarily more 'correct'." (I guess that's true, even if you think of 1 and 2 point perspective as cropped versions of a 'true' perspective image, the lines wouldn't be completely straight in reality. It's all different kinds of artistic license).

frankfrank13 9 months ago

A great example of something you can feel but I never had the words for.

> But here is the same elevation drawn using correct rectilinear perspective. I hope you will agree that the Piranesi version is much more legible, the furthest house above is easier to see and the nearest house isn’t horribly distorted as it is below.

The section with this bit has some pictures that really illustrate the effect.I wish there was an easy photoshop way to recreate this

tobr 9 months ago

Surely this introduces some curvature to the diagonals? I can't see how the perpendicular lines can be in correct perspective with the diagonals being parallel unless something is curving. I guess because it's preserving the perpendicular lines and the curvature is subtle, it's not very noticeable in typical architectural pictures.

  • JKCalhoun 9 months ago

    Curvature maybe — "skew" seems more likely.

  • account42 9 months ago

    It's not a real projection as in a panosphere -> rectangle mapping but rather a local transformation of specific objects.

senkora 9 months ago

I think that this trick or something like it is used in ski mountain maps. For example: https://files.skimap.org/js03b74i9eokcg2y1iakwdtv2av6.pdf

I don't know how to confirm this; the distortion just feels similar to me.

novosel 9 months ago

I highly recommend to the people cross-interested in film theory, the Eisensteins book essay The philosophy of composition. At great length talking about Piranesi perspective.

bazoom42 9 months ago

Piranesi also made an amazing set of depictions of imaginary “dungeons”, sometimes using escher-like trick perspective.

aqfamnzc 9 months ago

Great article. And thanks for the correct OSM attribution in your map images. :)

_wire_ 9 months ago

Last Year at Marienbad (1961)

https://en.m.wikipedia.org/wiki/Last_Year_at_Marienbad

aappleby 9 months ago

Lol, it's literally affine texture mapping.

  • Etherlord87 9 months ago

    Read the article and look at the examples - there still is perspective, just no perspective distortion (or the other way around, there is a perspective distortion to keep some lines parallel, where in normal view this wouldn't be the case).

amelius 9 months ago

I really hate it when a designer takes a perspective rendering with the camera really close, and then modifies the object so that it looks that way from a normal distance. Not sure if that's what happened here (can't read the article), but designers should not do that.

rossdavidh 9 months ago

"So here is a general 2D remapping as a prototype replacement for the perspective tool in image editors (I have no ability to add this to GIMP, somebody else needs to step up)..."

Well given that this is HN, if there's any forum where somebody has experience contributing to GIMP, it should be here. Any takers?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection