Reverse perspective rendering

Hello
wanted to ask for any advice
how do i make a reverse perspective effect in a blender
like this


I think it somehow can be possibly implemented through a osl shader with a projection matrix

Hello! Here are the results of my experiments with a reverse perspective camera. This is a patch for code. It is still very raw code, but managed to make a preview in the 3DView window and visualization for EEVEE. For a reverse perspective camera, the settings are the same as for a simple camera, but the “Reverse” flag has been added.

6 Likes

Hi @sungreen — I got here via googling ‘reverse perspective’ and this seems to be the first thing I’ve seen that actually does it.

I can’t quite figure out your reply though — did you write some code to implement the ‘reverse perspective’ checkbox? If you could shed some light on exactly how you got there that’d be amazing!

1 Like

There is program code in my builds.
The picture shows the interfaces of my assembly.
I plan to publish the source code and build it under Linux soon.
I now need models to test before publishing.
Now my builds doing visualization in EEVEE, but there are some developments for Cycles too.
Yours models can be sent to [email protected] to show that the “reverse perspective” effect works quite well.

I think the real world example of this is the hypercentric lens.

2 Likes

Sorry @sungreen — I have to edit this post because I can’t reply more than 3 times!

I don’t any experience compiling blender with patches — so I’m happy to wait a bit longer for the Cycles version. How would I install the code for eevee?

I can publish the code for eevee now, but I could not make the partable blender build static_libs so soon. Can you compile blender with the patch yourself?

1 Like

Hi!
Link to demo builds for linux https://drive.google.com/file/d/1LA2kHUWxUZssDQll_43k0ZUs9oCcAJly/view?usp=sharing
Demo video https://youtu.be/6ri9og_RtbU
Examples:

  1. dace

    dice_reverce.blend (716.7 KB) ![teapot_demo|690x420]

  2. teapot

    teapot_reverse.blend (1.1 MB)

3 Likes

Hi @sungreen — that’s amazing! Thanks so much for sharing it. Do you have any advice on building / combining in a way that would work for mac? I appreciate how much you’ve done already so no worries if not!

Also I think I can only reply three times to this post so I may not be able to reply after this!

Read Building Blender for macOS

  1. Download Sources and Libraries - OK
  2. Building - OK
  3. Run Blender - OK
  4. Download patch from github - ?
  5. Save file rcam_20200608_01.diff to blender-git/blender - ?
  6. cd blender-git/blender - ?
  7. patch -p1 < rcam_20200608_01.diff - ?
  8. Rebuild Blender - ?
  9. Run Blender with patch - ?

Camera->Lens->Type: Orthographic
Camera factor: -1 to 1
ScreenShot:
https://drive.google.com/file/d/1AhqcWkSZquWPcc_TYO4p0cTnKnqP5AlL/view?usp=sharing

Test camera factor video:
https://www.youtube.com/watch?v=Dq106R-CUwA

Demo builds for linux:
https://drive.google.com/file/d/1w6YiHvLzoZAiuJ3EtlSEvlkvx0kytcGd/view?usp=sharing

Blend file with animation camera factor:
https://drive.google.com/file/d/1m7UVflDn9kI50pJHsT-_UeWHvQU5qHZH/view?usp=sharing

2 Likes

Cool stuff, but I notice there’s some problems with shadows.

1 Like

I notice it too. I started to study and fix this problem.

1 Like

Here’s the real world version
https://www.youtube.com/watch?v=iJ4yL6kaV1A&feature=youtu.be

3 Likes

And a writeup with examples
http://paulbourke.net/miscellaneous/reverseperspective/

3 Likes

Thank you very much. This is a very useful and detailed writeup.