Creating an ideal lens in blender
Idle Chit-chat

I could not make sense of the link in your last comment, but I was able to create the setup from your next to last comment in Cycles render. I did not spend a great deal of time modeling the camera (it's a rectangular prism missing one of its bases [where the lens would be] and half a face [for the actual camera to see through]).

Knowledge

Before you can begin to understand this setup, you have to have an understanding of how Cycles works. In real life, photons come from an emitter, like the sun, bounce off objects, and eventually make their way into our eyes. In Cycles, it's the inverse. 'Camera rays' come out of the camera, bounce off meshes, and make their way to a light source. This is the primary reason why a bigger light source is less noisy in Cycles: There is a bigger area of light (for a camera ray) to find.

Camera rays are not the only rays, or Light Paths as they are more commonly known, in Cycles. There are Shadow Rays, Diffuse Rays, Glossy Rays, etc., but the only two you will need to be familiar with are Camera rays and Reflection rays.



This is the material for Mirror 1. We will be using it. It is very similar to that of a one-way mirror. Camera rays are 'photons' that come directly out of the camera and have not bounced off a mesh yet. They are important, because I use the Is Camera Ray fac from the Light Path node in the material for the first mirror (above). The fac differentiates between a Glossy BSDF (mirror shader) and a Transparent BSDF (for the second mirror to see through). The material basically says, "Normally use Transparent BSDF. This will let light from the second mirror pass through me. If the light that hits me happens to be from an unaltered camera ray, however, use the Glossy BSDF so that I act like a mirror."



This is the material for Mirror 2. It is a simple mirror material because that is all that the second mirror does; it doesn't have any special properties.



This is the material for the camera tube. We will be using it. Reflection rays are 'photons' that have bounced, but in the bounce, reflected perfectly off an object. A reflection ray would be like shining a laser pointer at a mirror. The photons that have bounced off the mirror but not yet hit an object would be Reflection rays. They are important, because I use the Is Reflection Ray fac from the Light Path node in the material for the camera tube (above). The fac differentiates between a Diffuse BSDF (outside appearance shader) and a Transparent BSDF (to not get in the way of the second mirror). The material basically says, "Normally use Diffuse BSDF. This will let outside objects view me. If the light that hits me, however, happens to be from a reflection ray, like that from one or both of the mirrors, use the Transparent BSDF so that I do not appear as a border around the final rendered image."

The Setup



The above is the actual setup. I selected the two mirrors for clarity (1 is yellow, 2 is orange). The cube off to the right side was just a cube that the camera could view. It's blue, but that's unimportant. I also used the cube when I was aligning the rotation of Mirror 1. It gave me a point that I knew should be at the center of the camera's view. It told me that I had to use a rotation of -46.3, rather than -45 (my guess).

Last Notes

Because of the distance the ray has to travel, I realize that the cube can look farther away than the camera would normally view it. My solution is that you select the camera, go to the Camera Object Data tab in the Properties panel, and change the Focal Length: from the default 35.00 to 152.00. This will show the cube as it would be seen from the front of the camera. Don't be alarmed by how far the camera object stretches out. That's normal.

Lastly, there is no lens distortion, and to add a reflective material in the 3D to this setup would not be wise. To add lens distortion, go to the compositor and use this node setup:



It will bend the cube and slightly distort some colors.

To Help Out...

As I realize this could be very time consuming to make, I took the liberty of including a .blend file.



=Puck