Tools

Slugline. Simple, elegant screenwriting.

Red Giant Color Suite, with Magic Bullet Looks 2.5 and Colorista II

Needables
  • Sony Alpha a7S Compact Interchangeable Lens Digital Camera
    Sony Alpha a7S Compact Interchangeable Lens Digital Camera
    Sony
  • Panasonic LUMIX DMC-GH4KBODY 16.05MP Digital Single Lens Mirrorless Camera with 4K Cinematic Video (Body Only)
    Panasonic LUMIX DMC-GH4KBODY 16.05MP Digital Single Lens Mirrorless Camera with 4K Cinematic Video (Body Only)
    Panasonic
  • TASCAM DR-100mkII 2-Channel Portable Digital Recorder
    TASCAM DR-100mkII 2-Channel Portable Digital Recorder
    TASCAM
  • The DV Rebel's Guide: An All-Digital Approach to Making Killer Action Movies on the Cheap (Peachpit)
    The DV Rebel's Guide: An All-Digital Approach to Making Killer Action Movies on the Cheap (Peachpit)
    by Stu Maschwitz
Thursday
Mar162006

Linear Color Workflow in AE7, Part 6

Extracting Linear HDR (AKA scene-referred values) From Camera RAW files. Wee!

Much is made of the overexposure latitude contained within RAW images created by higher-end digital cameras such as DSLRs. The truth is, there can be extra data up there, but it may be hard to artfully extract. For the same reason we put the magenta filter on the Viper, the over-range values in a RAW file may be monochromatic and otherwise discontinuous from those in the sweet spot of the chip's sensitivity.

However, Adobe Camera RAW does a mighty fine job of milking every last bit of usable picture data out of a RAW file, and it is now included with After Effects 7.0. If you underexpose your RAW shots enough so that the highlights aren't clipping, you can effectively create single-exposure HDR images for use in your 32bpc projects.*

First, set up your project for a linear floating point workflow. This means switching the bit depth to 32bpc and selecting a linear (gamma 1.0) profile as your Project Working Space.

Then import your RAW file. Here's what one .NEF from my Nikon D70 looks like in the Camera RAW window:



Notice that the clouds are almost clipping, but Camera RAW is rounding into the clip nicely. That's lovely for photography, but for visual effects I'd like to get a more accurate representation of the actual light values present in the scene. I need to remove all the artful tweakings of the tone curve that Camera RAW has suggested.

To do this, set Shadows, Brightness, Contrast and Saturation all to zero. Then go into the Curve tab and select the Linear preset for the curve.

Feel free to adjust other settings to taste, such as those found in the Detail and Lens tabs. Remember, there is always subjective processing involved when making a viewable image from a RAW file, so don't shy away from these controls. You should also select a White Balance setting that makes your image look the most neutral (if you want it to have a color cast, better to do that later in float).

Your final step is to adjust the Exposure slider until no highlights are clipping. Use the histogram and the Highlights checkbox in the upper right to guide you. Find a setting just below the point at which you begin to clip.

Here's what my image looks like after following these steps:



Now hit OK (twice) and you are returned to After Effects. Select the footage item in the Project pane and you'll see that the profile it is importing via appears next to the thumbnail. Since our Project Working Space doesn't match any of the four export profiles supported by Camera RAW, our image defaults to the sRGB space. Which means that once we add it to a comp, it requires the same conversion to our project's working profile as any sRGB image would — the same one we went over in Part 1:



Now that we've got a comp that contains our linear and underexposed scene-referred pixels, we can simply add an exposure effect and boost it up until our image "looks right." In doing so, we'll push the brighter pixels into the overbright range, effectively creating an HDR image. Here's my image exposed up by a stop:



Photographers may be distressed by the clipped clouds in this image. Speaking for myself, when I shoot stills, I'm trying to artfully compress the broad dynamic range of the world into a viewable range. In other words, I'm trying to take a High Dynamic Range world and squeeze it onto a Low Dynamic Range print. But what we just did is the opposite — we took a LDR image and made it HDR. Why do such a thing? Images that visual effects artists shoot are often used not as standalone works of art but as ingredients in a final composite. Our HDR sky, blown out as it may appear, will react very realistically to subsequent compositing. If we blur it or composite transparent things in front of it, we will see the detail in those clouds come back in a photographic way.

