Blender 2.5 Lighting and Rendering — Save 50%
Bring your 3D world to life with lighting, compositing, and rendering
In this article by Reynante Martinez we'll tackle a topic that is commonly misunderstood and often overlooked inside of Blender. But before we begin, I'd like to make a few remarks. First, I do not claim to be a professional color grading artist nor do I imply the following explanations as “rules” to be strictly followed. What I will try to share with you in this article are my thoughts and experiences on Color Grading using Blender.
|Read more about this book|
(For more resources on Blender, see here.)
I would like to thank a few people who have made this all possible and I wouldn't be inspired doing this now without their great aid:
To Francois Tarlier (http://www.francois-tarlier.com) for patiently bearing with my questions, for sharing his thoughts on color grading with Blender, and for simply developing things to make these things existent in Blender. A clear example of this would be the addition of the Color Balance Node in Blender 2.5's Node Compositor (which I couldn't live without).
To Matt Ebb (http://mke3.net/) for creating tools to make Blender's Compositor better and for supporting the efforts of making one.
And lastly, to Stu Maschwitz (http://www.prolost.com) for his amazing tips and tricks on color grading.
Now, for some explanation. Color grading is usually defined as the process of altering and/or enhancing the colors of a motion picture or a still image. Traditionally, this happens by altering the subject photo-chemically (color timing) in a laboratory. But with modern tools and techniques, color grading can now be achieved digitally. Software like Apple's Final Cut Pro, Adobe's After Effects, Red Giant Software’s Magic Bullet Looks, etc. Luckily, the latest version of Blender has support for color grading by using a selection and plethora of nodes that will then process our input accordingly. However, I really want to stress here that often, it doesn't matter what tools you use, it all really depends on how crafty and artistic you are, regardless of whatever features your application has.
Normally, color grading could also be related to color correction in some ways, however strictly speaking, color correction deals majorly on a “correctional” aspect (white balancing, temperature changes, etc.) rather than a specific alteration that would otherwise be achieved when applied with color grading.
With color grading, we can turn a motion picture or still image into different types of mood and time of the day, we can fake lens filters and distortions, highlight part of an image via bright spotting, remove red eye effects, denoise an image, add glares, and a lot more.
With all the things mentioned above, they can be grouped into three major categories, namely:
- Color Balancing
- Material Variation Compensation
With Color Balancing, we are trying to fix tint errors and colorizations that occurred during hardware post-production, something that would happen when recording the data into, say, a camera's memory right after it has been internally processed. Or sometimes, this could also be applied to fix some white balance errors that were overlooked while shooting or recording. These are, however, non-solid rules that aren't followed all the time. We can, however, use color balancing to simply correct the tones of an image or frame such that the human skin will look more natural with respect to the scene it is located at.
Contrasting deals with how subject/s are emphasized with respect to the scene it is located at. It could also refer to vibrance and high dynamic imaging. It could also be just a general method of “popping out” necessary details present in a frame.
Stylization refers to effects that are added on top of the original footage/image after applying color correction, balancing, etc. Some examples would be: dreamy effect, day to night conversion, retro effect, sepia, and many more.
And last but not the least is Material Variation Compensation. Often, as artists, there will come a point in time that after hours and hours of waiting for your renders to finish, you will realize at the last minute that something is just not right with how the materials are set up. If you're on a tight deadline, rerendering the entire sequence or frame is not an option. Thankfully, but not absolute all the time, we can compensate this by using color grading techniques to specifically tell Blender to adjust just a portion of an image that looks wrong and save us a ton of time if we were to rerender again.
However, with the vast topics that Color Grading has, I can only assume that I will only be leading you to the introductory steps to get you started and for you to have a basis for your own experiments.
To have a view of what we could possibly discuss, you can check some of the videos I've done here:
And to those of you interested with some presets, Francois Tarlier has provided some in this page http://code.google.com/p/ft-projects/downloads/list.
Outlining some of the aspects that we'll go through in Part 1 of this article, here's a list of the things we will be doing:
- Loading Image Files in the Compositor
- Loading Sequence Files in the Compositor
- Loading Movie Files in the Compositor
- Contrasting with Color Curves
- Colorizing with Color Curves
- Color Correcting with Color Curves
And before we start, here are some prerequisites that you should have:
- Latest Blender 2.5 version (grab one from http://www.graphicall.org or from the latest svn updates)
- Movies, Footages, Animations (check http://www.stockfootageforfree.com for free stock footages)
- Still Images
- Intermediate Blender skill level
With all the prerequisites met and before we get our hands dirty, there are some things we need to do.
Fire up Blender 2.5 and you'll notice (by default) that Blender starts with a cool splash screen and with it on the upper right hand portion, you can see the Blender version number and the revision number. As much as possible, you would want to have a similar revision number as what we'll be using here, or better yet, a newer one. This will ensure that tools we'll be using are up to date, bug free, and possibly feature-pumped.
Move the mouse over the image to enlarge it.
(Blender 2.5 Initial Startup Screen)
After we have ensured we have the right version (and revision number) of Blender, it's time to set up our scenes and screens accordingly to match our ideal workflow later on.
Before starting any color grading session, make sure you have a clear plan of what you want to achieve and to do with your footages and images. This way you can eliminate the guessing part and save a lot of time in the process.
Next step is to make sure we are in the proper screen for doing color grading. You'll see in the menu bar at the top that we are using the “Default” screen. This is useful for general-purpose Blender workflow like Modeling, Lighting, and Shading setup. To harness Blender's intuitive interface, we'll go ahead and change this screen to something more obvious and useful.
(Screen Selection Menu)
Click the button on the left of the screen selection menu and you'll see a list of screens to choose from. For this purpose, we'll choose “Compositing”. After enabling the screen, you'll notice that Blender's default layout has been changed to something more varied, but not very dramatic.
(Choosing the Compositing Screen)
The Compositing Screen will enable us to work seamlessly with color grading in that, by default, it has everything we need to start our session.
By default, the compositing screen has the Node Editor on top, the UV/Image Editor on the lower left hand side, the 3D View on the lower right hand side. On the far right corner, equaling the same height as these previous three windows, is the Properties Window, and lastly (but not so obvious) is the Timeline Window which is just below the Properties Window as is situated on the far lower right corner of your screen. Since we won't be digging too much on Blender's 3D aspect here, we can go ahead and ignore the lower right view (3D View), or better yet, let's merge the UV/Image Editor to the 3D View such that the UV/Image Editor will encompass mostly the lower half of the screen (as seen below). You could also merge the Properties Window and the Timeline Window such that the only thing present on the far right hand side is the Properties Window.
(Merging the Screen Windows)
Under the Node Editor Window, click on and enable Use Nodes. This will tell Blender that we'll be using the node system in conjunction with the settings we'll be enabling later on.
(Enabling “Use Nodes”)
After clicking on Use Nodes, you'll notice nodes start appearing on the Node Editor Window, namely the Render Layer and Composite nodes. This is one good hint that Blender now recognizes the nodes as part of its rendering process. But that's not enough yet. Looking on the far right window (Properties Window), look for the Shading and Post Processing tabs under Render. If you can't see some parts, just scroll through until you do.
(Locating the Shading and Post Processing Tabs)
Under the Shading tab, disable all check boxes except for Texture. This will ensure that we won't get any funny output later on. It will also eliminate the error debugging process, if we do encounter some.
(Disabling Shading Options)
Next, let's proceed to the Post Processing tab and disable Sequencer. Then let's make sure that Compositing is enabled and checked.
(Disabling Post Processing Options)
Thats it for now, but we'll get back to the Properties Window whenever necessary.
Let's move our attention back to the Node Editor Window above. Same keyboard shortcuts apply here compared to the 3D Viewport. To review, here are the shortcuts we might find helpful while working on the Node Editor Window:
Right Mouse Button
Left Mouse Button
Mouse Wheel Up/CTRL + Mouse Wheel Drag
Mouse Wheel Down/CTRL + Mouse Wheel Drag
Middle Mouse Drag
CTRL Left Mouse Button
Toggle Full Screen
Now, let's select the Render Layer Node and delete it. We won't be needing it now since we're not directly working with Blender's internal render layer system yet, since we'll be solely focusing our attention on uploading images and footages for grading work.
Select the Composite Node and move it far right, just to get it out of view for now.
(Deleting the Render Layer Node and Moving the Composite Node)
Loading image files in the compositor
Blender's Node Compositor can upload pretty much any image format you have. Most of the time, you might want only to work with JPG, PNG, TIFF, and EXR file formats. But choose what you prefer, just be aware though of the image format's compression features. For most of my compositing tasks, I commonly use PNG, it being a lossless type of image, meaning, even after processing it a few times, it retains its original quality and doesn't compress which results in odd results, like in a JPG file. However, if you really want to push your compositing project and use data such as z-buffer (depth), etc. you'll be good with EXR, which is one of the best out there, but it creates such huge file sizes depending on the settings you have. Play around and see which one is most comfortable with you.
For ease, we'll load up JPG images for now. With the Node Editor Window active, left click somewhere on an empty space on the left side, imagine placing an imaginative cursor there with the left mouse button. This will tell Blender to place here the node we'll be adding. Next, press SHIFT A. This will bring up the add menu. Choose Input then click on Image.
(Adding an Image Node)
Most often, when you have the Composite Node selected before performing this action, Blender will automatically connect and link the newly added node to the composite node. If not, you can connect the Image Node's image output node to the Composite Node's image input node.
(Image Node Connected to Composite Node)
To load images into the Compositor, simply click on Open on the the Image Node and this will bring up a menu for you to browse on. Once you've chosen the desired image, you can double left click on the image or single click then click on Open. After that is done, you'll notice the Image Node's and the Composite Node's preview changed accordingly.
(Image Loaded in the Compositor)
This image is now ready for compositing work.
eBook Price: $23.99
Book Price: $39.99
|Read more about this book|
(For more resources on Blender, see here.)
Loading sequence files in the compositor
Loading sequence files or image sequences in the compositor is similar to uploading normal single frame images, aside from the additional setting of frame ranges.
Again, click on Open or the Folder Icon on the Image Node to load up the image browser. Browse to the folder where you have rendered or sequenced the images. For Blender to properly recognize the images as sequences, they must be suffixed with numbers or something value incremental (just like what you see in the screenshot below).
(Loading Image Sequences)
You only need to load the first image in this sequence. However, you must be aware how many images you have in the sequence because we'll be using this value as input later on.
(Loading the First Image Only)
On the Image Editor, after successfully loading the first frame of the image sequence, change the Source to Sequence. This will tell Blender that we are using a sequence of images instead of just the first frame that we loaded up. Change the Frames: value to the total number of image frames you have. You can also alter the Start Frame if you want to offset the start frame. Additionally, enable the Cyclic and Auto-refresh buttons.
To clearly see what is going on, add a Viewer Node and connect the image socket to the Image Node.
(Adding a Viewer Node)
Now, if you skip through the frames with the arrow keys, you'll notice that the images shown on the Viewer Node changes as well. To clearly see this, you can enable Backdrop under the Node Editor Window. To move the backdrop, you press ALT Middle Mouse Button Drag. To zoom it out, press V, and to zoom it in, press ALT V.
(Adding an Image Backdrop)
Loading movie files in the compositor
Loading movie files in the compositor is similar with loading image sequences. The only difference is that you load up any of the known movie file formats like MP4, AVI, MOV, etc. and instead of setting the Source to Sequence, you set it as Movie, but by default, if you load up any of the popular movie formats, Blender automatically recognizes them and sets the Source automatically for you. You'll just have to change the Frame Number accordingly.
(Adding a Movie File in the Compositor)
Any of the color grading techniques that we'll be applying later on in this article applies the same whether you're working on a single image, an image sequence, or a movie. It only comes down to a difference in length, format, quality, and compression.
Contrasting with color curves
One of the most rudimentary tasks to color grading is primary color correction via contrasting, by which we simply boost the highlights, midtones, and shadows of an image accordingly, resulting in a more vibrant and appealing imagery.
The Color Curve can be accessed from within the Node Editor by pressing SHIFT A, choosing Color, then finally, RGB Curves. Connect the image sockets of the Image Node and the Color Curve Node. Then add a Viewer Node and connect it to the Color Curve Node accordingly leading through a node like setup seen in the screenshot below.
(Adding a Color Curve Node)
(Connecting the Viewer Node, Color Curve Node, and Viewer Node)
The Color Curve Node is a very powerful color correction tool in Blender and is also very flexible. By default, the C (contrast [correct me if I'm wrong]) channel of the curve is the active node, and there are three more channels, namely the Red, Green, and Blue, represented by R, G, and B. However, for this portion of the article, we'll only be focusing on the C channel right now to adjust the contrast in our image. In the Color Curve Node, you are presented with a diagonal line. This represents the highlights, shadows, and midtones of your image (as seen in the screenshot below).
(The Color Curve Node)
The shadows area of the curve controls the dark and shadowy areas of the image, the midtones control the gray or “neutral” parts of your image, and finally, the highlights control the brightness parts of your image.
(Brightness and Darkness Areas of the Color Curve Node)
The screenshot above represents the direction by which the shadows, midtones, and highlights affect the image. So if you move the shadows area of the curve towards the brighter portion of the curve, the dark areas of your image become brighter and so on and so forth. Check the screenshots below for a visual reference.
To add a point on the curve, simply click anywhere inside of the Color Curve.
When working with the Color Curve Node, subtlety is the key to achieving convincing results. Too much adjustment will lead to color clipping, creating highlights that are too white and shadows that are too black. On most of my compositing work, I try to implement what they call the “S Curve” or commonly know as the Contrast Curve (you can see the setup below).
Additionally, beside the channel buttons, you can see more options for further controlling the behaviour of your curves and points.
(Color Curve Node Tools)
(Color Curves Node Clipping Options)
Below, you can see examples of the application of color curve contrasting.
eBook Price: $23.99
Book Price: $39.99
|Read more about this book|
(For more resources on Blender, see here.)
Colorizing with color curves
Another application of color curves, though not widely used, is colorization. With Colorization, you alter the overall color of your image or frame, creating a specific tone and feel. As compared to using Hue adjustments, with Color Curves, you have more control over the way your shadows, highlights, and midtones behave with respect to the color you are reaching.
The concept of shadows, midtones, and highlights that we used for the previous topic, applies to this technique too. But now, instead of adjusting one curve for the contrast channel, we work on three more channels: red, green, and blue channels respectively. Here instead of adjusting the brightness and darkness values of the image, you adjust the color. You can see an illustration of this effect below.
(Color Curve's Red Channel)
(Red Channel Increased)
(Red Channel Decreased)
(Color Curve's Green Channel)
(Green Channel Increased)
(Green Channel Decreased)
(Color Curve's Blue Channel)
(Blue Channel Increased))
(Blue Channel Decreased)
What's so exciting about using Color Curves is that you can mix the results and come up with your own combination of curve effects. Though colorization with curves is not commonly used, it still proves to be useful and fast. You can even link several color curves, each adjusting a different channel, for easier viewing.
(Combining Several Color Curve Nodes)
Color correcting with color curves
One of the most common tasks when it comes to Color Curves, is color correction and adjustment. This happens by adjusting the tones and hues of parts of an image depending on their tonal ranges.
Take a look at the image below (by the way, the lady you see there is my universe). You'll notice a few things here:
- yellow cast (caused by improper white balance settings)
- low contrast
To address these issues, we'll use the color curves node. First, to add more contrast to the image, we'll adjust the C Channel like that shown in the screenshot below:
(Adjusting the Contrast Channel)
Next, to give the colors more saturation, we'll just increase and reduce some of the color values accordingly:
(Color Correction Color Curve Nodes)
Now, for some explanation of the process. The left-most color curve node is used to boost the overall contrast of the image, making the bright parts brighter and the darker parts darker, making it easier for the eyes to recognize the subject. The second from the left color curve node is used to brighten up the whole image, making it more recognizable. The third from the left color curve node is used to increase the skin tone. Next, under the green channel, this color curve is used to reduce the overall green tint of the image. And finally, the far right color curve node is used to reduce the yellow tint. The final image is this:
(Color Corrected Image)
In this article, we learned how to properly load image files, sequence files, and movie files in Blender's Compositor as well as do basic color grading techniques which includes: contrasting, colorizing, and color correction with color curves.
In the next article, we will take a look at some more color grading techniques.
- Advanced Effects using Blender Particle System [article]
- Blender 2.49 Scripting: Animating the Visibility of objects [article]
- Make Spacecraft Fly and Shoot with Special Effects using Blender 3D 2.49 [article]
About the Author :
Reynante Martinez is a self-learnt graphic designer, illustrator, web designer, and 3D generalist. His interest in CG started nine years ago and was directly introduced to The GIMP as one of the open source image editing applications available in Linux. Aside from being an animator at work, he also has experience in mentoring and has been a speaker and workshop conductor at several occasions during the past few years. He is also the co-founder of PinoyBlender, a Filipino Blender User Group. Since his discovery of Blender six years ago, his passion for CG art grew even more, with more upgrades coming now and then and with an active and helpful community of Blender artists being one of the most exciting factors in his career.He can be reached through the email or through his weblog and you can also view his online gallery.