Published: 16 September, 2016
By Ali Ismail
Latin origin of "Compositing": to put together.
While this word still rings very true for visual effects work that includes live footage integration; I think you might consider the titles: "improving your 3D renders" Or "CG post-processing" to be more fitting. Although it's a given that post processing CG renders will include adding and/or replacing elements inside the frame.
Writing this tutorial; I am trying to share some of the ways I implement to improve my renders, laid out in very easy and simple principles to grasp. Using examples of my previous work; on the hope that someone might not be already familiar with some of these techniques and could incorporate them into their work flow. Also to emphasize that your 3D renders need not be perfect out of your 3D software.
Why Post Process?
Now, whats wrong with my renders? you might be asking! if I don't need any compositing layers to add or replace, if only I get the lighting and materials right; couldn't I just use the renders as they are? well, depends, but most probably no.
Before getting involved with professional work, I had the preconceived notion, that all the big VFX studios had some very sophisticated tools to be able to generate their beautiful final footage, turned out they had some fancy infrastructure and software to handle the volume of work they do; but the results they were getting had a lot more to do with simple good craftsmanship more than anything. Color lookups, motion blur and film grain will take you a long way, I can assure you!
You will need your renders to have good lightning and color information, proper material settings, detailed models to start with, extra channels and masks to use, but the changes you can later make to these frames, can be quite drastic and will completely transform how the render looks like.
You will find that the changes we will do after the frames are rendered out, are either not possible in your 3D package, or take quite a lot of computing time to process automatically, or you simply don't have the level of control needed. And most importantly as you will see; most of the changes you will make can be quite artistic and subjective. I suspect that even as the software and render engines continue to develop and add more features you are still going to need some sort of manual post processing to improve the image.
Where to Start?
well, practically you can work on your renders however you like, These are only some examples of what you can do, they do not cover all the possible things you can attempt, but to make it easier, I tried to classify them into these three categories:
I - Fixing CG Artifacts
Software and CG render engines have improved quite a lot from the early days of their inception, but they are nonetheless an approximation. GI calculations are not perfect, the real world is really complex with caustics, translucency, subtle diffusion effects and most of the time you will have time and processing power limitations that will result in some artifacts or effects missing.
Luckily you can try rendering more passes to compensate for those effects or to apply some filters to add or remove them; some examples of what you can do are listed here below:
(Note: I exaggerated some of the effects here just to show the difference, most of these are very subtle and you can only see the difference clearly when placing the before and after on top of each other)
-Reducing noise and grain. Yes, you should have noise free renders to start with, but as it happens, sometimes you can be time strapped or miss out on something here and there, denoise filters, or blurring out specific areas could sometimes do the trick or at least reduce it.
-Adding GI, caustics, AO or lighting effects. You can do your best to make sure your result is accurate from the first render without any post-processing, but again in certain situations it might be challenging to produce using a single pass and could use the help of an extra quickly rendered pass.
-Adding blue tint to shadow. In the case of this render, my shadow wasn't getting the blue shadow tint it should have got from the atmosphere or GI.
Of course there are many more effects and things which you can fix in the image, those are only samples from few composites. think of how complex nature can be; heat distortion, film interference, rainbows, etc..
II- Tone Mapping & Color Grading
This will probably have the biggest effect on your images, but how far will you go? are you going to do one color grading and call it a day? or maybe you are going to use some different masks and modify each masked area differently, or perhaps you are going to take it even further and use more masks and bezier shapes or sophisticated filters to change different parts of the image?
This is an oscilloscope:
And this is a histogram:
Knowing that things like your Photoshop high pass filter and image sharpening are essentially derived from or are very similar to the principles of audio and signaling equipment; helps to change your mindset about the visual aspect of images and to focus on the information each image contains.
I want to take this opportunity and point out a different way of thinking of the pictures you use on a daily basis and perhaps to better understand how image processing software and filters function.
Below are examples of the histogram in action:
A black or very dark image will have the histogram bars all around the 0 area, a white or very bright one all around the 255 which means both images are not using the full spectrum uniformly.
To learn more about histograms (the number of pixels for each color value) you can check: " Photoshop histograms: How to read and understand image histograms in Photoshop" and "Histograms: Camera histograms: tones and contrast" and while you are at it; why not also check this excellent resource for imagining fundamentals: "Cambridge in colour /not color :)"
When you use a Photoshop or Nuke filter that modifies the shadows or highlights you can now know that it simply changes the values of pixels located at one end of the histogram, all other filters will have similar presets to analyze and apply changes to the histograms in the red,green and blue channels.
-Tonemapping, wikipedia's definition states it as: mapping one set of colors to another to approximate the appearance of high dynamic range images in a medium that has a more limited dynamic range.
-Color grading wiki's on the other hand is: the process of altering and enhancing the color of a motion picture, video image, or still image either electronically, photo-chemically or digitally.
You usually start with a high dynamic range render which has a lot of information, then you tonemap it to transfer it to a lower dynamic range and color grade it to make it look nicer But in reality this tonemapping color grading thing all happens at once and you just have the EXR or Raw format then you do a bunch of color lookups/grades/color corrections/levels/curves etc.. to make it look "pretty" and have the final frames.
The processes of color grading and tone mapping are so intertwined when CG compositing that in Unreal engine both are just under the color grading feature.
Enough with theory! here is a quick example of what I mean below:
Note: all of your different grading and coloring nodes and filters do the same thing, the color look-up node is extremely powerful and is my favorite tool, You can check this video by Martin Constable: Curves Vs Sliders
And before I foget, one of compositting most important fundamentals is the understanding of alpha channels pre-multiplication, these two videos can also be of great help: Premult Define & Premult in Practice.
Above is what I have straight out of the render engine and below is the reference I was trying to match.
No matter how much I tried to match the reference I have with lighting techniques, I was unable to come close, then I experimented a bit with tonemapping using Photoshop's HDR Toning local adaptation method and also with Photomatix software and voila! I nailed it! I then realized that my color grading/tonemapping was very far from what I should have been doing.
Note: you can find HDR Toning under (Image-->Adjustments). as the tool name suggests; it works only with 32Bit formats.
This is the result after HDR Toning:
After I knew that my lighting was perfectly fine, and the information I had in my EXR render had all what I needed to make an excellent render; I went ahead and started tweaking my composite, color grading each material separately and then each patch until I got something close to the look I was after.
Note: after looking at my final render and the test HDR toning image; I feel maybe I should have color graded the final image differently and got something a little better, but lets keep this for another time.
Below is a video inside Nuke, showing how I worked on my renders:
III- Adding Camera Artifacts
Each of the effects listed below can be considered as a by product of the camera or even the human if you are aiming for that look. Although technically these are camera "artifacts" we have grown accustomed to and it can on many occasions improve the overall look artistically if not overdone when you just add a lens flare in every shot to cover it up.
Some of these effects are:
-Light wrap, glow effect. (Note: in my thinking light wrap is not always a result of reflection of the background and in some occasions is caused by lack of accuracy in camera sensors thus can be classified like glow effects as an artifact)
-Film grain, sharpen and blurs, you see after we took some effort to make sure we don't have any noise as a result of rendering, now it's time to reintroduce noise but on our terms! properly added noise while very subtle can really help a lot improve the realism of your footage although with new digital photography/cinematography things look sharper and cleaner. Cameras just can't be 100% accurate so it helps to add some very subtle effects here and there to add realism, it of course depend on the look you are after. Things shot with the latest high resolution cameras look very different from things with lower tech equipment.
-Motion Blur, Depth of field, lens distortions, vignette, chromatic effects, lens flares: So many effects you can simulate, different cameras will produce different results and it's up to you to decide what to works best with your footage
Artistic Effects & Decisions
All of the effects above can be added or discarded, exaggerated or made subtly as to the final art direction. lighting can be also changed so as in backgrounds and everything else in the image according to your tastes. We are making images that should look beautiful and appealing and this should come first before all other considerations; It's very expected to do all sorts of adjustments in post processing to get the desired look.
Anyway I hope this tutorial helps with your composites although it is not very technical and lays out only principles. but I assume that you can always quickly Google or search the help in your software to apply a particular technique. there is just so many tools out there that would make knowing the principles a much safer bet than the button pushing.
Lastly! I wanted to share with you a tip for learning how to be the top compositor out there! pick images which you find interesting, or watch VFX movies, pause when you find an interesting effect and take a screen shot. then take all of these images, observe the color grading, play with the saturation and gamma, zoom in and out and use your eyedropper tool and start seeing what is happening in the image. This done over a period of time is guaranteed to make you learn all the small and subtle effects used to create nice images.