Hacker News new | ask | show | jobs
by 01HNNWZ0MV43FF 452 days 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

4 comments

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.
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.

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!

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?
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