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

6 Likes

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.

17 Likes

Hi @anon20675008 ā€” 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.

5 Likes

Sorry @anon20675008 ā€” 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)

8 Likes

Hi @anon20675008 ā€” 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 - ?
1 Like

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

3 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

4 Likes

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

5 Likes

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

I tried to fix it.

5 Likes

Seems to be behaving.

I just found that post. Itā€™s an awesome feature that I hope will find itā€™s way to master ! Congrats @anon20675008 !

new test:

github patch for 2.92: https://github.com/sungreen/rcam/blob/master/rcam3_292_20210101.diff

4 Likes