I saw this feature at another studio, but since it was executed via scripts, I never got to understand how it worked under the hood, and was wondering if anybody here had an idea:
The script degrained the plate for you, using Neat Video's Reduce Noise, and then also created a precomp that extracted the original grain pattern from the plate to use as a regrain layer at the top of the stack. This avoids Match Grain, which often doesn't match well, or Add Grain, which is good, but manual.
and created a grain layer at the top of the layer stack to regrain everything using the same grain rather than using a Match Grain or manually-tweaked Add Grain effect.
I suspect it's something like the degrained plate Difference'd against the original plate, but how do I adjust that comp so that when applied over the degrained comp, it will match the grain from the original plate?
First you need to set your project to 32 bpc. This technique will only work in float because we need to use some negative color values here. Then degrain your plate. Neat Video is by far the best tool there is for this. Among other reasons, it keeps everything nice and sharp. It is one of the few 3rd party plugins I swear by and totally worth the money. Not sure if Red Giant's Denoiser works in 32bit, but Ive never found it to be that good anyway, and AE's built in Remove Grain definitely isn't 32.
Next you want to duplicate your comp. Name that new comp "Grain". In there duplicate your footage layer and delete the degrain effect from the bottom layer. Then select Subtract for the color mode for the top layer. Your image should go black now. If you want to see that it's working, crank up the exposure in the view window and you should see all the nice grain from your image.
Now drop this "Grain" comp into your main comp on top of your degrained footage, and set it's color mode to Add.
And that's it! Regrained footage that matches your source exactly.