A thick lens is a real lens system implementation. Actually is a raytraced lens system. However we don’t raytrace at render time over and over the lens system, we do it in a preparation step where we sample the iris and then save the values to work with that at render time.
The more samples the better the lens system simulation. If you don’t have enough samples for a given rendering you’ll get artifacts in the form of concentric ‘rings’. Generally you have to increase your iris pre-sampling based on the size of the image you’re rendering out. It’s fully multi-threaded so it takes just a bunch of seconds. If you’re prototyping your rendering and you’re in IPR, set the pre-sample to a low value so you’ll get shorter startup times and and a fluid IPR workflow. Parameters for the ThickLens are under the LensSystem rollout.
We provide for the moment a wide 22mm lens, a medium/standard 50mm lens and a zoom 250mm lens. They work on any focal lengths your camera is setup. Of course they work better if you are near the focal your lens system is designed for. Don’t try to use your camera set to let’s say for example 20mm while using the 250mm lens or you may have artifacts.
There’s also a fisheye lens. The cool thing is that you’ll get that kind of GoPro look 😉 by really raytracing the lens system and not just applying some math to deform your rays. Set your camera around 8/10mm to get artifacts free renderings.
Another thing you have to keep in mind is that you’re rendering with a real lens. A real lens has its limitations. For example an f2.8 22mm lens can’t go down more than f2.8. If you do that you’ll get a warning and your image will be rendered at the lowest fstop the lens can support. However if you wanna artistically tweak the aperture you can still use the IrisMultiplier param.
Another thing is that real lenses has a minimum distance where they can focus (yep that’s why some lenses are called macro/micro, – with those you have a very short distance available for focusing). And you have to respect that distance. Don’t try to render an hero object just a couple of mm distant from your lens.. you’ll get a warning and your render will be black.
That also forces you to model your scenes in real life size. You should always model in real life size so that’s not a matter here. Generally is better you setup your camera. And only then increase or decrease the whole size of your scene to match for example a plausible depth of field or the distance from your lens if your scene size is screwed up. This is very important. However if you have different sizes for your scene you can try to match them with the ‘Unit System’ parameter under the LensSystem rollout.
Another feature of a lens is ‘lens breathing’. When you focus your subject you’re actually moving the various lenses your system is composed of, that means you’ll zoom in/out just a little bit while focusing. That happens also in real life if you look closely. That means here renderings won’t match necessarily the viewport, because there there ain’t a thick lens implementation but just a pinhole camera implementation. So always render first your image to see how much is different from the viewport and get a clue on what you’re doing.
Eventually same goes for vignetting. It’s a lens artifact actually. But of course is part of the visual we always have in front of our eyes so it became integral part of that. Here vignetting is not a post effect but it’s really the result of raytracing the lens system. One thing to keep in mind. Generally lenses exhibit vignetting the more they approach the lower end of their fstop, ie. the more aperture the more vignetting. The below image vignetting is not accomplished by shading away the edges of the image, it’s really a raytraced lens system vignetting.
With a real lens come also deformations. With our ThickLens implementation you will get that too. For example the above frames don’t look perfectly aligned, they are in the scene but when rendered you get that kind of visual ‘movement’ that brings an image out of the computer-generated land and bring it more close to real life. Deformations belongs to the design of the lens. So with different designs you’ll get different deformations more or less evident.
At the end of the day, all of this features won’t limit you anymore but really will push you to get super realistic rendering because you have to obey the limitations of your lens like in a real world situation.