hey talen.h ,
a very simple way for degrain/regrain, is :
- first degrain the image with something (like denoise sharpen)
- use a merge node with the original and the degrained version, set the operation to minus ( this substract the grain from the original , keeping only the grain)
- do your cg stuff (on the denoised version)
- merge the grain pass (the merge set to minus) and the composited pass using the plus operation.
if you skip the cg stuff part, you should have exactly the same image after the plus operation than the original.
in fact this is simple math, (extract the difference between original and denoised and add it back) I've tried in after effect but this hasn't worked, in Natron/Nuke the pixel math is correct so this work.
sometime with heavy denoised image the noise part get image detail that get back over the CG, so image need sometime to be denoised carefully.
But if it's about removing a shadow in a wall sometime you can just blur the image like a bad boy and even if your working on a totally blurry image, when the noise is added back you get exactly the original image + your modifications.
I don't know if there is other techniques for that, I'd be glad to hear them, anyway this one save me a lot of times.