By optical modeling I mean simulating the results of an set of lens imaging a scene, so one can see how different lens (say a fisheye, or different glass) effect the imaging of a scene.

I don't expect to get some of the finer modeling details that involve wave calculations or things like chromatic aberration, I'd just like to get an overall idea of the imaging effects of certain lens combinations assuming the light is a perfect ray.

Is this possible with blender? Would one need to use cycles? Are there any guides or topics I could look up that could assist with such a task?

  • $\begingroup$ Liss is correct that luxrender is a great resource for simulating lenses. You can try out this code in matlab to make a two surface lens and a blender file to simulate it with a light source. researchonabudget.wordpress.com/2015/12/13/start $\endgroup$ – user20164 Dec 15 '15 at 21:03

Cycles is relatively simple path tracer without MLT so I did not try to simulate lenses in Cycles, and do not recommend it for this purpose. LuxRender is much better choice for this, it is free and open source, and integrates with Blender very well. With LuxRender it's possible to simulate fish-eye or normal lenses focusing light (image) on film (with translucent matte material and camera behind it). You could simulate chromatic aberration too. You could model half of each aspherical (or spherical) surface profile precisely with XYZ Math Surface, then spin 360 degrees, then delete all doubles and set smooth shading. This way, it is possible to model even achromatic doublet (you will need three surfaces with properly defined interior/exterior volumes). But more lens elements you have between film and the scene, the more issues you will encounter. When done modeling lens elements, enclose them in completely black container.

Simulation of simple lenses (1-2 elements) is almost without issues, complex lenses with many elements (4-6) may have weird noisy artifacts (but result usually good enough "to get overall idea"). If number of elements is too many (for example, 18), simulation may fail (just render few fireflies on black screen). Another limitation is that LuxRender as far as I know cannot simulate AR coating yet.

You did not mention how good you are with lens modeling and underlying math describing their surface, and how many elements you plan to have in your lens simulation(s). I think there are no good tutorials about this yet. If you need one please comment, I could expand this answer with much more details (but please note that it may take few weeks because if I do this, I would like to do it with good examples, and only if somebody actually interested in more detailed answer, and if using LuxRender is acceptable option).

  • 4
    $\begingroup$ I'm very interested in seeing a walk-through of LuxRender and especially in how a topic like this may be tied into that renderer. 18 months ago when I was looking into various renderers for Blender I found almost nothing but Cycles info. Filtering Cycles out from searches left very little at all. Anything at all that you could do here would be awesome. I'm sure if it's good then BlenderNation would post it on the site with the usual Twitter chatter. This will be especially valuable since the technique of combining passes from multiple renderers using the compositor is catching on. $\endgroup$ – MarcClintDion May 3 '14 at 7:13
  • $\begingroup$ What a great answer. I'll try it out and perhaps ask a different answer in the future specific to LuxRender. $\endgroup$ – nbubis May 4 '14 at 2:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.