2008-03-08

Chromatic Aberration

I've been itching to finally say something about this one. If a 3D rendering looks life-like, most likely it has this phenomenon somewhere in the rendering. Chromatic Aberration (CA) occurs any time light refracts from a lens in such a way to disperse colors. This is most obvious in high contrast areas like the image below.

Photograph of Disney Concert Hall



You can simulate this effect in max 2008 with mental ray by using the mia_lens_bokeh shader, and an image map with red, green and blue. Plug the image map into the custom bokeh map. The downside to using an image map is that it really slows down the Arch / DOF Bokeh shader. You will also have to change the samples from 4 to at least 8. I typically use a minimum of 64 samples for my final renders. Note that DOF is what causes CA, so you have to have some blur to get this effect...even if it's a very small amount.







These were some tests I did to compare a rendering with and without CA. The difference is very small, but it makes it that much closer to what a camera is really doing.

There are also ways to do this in Photoshop after rendering. Plug-ins like PTLens are great at creating or fixing CA.

6 comments:

  1. Amazing stuff I didn't know what it was into know thank you very much!
    www.aldrichtorres.com

    ReplyDelete
  2. Hello,
    Hope you are well.
    Thanks so much for your insight into Bokeh and chromatic Chromatic Aberration.

    Would you be able to demo the Kokeh effect in Post with Combustion?

    ReplyDelete
  3. Did you use that very same image as your custom bokeh map Ramy?

    I've been testing this shader for a few days, and in particular it's custom bokeh slot.

    I think that it's a pretty neat result you got with such a simple map, congrats!

    ReplyDelete
  4. yeah, CA really adds realism to renderings, but i don't recommend using bokeh map for it, especially for animation, takes too much time to render. You can find a good tutorial about doing it manually in After Effects, render out a Zdepth pass for DOF and compsit it together. That way You have much more control over it and it's way faster (works also with 32bit linear workflow). But thanks for the tip anyway. Love the blog, keep it up!

    ReplyDelete
  5. Very nice and useful, I have a question tho. Why not just fakt the effect in Photoshop which takes about 5 minutes? :) You can also change intensity instantly.

    ReplyDelete
    Replies
    1. absolutely. This is just another way to do it....but yes, it's much better to add it in photoshop ;)

      Delete