Or we can play with other ways besides just tone curves to create a more pleasing final image. For example, we could take an image like this:



...and multiply it over our shot, for this result:



Happy RAW shooting!

* In other words, it's more your RAW format's ability to handle underexposure than overexposure that allows it to capture HDR imagery!

Reader Comments (19)

Stu-
Great blog. I have just read AE studio techniques and listened to your podcast. really cool stuff.

I have a question, is there anypoint to work in floating point when working with vector motion graphics? The advantages are pretty clear when working with film/video or stills, but Im not sure if there would be any reason or advantage to using these toold when working with text, logos, etc.

March 16, 2006 | Unregistered CommenterJosh

Hi Josh,

Please check out the old eLin demo movie called "Speedo" on the Red Giant site:

http://redgiantsoftware.com/elindemomovies.html

It shows how overbrights can really help a graphics treatment.

The same principals apply even moreso in float. Recreating that tutorial in linear float rather than eLin would be an excellent self-teaching tool!

March 16, 2006 | Unregistered CommenterStu

Hi Stu, my pipeline: RAW into PSCS2 for editing then PSD files into AE7 32bit to be composited with video. Only 16 bit seems to be an option when importing RAW into PSCS2 for editing, or am I missing something? Am I losing something in that process or is there a direct way to go from RAW to 32bpcFP? Thanks so much! Jerome

March 20, 2006 | Unregistered CommenterJerome Thelia

Sadly, there is no way to get ACR to output more than 16 bits/channel at this time.

Fortunately, RAW images from current cameras contain less than 16 bits/channel of real data to start with -- so you can stretch and squash it after the fact and not really lose anything.

If you have great reasons for needing 32 bit/channel data out of ACR, please go over to the Adobe user forums -- there's an ACR forum under the Photoshop forums, and Thomas does read the requests.

March 20, 2006 | Unregistered CommenterChris Cox

Hey Stu,
I am glad that I found this blog! I just finished listening to your review of working in 32bit with AE 7. It was great!

I have one question. I have been trying to figure out how to work in linear color space with Lightwave 3D. I want to make sure that the exr files I save are linear. Can you please explain how to set up a linear workflow from a 3d app?

Thanks

Wes

April 10, 2006 | Unregistered Commenterwes

Thanks Wes!

Here's a great resource for working linear in Lightwave:

http://www.happy-digital.com/freebies/tip_gamma.html

The EXRs you render will work perfectly in AE7 using the project settings described in Part 1.

April 10, 2006 | Unregistered CommenterStu

Hey Stu,
Thanks a lot! Again your AE7 32 bit podcast was awesome! Please do more! I also really enjoyed your chapter in AE Studio Techniques.

Thanks,

Wes

April 11, 2006 | Unregistered Commenterwes

Hi Stu,
I just have two more question on reguards to linear renders from lightwave. I read the article you mentioned and I think I have everything working OK. I just want to nail this down. I have been researching this for several months and I want to do this right!!!

What I do is linearize the image maps and colors I pick for objects by applying the inverse gamma(0.4545). Then I apply a gamma to the render of 2.2(my monitor space) so I can view the image on my monitor. I believe this is like using a LUT layer in AE with eLin.

My question is: before I save the the exr file, should I disable the gamma of 2.2 to the render? If I do, the render is dark. I watched the eLin videos you did with the tea pot and helicopter. I remember that the renders in that video where dark apon importing into AE. Am I doing this correctly?

Also, the corrections I am doing are on the image maps and the colors I am picking in the surface editor(because the color picker swatches are gamma encoded values like my monitor) . In the eLin teapot video, you changed the white point of the lights. Do I need to do this as well? If so, can you please explain why. In the video, you divied the light values by 4 to lower the whitepoint. In the helicopter render you used 5. How did you get the numbers 4 and 5?

Thank you for you time!

Wes

April 11, 2006 | Unregistered Commenterwes

Wes, the white point was an old eLin workaround for cheating HDR rendering out of 3D apps that don't support EXR. You don't need to worry about that -- with LW and AE7, you have a fully HDR pipeline.

Yes, you should remove the gamma 2.2 from your renders. It's correct that they should look dark when viewed without a 2.2 correction. But if you bring them into an AE7 project with the Project Working Space set to the Linear sRGB ICC profile, you will see your images looking very much like they did in LW. Their values are still linear, but the view is corrected to roughly the tune of a 2.2 gamma.

