Nuke Tutorial – Matching Grain

Ok it is time to write new Tutorials. Now this is one I thought might be of interest, especially for the more advanced artists around. Now the task seems easy: matching or creating Grain for your shot, sequence or show, without a grain plate of course 😉

 

First of, you want to find a plate that is evenly lit. For my tutorial I used a green screen plate from a fxphd course I took.

green_grain

 

Now the task seems easy but how do we extract the grain only and how can we generate a grain plate out of this ?
First of all we decide on a loop we want to use. So we start by adding a Retime node to the Plate. Set it up in a way, that you have at least say 10 frames to loop.

 

retime

 

 

 

Now we focus on the very right corner of the plate. It seems evenly lit and good to extract the grain. Now here comes the trick: We add a Blur node to the tree and set the size to something around 10. We then DIVIDE this result by the original.

divide_grain

 

After we have done that, we add a MULTIPLY node and mult the plate down to 0.5. To increase the quality of grain, we now add a TIMEOFFSET node, set it to -1 and DIVIDE this with our Multiply node.

timeOffset_grain

 

Once again we have to add a MULTIPLY node to tone down the result by 0.5 !
Now we simply crop the Area of Interest and start to stack the small elements on top and next to each other, in a way, that we end up with a plate that is the same size as our original.

cropGrain grainPlate

 

Now this is our Final Grain plate. We can now render it out, and use it to regain our Denoised Footage or CGI renderings. I usually use the ScannedGrain node to add it back on top. You possibly need to tweak the amount and Master Values a little bit, but you will end up with a very accurate Grain, matching your original Plate quite close. Of course be aware that it all depends on how evenly lit your area is, you use to create the grain plate. I have a close up comparison of the original grain and the regrained version below. The wipe in the middle is splitting the image and you can see, there is no difference visible at all !  Pretty nice ha !

Grain_compare

 

 

Play around with the setup and use it to match your grain, or impress your supervisor by generating a grain plate for your sequence : )

Take care and download the setup here and a fraction of the plate I used for this here