Page's that link from here:
IntroAdding grain to areas of the image that have no grain, is vital to get the image as to appear as a realistic photographed image. With digital cameras grain is called noise. This article will use the term grain interchangeably.
- Film Stock or digital cameras iso's will have different grains - newer,slow stocks or low iso's will have less grain
- The luminance and structure varies separately in the Red, Green And Blue channels.
- Grain curve response.
- Darker areas of the image usually have larger sized grain, and lighter areas smaller, but this is often not perceivable.
- Darker areas of the image have grain with more contrast and lighter areas less, i.e. the dark grain clumps/dots are darker and the light grain 'dots' are brighter.
Grain Reference Example
- Do not add grain to the entire image. Only add grain to the parts of the image that are missing grain. Often these areas are CG, degrained elements and patches.
- Always add grain after any colour corrections / filters / transformations otherwise the grain will be affected.
- It is best practice to regrain with a single gain node at the end of the comp.
- An alpha is required of all combined element mattes that need to be re-grained so that a single grain node can be used with this matte. (make sure when combining mattes that the greys blend well and the matte is legal)
- This is less processor intensive than graining multiple element separately before their final merges/overs.
- It allows universal control or control in one area of the comp when tweaking grain (this tech check often happens at the end of the show and this simplicity will save time)
- A single grain node also minimizes the risk of doubling up the grain with overlaps.
- Using the mattes of a key to control the areas to be grained results in the grey edge areas of the matte (transparent or defocuced edges) to have softer and less intense grain. Fix this by expanding or applying increased gamma to the matte to harden and expand the mattes falloff. Do not do this so much that you get hard edge mattes to soft edged areas.
- Grain is usually added using a pluigin/node that reproduces a noise pattern.
- Find out what preset you need to use in the grain node. Do this by researching what is the film stock or digital camera type the plate you are matching to is, and use that named preset if avaliable. In some cases your 2d supervisor or td will have created a grain preset for the sequences in the film.
- Retimed plates will require re-graining
- Make sure that the grain does not create illegal black values as grain makes the image both brighter and darker (for film this is values bellow 0.006) - use the curveTool or sampler node to check the lowest value.
- Try to not use a toe and definitely do not use a clamp node to fix this, as it can cause banding in the DI. Check the comps lowest value before graining is the same as the plate as the problem may be in the comp and not the grain node.
Matching GrainOften the grain preset will get you close enough for temps but you will need to tweak the grain for a perfect final match.
- The 2d supervisor or the 2d TD will create a simulation of the grain for the different stocks/cameras that are used on the film. This will provide a good starting point for matching the grain.
- Match the spacing/size/softness of the grain separately from matching the brightness/intensity/contrast of the grain.
- Match the colour channels separately as then they are easier to control and view to get an accurate match.
- Do not match grain using proxies, use the full resolution.
- It is best to initially match the grain without an 3dLUT on as the channels get blended together. Instead use the 'sRGB' viewer process lut in nuke so each channel viewed is separated.
- Zoom right in to see the grain accurately, but always keep the viewer on magnifications that do distort the image (the transform filtering can do this). To do this keep the zoom level/numbers of the viewer in whole numbers
- Check that the grain matches across the different levels of dark and bright areas of the image paying attention to the skin tones.
- Darker areas can be checked by exposing the viewer up, and lighter areas by exposing down.
- After matching it on a still frame check it on on a running plate in each individual channel and do a final check in RGB colour.
- Plates that have had aggressive colour corrections will not work with a preset. Plates could be corrected aggressively because of a balancing(neutral) grade, or in comp. (i.e greater than plus or minus 5 points)
- Plates that have gross changes in brightness (like flashing) or hue(going from indoor to outdoor lighting) will not work with a preset and will need to also be treated as an individual case.
- Illegal dark values: Make sure the lowest value of the plate matches the grained comp. If this is a problem , possible solutions might be to reverse the balancing(neutral) grade before re-graining and then apply the grade back. Or do this with a slight lift and sit colour add before graining(as a minus) and then reversing the grade with an identical add after.
AdvancedFilm-stock shot at the same exposure and processed in the same way for an entire scene/film will allow the creation of a grain template for the whole show(or sequence) that than can then be slightly tweaked by the artist if necessary. There are two methods for applying grain Simulation and Sample:
SimulationThis is the method of using a noise generator to simulate the grain (often a Gaussian noise). Nuke has the 'F_regrain', 'FilmGrain' and 'noise' nodes.
- good: lightweight for the artist. It is also very flexible as it can be adjusted exactly to suit.
- bad: often requires building a simulation (although F_regrain will try and simulate it automatically).
- Follow the guidelines for matching grain above
- Take into account any transformation filtering that has occurred on the scanned plate and reproduce this in the grain sim. Apart from scaling or softening the grain, it can also crush the blacks and introduce horizontal and vertical 'jaggies'.
- Get a macbeth chart shot of the stock for each sequence. Having one of these is the difference between a accurate one hour job and an inaccurate one day job.
SampleThis is the method of extracting the grain and then saving it as a noise pattern that is then applied using loops and tiles. Nukes 'scannedGrain' node uses this method.
- good: does not require building a simulation by hand, but does require generating a sample.
- Bad: if done badly then loops and tiles become noticeable. It is heavy in the script as a large asset (the sample) is required to run it.
Tips and Tricks
Manual methodThis can be done overall as a single midtone sample or with at least three areas to cover a range of luminance ranges. This method only works in float as it uses negative values.
- Crop an clean area i.e. some blue screen for a mid tone sample.
- Even out the luminance differences in the cropped area.
- subtract the image from a blurred version of itself, resulting in a image centred round RGB(0,0,0).
- Tile and add randomness to the tiling.
- Render out grain in float format (ass you need minus values)
- To get a quick inaccurate curve response, apply this Grain with a simple 'ADD' in log space. The negative areas will make the image darker and the positive areas of the image will make the image lighter. By doing it in log space the grain is applied to the light and dark areas in approximate amounts.
- To more accurately match the luminance of the grains curve response see the nuke script below.
SEE ATTACHED FUSION4 or Shake4(with furnace doing the texture stitching) FILE.
Curve ResponseOften the reason a preset grain node isn't working is because it is adding either too much or not enough grain to the darks, The film response accounts for how the grain acts in different areas of luminance
- A cheep trick is to add grain, key the highlights, then comp the ungrained highlights over the top.
- Another trick is the lift and sit trick. Change the exposure of the image before it has grain added and then undo the exposure change afterwards. This trick works most of the time. i.e. if you are getting too much grain in the darks, darken the image before the grain node and then brighten it back up afterwards.
Re-graining the plate after filtering
Matching Techniquehttp://www.pigsfly.com/forums/index.php?showtopic=3702 (cache) Blur your footage enough to wipe the grain out. add grain on that. then create an oval rotospline, pipe that into the matte channel for the blur and the grain tool. now match each channel inside the oval to the grain outside the oval, one channel at a time. move the oval around as needed to check different parts of the image. once thats done you can discard the blur and the oval, and pipe your comp layers into the grain. by XOO!
- Furnace Core Grain Plugin Video Tutorials (cache)
- Wikipedia Film Grain (cache)
- Nukepedia Grainmaster gizmo (cache)
- Nukepedia Grain_cg gizmo (cache)
- Nukapedia Scannedgrain_cb gizmo (cache)
- Wikipedia Photographic film (cache)
- Electron microscope study of film (cache)
- Film Grain tips from DigitalGypsy.com (cache)