When the time comes to write them back out to disk, follow the instructions in Part 4 for vid space output.

Hope that helps!

April 11, 2006 | Unregistered CommenterStu

Stu,
Thanks a lot!!!

April 12, 2006 | Unregistered Commenterwes

hi stu,
thanks for sharing so much with the community.(book,blog etc)
Any chance you will be doing a video/dvd Solely on this topic
(FP comping)...that would be a treat.

thanks
b

April 17, 2006 | Unregistered CommenterAnonymous

Hi Stu, I recently ran into an issue that I am not sure what is going on. I rendered an exr from LightWave and imported this into AE 7 according to part 1 of your tutorial. My exr file looks too bright, which would indicate that my file is being double-gammaed in AE. It's puzzeling because my Lightwave render looks dark from lightwave. Would this indicate that my LightWave exr file is not linear as it should be? Would I be right in saying that if a file is linear coming in (exr, hdr) then it should not get brighter when displayed in a correctly set 32 bit linear workspace in AE? One Last question, a file that is HDR or exr linear should not need the profile converter because it is already in the project's working space. Is this correct?

Thanks,

Wes

May 1, 2006 | Unregistered Commenterwes

Wes, I'm not a Lightwave expert, but if you're following the Part 1 steps then I'd say your EXR is gamma-encoded, not linear. Are you using the GammaRight plug-in?

May 1, 2006 | Unregistered CommenterStu

Oh, and yes, properly linear EXR or HHDR files should require no Color Profile Converter effect, because they are already in the project working space.

May 1, 2006 | Unregistered CommenterStu

Hi Stu,
Thanks for the input!

I didn't use the gammaright shader in my file. I downloaded a plugin which stated that it picked colors in floating point. I had hoped that this picker would compensate for the gamma-encoded values of the default color picker. The exr came into AE too bright. I then re-rendered the scene compensating for the defualt color-picker's gamma-encoded values.I did this manually instead of using the shader. The gammaright developer was very helpful in getting me to understand how to correct the color picker values.

This new exr comes into AE with no change in brightness. It looks the same as the LW render. I think this now leaves me with a linear exr because it doesn't change brightness upon import. Is that correct?

I really appreciate you taking time to answer these questions! I think I am finally getting a firm grasp on this thanks to you!

-Wes

May 2, 2006 | Unregistered Commenterwes

Stu-

I ran across another issue I am hoping you can shed some light on. I noticed that when I render exr or hdr files from my 3d app and import them into AE they have a lot of noise. I am working in linear space in AE under the workflow from your first AE linear tutorial. I am pretty sure that the exr or hdr files are linear from my renders. They are not getting brighter when I import them into AE's linear space.

Do you know why they would look noisy?

Thanks,

Wes

May 9, 2006 | Unregistered Commenterwes

Hi Stu - I've been working through your Linear Color Workflow Tutorials and I was just thinking that you don't seem to mention the 'Linear Blending' Checkbox in the Project Settings anywhere... Should i assume it should ALWAYS be on if working with linear gamma source footage?

February 12, 2007 | Unregistered Commenterstevenkirby

No need if you follow the method of using a linear Project Working Space—the checkbox has no effect if you have a g1.0 PWS.

February 12, 2007 | Unregistered CommenterStu

Hi Stu!
thanks for sharing all your knowledge with us, It's hard to learn if there is no good teacher.
I am doing a postproduction for a stop-motion animation that was shot on Nikon D700 and will be printed out on film. Your posts about lin, log, vid and RAW in AfterEffects are very useful for this work, I think. I would be really happy of any comments on my idea of workflow for it.

1. Inport RAW image sequences in AECS4 (some adjustments in ACR on calibrated apple cinema display)
2. Convert with your vid2lin plugin
3. Export linear DPX sequences
3. Composite in Shake all in linear space
4. Grade in Apple Color with LUT lin2vid on LCD JVC 24" reference monitor thru Kona3 card
5. Convert lin2log thru Shake or Color
6. Deliver 16bit Log DPX for film print

Thank you for your answers! Keep up good work!

March 26, 2009 | Unregistered CommenterTeo
Comments Disabled
Sorry, comments are disabled temporarily while I tweak some stuff.
« Less is more | Main | How do you know you're on a Stu shoot? »