Linear Workflow for Gamma Correct Lighting in Cinema 4D

One of the most critical elements involved in creating realistically lit interior environments is exposure control. In this tutorial you will be introduced to using the linear workflow for gamma correct lighting in Cinema 4D, allowing you produce more photorealistic renders, as well as improve specular highlights and anti-aliasing.

Final Effect Preview

You can download the project files here: Project Files.

Video 1

Download

Note: click the ‘Monitor’ icon to view tutorial in full-screen HD.

Don’t miss more CG tutorials and guides, published daily – subscribe to Cgtuts+ by RSS.

Add Comment

Discussion 36 Comments

  1. Wow, that should be nice. LWF method is something I am always trying to avoid if possible. Let’s see if tutorial clears something out about it.

  2. Scott Ewen says:

    Good info. Thanks for sharing.

  3. eli says:

    I haven’t looked at the tutorial yet, but this is exactly what I wanted. Thankyou in advance.

  4. bob says:

    Good stuff! these are the tutorials i like to see.. aka.. NO MORE GLOWING HANDS!

  5. moritzw says:

    Just watched it, thanks for the input :)

    Just two suggestions to the example scene: The rendersettings in the LWF project File are a bit of a timekiller. Setting Anti-Aliasing to geometry and deactivating or reducing accuracy of Ambient Occlusion certainly helps to speed things up but still delivers the message of the whole LWF thing. (Of course I could also blame me for only having a dual core 1,83 Ghz CPU.. ;)

    Also, the GI cache is locked and points to your local file path which brings up an error message when I try to render.

  6. SethD says:

    So what’s the difference between changing the gamma under GI and color correction? I thought I noticed it still being at the default value of 1. Great tut.

  7. Francis says:

    Hi.

    Your steps to achieve a realistic image for viewing on a computer monitor are correct. But your explanation is a little bit confusing, if not wrong in some cases. Just to help you and others. I want to point ourt some things.

    Facts:
    Every Monitor(CRT and TFT) has a gamma of 0.445. This was the way crt´s (or the first black and white TVs) used to response to the imput voltage of videosources when they got invented.

    To get a “normal” “linear” response-curve, every image or video-source gets a gamma-correction of 2.2. This was and is true for television/video-signals and for digital photographs. (Except RAW-Images or footage of the RED-Cam, etc…)

    In short and simple: Every monitor displays the incomming signal darker (gamma 0.455). To compensate every video/image-source has do be corrected brighter (gamma 2.2) The result is a display with linear gamma of 1.0.

    In 3-D we have to gamma correct the final images with gamma 2.2 to display them linear on monitors, which have a gamma of 0.445)
    This is not done automatical by the 3-D software, as it is done by photo- or videocameras.

    When we correct the final image with a gamma of 2.2. We also correct the source textures which already have a gamma of 2.2 (Correction done by photo-cameras)
    This is why the uncorrected source-textures getting washed out. They are 2 times gamma-corrected. First in the camera, second by us.

    At 1:42 you say cinema4d is converting the image to srgb-colorspace. That is not true. The images are and stay linear. They just getting display too dark by the computer monitor (gamma=0.455).

    At 02:26 you again speaking of “its wants to convert…
    Nothing wants to convert. That is the problem: The images stay in linear without any correction for the darker monitor display.

    At 02:42 The monitors aren´t designed that way….
    WRONG
    It happens that they had this way of “non-linear display response” (gamma 0.455) when they got invented. The electronic-hardware was to expensive to corecct this “false” non-linear response in every crt. So the inventors of video decided to correct this non-linear response of the monitors inside the video-sources: the cameras. There they had to do it only once=CHEAP, instead of thousand times in every monitor/TV=EXPENSIVE.

    At 03:07 you again say cinema4d converts it to that.
    WRONG. The image stays linear. It is just displayed to dark by the monitors.

    At 03:44 you say that the result of the correction will be linear.
    THAT´S WRONG
    The resulting image will have a gamma of 2.2 and with the monitor-gamma of 0.455 will be DISPLAYED LINEAR.

    At 05:49 Our render is dark.
    WRONG
    The rendered gets displayed too dark.

    At 05:58 the shadows are really contrasted…
    They are only displayed too contrasted.

    At 07:00… Cinema4d does not convert anything. It is the monitor display…

    At 12:00 You advise to correct the sources on a mac with 1.8.
    THATS TOTALLY WRONG FOR TEXTURES.
    If you go out with a photo-camera and shoot some textures. The textures do always get a gamma-coorection of 2.2. ALWAYS 2.2.
    To get linear textures with GMMA 1.0 you have to gamma correct with 0.455. ALWAYS.
    The gamma 1.8-thing is only true for the color-picker on the older macs.

    Hope this makes something clear.

    Monitors have a gamma of 0.455.
    To get a linear display everything needs a correction of gamma 2.2.
    Images and video-sources have already a gamma correction of 2.2.
    To feed the 3-D Software with linear textures. the burnt-in gamma has to be taken away by correcting them with a gamma of 0.455.

    READ and LISTEN

    http://www.ypoart.com/tutorials/tone/index.php
    and
    http://www.fxguide.com/fxpodcast.html “Compositing in Linear”

    Regards Francis

  8. eli says:

    I noticed you changed falloff from “none” to “inverse squared clamped” in one of the project files. Is this the correct way for light to fall off in nature?

    • M.kane says:
      Author

      You are absolutely right, light follows the inverse square law. I however use the inverse square clamped falloff because it really helps with specular highlights. Basically, like the name suggests it literally clamps the beginning of the inverse square falloff, so the beginning will have no falloff, but be linear. This reduces the chance of specular highlight blowouts, plus if you use it with the lwf, you a nice and even specular. Heres a nice little page on it:

      http://hyperphysics.phy-astr.gsu.edu/HBASE/vision/isql.html

      Cheers

      • eli says:

        Are the specular highlights blown out because electronic devices have a smaller exposure value range than the human eye?

  9. Stereohero says:

    Thank you for this tutorial. Good stuff! However, I suggest using a de-esser for the audio.

  10. Iacopo says:

    Thanks for this information, great job!

  11. Karim M. says:

    Ok to clear up this GI Gamma option question:

    If you use GI its enough to use the GI Gamma – and thats the only thing to do! – to get your linear lighting. Actually you dont need to change the gamma for your textures then, because the light calculation will refer to the changed gamma setting. But as all know: GI takes longer rendertimes, especially good GI, so for a non GI Workflow you should do it like Mountaga described in the video.

    Cheers

  12. NavParker says:

    It would be really cool if every downloadable project for *tuts wasn’t named “project files”

  13. Tkey says:

    Thanks for this tutorial, goob job !

  14. patweiss says:

    just to correct some people…apple screens use a standard gamma of 1.8

  15. mpke says:

    I understand why linear is a better way to work. But everything is basicly gamma corrected. What is the difference with this workflow and just leaving all the gamma on 2.2 and rendering it in 16bit or 32bit and just play with the levels?

    Its much faster to correct it in post than do all those gamma corrections in a program. Every texture, every render.. to much of a hassle imo.

  16. bert says:

    Hi..

    thanks for the tutorial.. I am working on a airplane cabin interior and using the LWF gave a good result getting more interior visible with only sunlight through the small cabin windows..

    one thing though i can get right..

    the multipass render… i render to a 16 bit psd file and this comesz out very dark.. the backgroundlayer though coressponds well to the single layer rendered jpg file..

    adding a photoshop adjustment layer with a gamma 2.2 setting to the multipass file lightens up the image.. but now the materials again turn out bleak..

    see a example here

    http://drop.io/c4d_lwf

    • eli says:

      did you apply the .455 filter to the materials?

      • bert says:

        yes I did.. the rendered jpg file and also the background layer in the multipass file show the image in the right colors.. i actuallyy used the provided project files downlaoded here in my example in which the materials do have the filter.. i

    • eli says:

      Save your file as a 32-bit PSD file. Should solve your lighting problems. Let me know if you have any other problems.

  17. tkey says:

    I can’t view any clip at blip.tv, what should i do ? :(

  18. chardo says:

    Good tutorial.
    Question : what are the settings to obtain a pure white wall ??
    Thx.

  19. jamie says:

    I’ve always messed around with the gamma settings but i’ve never really gone above 2 and when i have changed them i’ve usealy gone ahead and changed the contrast brightnes saturation etc but this is so much better my renders actualy look fantastic now thanks!

  20. Andre says:

    Nice tutorial! Thanks a lot.

    I was wondering if anyone could shed some light on where CINEMA 4D’s gamma settings come in?
    I mean the ones NOT found in the Bitmap shader like the Monitor Gamma setting in the preferences and the Render Gamma in the render settings.

    Should I just leave them both at 2.2? But what about if I render to 32-bit OpenEXR then?

  21. Hi any chance of a “Projectionman” tutorial. There’s nothing really in depth on the net without being taken to the cleaners for training DVD’s. The only thing I’ve found so far is the outragously priced cmivfx stuff but frankly streaming video that you will never own sucks. The other is Ciniversity but they’re are expensive as hell. There are a couple of small tutorials on vimeo but two of those have never been finished and probably never will be.

    You seem to have a clue as to what you’re doing, could you step into the breech and give us all the low down on this under-exploited tool that has so much to offer those of us seeking photorealistic 3D scenery and teturing for matte painting in film.

    Thanks
    John

  22. herojig says:

    Very cool. Learned a lot – until I read the comments – ha!

  23. George says:

    Hi, can anyone tell me if I have to make any adjustments to my GAMMA settings fot an iMac 27″ which I have just purchased. I’m swithching from pc to Apple.

    Thanks

  24. NURB_2k says:

    How about Cinema R13 and Linear Workflow for Gamma Correct Lighting???

    THX

Add a Comment

To add a code snippet to your comment, please wrap your code like so: <pre name="code" class="html">YOUR CODE</pre>. You can replace the class name with "js," "css," "sql," or "php." If there are any "<" or ">" within your code, please search and replace them with: &lt; and &gt; respectively.