Weird reverse perspective, animated

BB co-conspirator Jeremy Mooney-Somers created this surreal and amazing proof-of-concept animation to illustrate "True Reverse Perspective." It reminds me of what The Cabinet of Dr. Caligari might have looked like if it were a cartoon. Jeremy writes:
In Reverse Perspective the expected visual rules are inverted, so close objects are small and far objects are big. This is not only true for whole objects, but their structure as well. So the near points of an object are closer together, relative to its far points, which gives the flared-out look of the buildings, and the scene as a whole.

Essentially, the positions of the vanishing-point and the focal-point are swapped. So now we are at the vanishing-point, where geometry shrinks to nothingness, and the focal-point lies some distance ahead, beyond which objects scale to infinity.

The effect is achieved entirely in-camera. The scene and models themselves have no unusual scaling, they're laid out in a normal / perpendicular fashion; the way the camera 'sees' the scene is altered to create the effect. Perspective is truly reversed.
True Reverse Perspective


      1. Can you be more specific? Can’t find anything remotely similar to this online. The song isn’t on whosampled, nor is it any of the songs in the Chief’s tribute to Chick Corea.

  1. It’s neat looking but the guy acts like it’s never been done before. In the 70s and 80s when hidden surface removal was still a chore one of the first things you’d wonder is what would happen if you changed the sorting, or made screen X and Y proportional to, instead of inversely proportional to Z.

    Here’s a web example from Martin Wattenberg, 1997

    1. Not sure what you mean by “…the guy acts like it’s never been done before…” Since:

      1. If you click the link he only says it’s not been done in CG before and

      2. He actually talks about the other times it has been done before

    2. JFrancis, from the description:

      I am unaware of anyone attempting a full environment in RP on purpose, but I can’t imagine it hasn’t happened, at the very least accidently, when people were developing computer-visualization algorithms and writing game-engines.

  2. I felt like the airplane character was underdeveloped, though I liked the tension between the red and blue cars. It takes real guts to leave that story line unresolved.

  3. A simpler but more mind-boggling trick is to switch the prism on an (old) 3-D projector. Objects will appear to almost vanish as they crash into the screen

  4. For an even more disturbing effect, attend a 3D movie and flip the polarized glasses they give you upside-down. The background is suddenly sticking into your face while the foreground objects seem to punch moving holes in the background and are far away.

    1. I’ve done that b4 but I never noticed any wierd effects from the polarized glasses upside down OR looking at them thru the front instead of properly from behind.

  5. I was mostly curious about referring to an effect as “in-camera” when it’s computer generated imagery. Is he just using a colloquialism or is there some other meaning behind “in-camera” when there’s no actual camera involved?

  6. dc,

    The effect above is achieved by altering the camera’s algorithm, so the results are as the camera “sees”, as opposed to just building trick geometry (or just animating the cars bigger and smaller in place, or setting them on a script based on their distance from the camera).

    If you move the camera around the world, the effect will be consistent to the viewer. Therefore “in camera”.

  7. If you go to a 3D movie, try turning the glasses around. It’s kind of like the reverse perspective trick looking through a weird tunnel.

    Oddly this is I see those weird steroegram pics where you look unfocused at carefully distorted visual noice.

  8. Shizuku’s novel-within-a story in Studio Ghibli’s “Whisper of the Heart” uses the same perspective trick, although as a metaphor for the untutored dramaturge’s penchant (as Shakespeare noted) to produce marvelous tales about seven pages long.

  9. Perspective is truly reversed

    Er, no. You’re just tweaking the projection matrix, the perspective divide is still happening.

    It’s effectively reversing the direction of the depth buffer in a particularly perverse way. You can get the same effect by clearing the depth buffer to the opposite end, and reversing the depth test.

    If I get time, I’ll post an OpenGL example.

    1. If I get time, I’ll post an OpenGL example.

      Here, why not just use mine:

      glViewport(0, 0, w, h);

      float m[16] = {
      -1.0f, 0.0f, 0.0f, 0.0f,
      0.0f, 1.0f, 0.0f, 0.0f,
      0.0f, 0.0f, -1.0f, 0.0f,
      0.0f, 0.0f, 0.0f, 1.0f };


      Er, no. You’re just tweaking the projection matrix, the perspective divide is still happening.

      Sigh. The projection matrix is the digital manifestation of how-perspective-functions in the CG universe. I inverted the way that works; hence perspective in the CG universe is now reversed. I’m not sure of your distinction. What exactly would I have to do to “truly reverse perspective” to your satisfaction?

      And I didn’t simply reverse the depth order. As seen above I simply flipped the sign of the z-scale in a custom matrix, and then multiplied it by the PM, so that when the ViewFrustrum is stretched into the CanonicalViewVolume, it happens backwards (the VF is now backwards, so when the CVV transformation happens the vanishing point is now near (shrinks) and the focal point is now far (expands)).

      Arkizzle made a decent attempt at it explaining it above, about the “in camera” line. The “truly” is a way of separating this work from some of the other interpretations of Reverse Perspective that are not consistent in their application, like Russian Orthodox Icons etc. They follow the intent but not the rules. Here, the rules are everything.

      I’m not sure about your tone. It sounds like you’re personally offended somehow.

      1. The projection matrix is the digital manifestation of how-perspective-functions in the CG universe. I inverted the way that works; hence perspective in the CG universe is now reversed. I’m not sure of your distinction. What exactly would I have to do to “truly reverse perspective” to your satisfaction?

        The projection matrix is not the whole picture. That just maps the view to a unit cube, and stores distance in the 4th (w) component of each vertex.

        The perspective divide is where perspective is actually applied- this happens after the projection transform; x,y, and z are divided by the w component.

        In your example, you’ve not changed the 4th row of your matrix, so your w component is identical to a standard perspective projection. Now when the perspective divide happens, your x & y will map to the same position as normal, whereas your z will map to something like farz-z. So you’re effectively reversing position in the z-buffer.

        What you really want is screenx=x*z; you’re getting something that resembles screenx=x/(farz-z) instead. It does make things increase size with distance, but not in an exact reversal of perspective.

        Incidentally, why do you flip x as well as z?

        To get true reverse perspective, you’d have to get rid of the perspective divide, and replace it with a multiply instead.

        You can’t (as far as I know) stop it doing the perspective divide in OpenGL or D3D, but if you force w components to be 1 (use 0,0,0,1 in the w bit of the projection matrix) it will effectively do nothing. You could then do the projection and the perspective multiply in a vertex shader, and you would really have ‘true reverse perspective’. Sounds like a fun experiment.

        1. Wow, I’m not even sure I agree with your assessment, but that’s pedantic.

          As I said, the “truly” is to differentiate from earlier inconsistent implementations of RP, just that.

  10. OK, there’s a python script here to demonstrate with a teapot. Needs Python (I’m on 2.6), wxPython & PyOpenGL.

    Press the button to reverse the z-test, L-click & drag to rotate, R-click & drag to zoom.

    With reverse off, it does
    and with reverse on,

  11. The amazing thing is how quickly the eye (or rather, the brain) seems to adapt to it – I’m sure that in just a few hours of walking around in a world like that, you could operate almost normally.

    1. Eltanin,

      It’s true :) But try working in this environment, there are still some oddities that don’t come across in this video; like when you zoom toward an object it gets smaller! That take a lot of getting used to :)

      Also, try the TRP-Silhouette video on the same vimeo page. You’ll see that your brain can keep getting fooled, even though it knows the true shape of the geometry.

  12. Maybe I am being pedantic, but you’ll get a quite different result if you can replace the perspective divide. In standard perspective projection, the rate of change of screen size is greatest at the near z plane, and straight lines will always be projected straight.

    In your projection, rate of change of screen size is greatest at the far z plane (demonstrated in the video by the cars rapidly changing in size near far z, not changing much at near z), and straight lines will curve increasingly as they approach far z (demonstrated in the video by the increasing width of the road approaching far z).

    Replacing the perspective divide with a multiply would give a uniform increase of size with distance, and straight lines would (I think) remain straight after projection.

    If you did write a shader that could replace the perspective divide, this would also give far greater control over the strength of the ‘reverse perspective’ effect- you could even animate from standard to reverse perspective- that I would love to see.

    1. OK, here’s a funny thing: I read that and was totally sold. I was just writing a reply saying it was a fair and interesting statement (which it is) and went on to explain the limitations of the platform I was using.

      But then I realised (slowly; I’m tired) that what you are describing is, in fact, what I intended. You say that rate-of-change is happening in reverse to how standard perspective works.. surely that’s the point. When the cars drive toward us in reverse perspective, they are driving into the notional “distance”, so they will apparently change less at nearZ than at farZ (contrary to standard perspective).

      Maybe I’m not reading you right, but it seems that when perspective is reversed the rate-of-change-over-distance should be reversed too.

      Still, thanks for the input, and if I am getting you wrong please do let me know.

  13. but it seems that when perspective is reversed the rate-of-change-over-distance should be reversed too

    I guess that’s one way of looking at it. I’d argue that as ‘standard’ perspective halves the size of an object as its distance doubles, ‘reverse’ perspective should double its size as distance doubles. This would also result in straight lines in world-space being rendered straight in screen-space (I think this is quite important; you might disagree).

    This would mean that rate of change of screen size would remain constant over the whole distance range- perhaps not a ‘reversal’ of ‘standard’ perspective, but definitely different. I’m not sure there is one projection system that will ‘reverse’ every single feature of ‘standard’ perspective…

  14. Sounds like we’re just coming at it from different… (dare I?) perspectives!

    Butseriously, I’m not sure what you mean by the straight-lines thing. Straight lines stay straight throughout; have a look at my test videos. Do you mean a sort of fish-eye distortion? You mention the road, above, but in world-space the road actually curves as it approaches farZ (to the left and up, over the hill) – is that what you are referring to?

    I’m not sure there is one projection system that will ‘reverse’ every single feature of ‘standard’ perspective.

    I’m sure that’s true, too. Again though, the “true” was not to say “definitive”, it was to distinguish it from previous, non-rules-consistent attempts (in paint, usually).

    When I originally wrote the description of TRP for the vimeo page, the paragraphs were arranged differently; the “truly reversed” phrase came directly after the descriptions of the previous RP styles, making it a comparison to them rather than an explicit declaration.

    The paragraphs were rearranged for clarity, and that line ended up getting precedence over the RP descriptions, so the context was lost. This may have coloured your reading of my intent somewhat.

    Thanks again, I really do appreciate the dialogue.

  15. Does the road widen unevenly, though? In the video, it appears to widen more on the left side of the screen than the right (it curves more on the left side than the right; the left side is further from the centre line than the right).

    I think this is probably more apparent in your ‘perpendicular array’ test video- the blocks appear to be arranged in a curve, and the far blocks seem to slow slightly as they approach the (horizontal) centre of the screen, and ‘surge’ away from it.

    It is, admittedly, quite subtle, and you could tweak it quite a lot by moving the far z. I think, though, that it gives a (subliminal?) ‘seasick’ sort of effect, and a linear increase might give a ‘cleaner’ result. But I guess the small difference may not be worth the extra work.

    I appreciate it too, it’s made me think a lot about the artefacts of perspective projection.

  16. Hmm.. In fairness though, the road is never really on-axis WRT the camera, so it will display subtle RP in the slightly-off-x direction as well as z. Do you know what I mean?

    And if you pause the ‘perpendicular array’ video, you can take a ruler and see that the edges of the objects form a straight edge into farZ, even if it looks curved to the eye.

    Or if you go on to the next test, you can see a grid of actual lines, and see no curvature.

    And I’m not sure how the geometry would curve with the very minor changes I’ve made to the perspective matrix. Would I not need more complex maths to do that?

Comments are closed.