The impeccable 4K exr add-noise workflow?

I wanna add perfect noise on the touched/CGI area in a comp, so I suggested 3 workflows:

Idea A: was to denoise using various patterns on the hight-lights/shadows/midtones areas of the plate, then comp with the denoised result, and add the noise using the difference between the denoised plate and the original one using add.
I didn’t like the result as the result doesn’t look like the original plate, with so many flat aeas.

Idea B: should not mess with the original plate, but use the difference mentioned above to noise only the CGI/touched area, but I am not also convinced especially if you add different tones from the original plate-like more dark added areas or so.

Idea C: That I don’t know how to do it in Flame precisely, is to analyze the original noise on the plate and apply it using another node (or not) on the altered area

Which one is your favorite?

  1. Denoise the plate using Neat Video
  2. Subtract the Denoised clip from the camera original.
  3. Do your comp.
  4. Add the result from step 2 to your comp.
  5. Compare the result of step 4 to the camera original. If its identical, good job. If it isn’t, swap the inputs on Step 2. Then, good job.

Please note that whilst this may be the perfect way to add camera original grain, if your cg has different luminance values relative to the background plate or the converse is true, then, you’ll need to manually add grain using the Regrain or Crok.

2 Likes

Gotchya, in your 5 steps solution, I was using difference not subtract, my bad, it works great.
Yes I was wondering if the CGI has different luminance contents, then I have to regrain manually.
Why can’t we use the analysed data from denoise to use them to noise something else? Why there is a denoise option that you can turn off inside the same node?
Best

1 Like

Yup. Likely I’d regrain manually. Grain rarely is the same for all levels of luminance. But it’s worth a shot sometimes. And it’s a go to setup for a lot of cleanup.

Convert the plate and comp to log and regrain. It solves most of the luma issues.

More specifically:

Convert both the plate and neat video pass to log (I usually use LogC, but any log is fine) and subtract the Neat from the plate.

Do the whole comp normally in linear from the Neat pass (not the Log one)

When the comp is done, convert it to log and add the subtracted plate then convert the result back to linear.

7 Likes

Also be aware that a divide and then multiply approach might work better in some cases than add and subtract in terms of grain theft. I’m unsure of why this is (I’m sure someone knows) but we had a project a few months ago where for some reason or another the subtract add method was giving very slight artifacts visible in the difference matte (set to a high gain) and the divide multiply method was 100% clean. I’ll add though, that in my experience most all of the time the subtract add gives a better result than the divide multiply.

1 Like

For any regraining, I tend to switch to log. If I’m manually doing it with the regrain node and curves especially. The grain sampling tool in flame seems to not work whatsoever in linear, doesn’t matter what color space it’s set to.

2 Likes

Hello chadi!

My preference is to not mess with the original plate and add grain only to the areas that were comped (in your case the CG you added).

Here’s how I usually work:
– Add a Regrain node after the comp work is complete (usually right before the Batch output).
– Attach your finished comp to the Front tab, the original plate to the Back tab, and a matte of the comped areas to the Matte tab.
– In Regrain’s blue pop-up menu, select “Custom” as the grain type.
– Press F4 (I think, not at the machine now!) and sample the grain of the original plate by CTRL+dragging a box over a portion of the image that’s neutral (grey or white). Sometimes I take two samples one for highlights and one for shadows.

If your sample was successful, the X & Y grain-size sliders will move and the grain histogram will show points on the RGB curves for every sample you made. This curves graph is the key to accurately matching grain and is only available in the Custom and Mono grain type selections.

Random thoughts:
Flame’s attempt at matching the grain is never 100% correct. In fact, I’d say that it’s wrong most of the time (like when it gives X & Y grain size of 100 for R, G, & B… which NEVER is right). But it’s a starting point. The XY sliders control the size of the grains. In general, the G channel will have the smallest grain, R will be a bit larger than G, and B will be the largest (and why I find it crazy getting all “100”s).

The curves control the strength of the grain (the graininess) per RGB channel, across the luminance range from black to white and they are essential to matching grain. Once an original plate goes through grading, all kinds of weird things happen to the grain. Often you’ll see in high-contrast grades that there is zero grain at all at black or white as it’s just been clipped off. If the colorist pushes a certain selective (maybe the product is red?) then the graininess of the R channel is going to spike at a certain luminance.

To make things easier on your eyesight, vertically expand the grain curves / histogram by holding down SPACE + Z (zoom) and dragging upwards from the baseline of the histogram. Most points on your graph will end up in the bottom 25% of the curve window so by vertically scaling it you get a lot more working room.

Once you’ve made your starting sample or two, start adjusting grain channel-by-channel. SHIFT+R displays a monochrome version of the red channel (SHIFT+G and SHIFT+B for the other two, SHIFT+Z to go back to full color). Toggle between Back and Result so you can see what Regrain is doing, adjusting grain size and adding or manipulating points on the curves to match the grain distribution. Look at all parts of the image, hilights, mids, and shadows. I usually end up with three points plotted per channel.

When finished, disconnect the Back input as it can create edge issues around the matted region.

Alternatively you can use Regrain for comping your elements over the Back input. For simple fixes I do this as it’s doing the regrain and the A-over-B comes for free.

5 Likes

Perfect Chris, yes I tend not to mess around with the whole frame, and try to focus on my area of comp that is localized easily through mattes or alphas.
I will try your tips
Many thanks

1 Like

blasphemy

Use DasGrain

he said something about nuke again bring out the torches

No but seriously, dasGrain is such a killer thing, I wish adsk would just copy it into a node, I just cant be bothered manually grain matching when there is a tool out there that just does it for you, perfectly.

4 Likes

finnjaeger –

I don’t have experience with dasGrain but I love the idea of it. Grain matching in Flame can be done accurately but it’s a tedious process.

Recently I’ve found the newest cameras (Sony F65 & Venice in particular) have low- & high-frequency grain structures that can’t be matched in a single Regrain node. Do I enjoy spending 15 minutes trying to match their odd grain structures?

No.

2 Likes

dasGrain is magic, its so good, ive used it on hollywood movies, netflix series and whatever else and it held up all the QC, i havent even noticed anything weird on venice or other cameras because… it just solves it.

2 Likes

finnjaeger –

Could it be DasGrain?

Looks neat but I don’t see an OFX version available.

jup see my previous post, its nuke only :frowning:

Is there a feasture request for a automatic regrain node from adsk? :melting_face:

You can see the dasGrain code so it should be possible to rework that for flame?

I don’t know about an existing feature request but I’d sure enjoy an AI-enhanced smart regrain tool.

I find properly matching grain in the Regrain node is a time-consuming process.

1 Like

Ill have a look later for a FR - dasGrain isnt even AI or anything crazy fancy, you input denoised plate, plate and the comp, have it analyze a bunch of frames and boom it regrains the comp for you. No crazy trickery, no custom numpy or anything it just works with default nuke nodes and some python trickery afaik.

It might be possible to connect to it via Pybox. I’d have to take a look at DasGrain and see what’s what.

It’ll slow down the comp considerably…like to the point we here you’d want to pre render everything in flame upstream from the Pybox.

1 Like

my current workflow is kinda dumb, so yea i was also thinking of pybox,

I usually do my comp for dailies with a stupid regrain setup in flame then when everything is final i export , open in nuke, run dasGrain and import that back into flame so … ugh not fast at all.

I’ll take a peek at it. I’ll hit you up for a demo of DasGrain in Nuke.

I think this one is the closest. The last comment is mine, referencing you talking about DasGrain with the note “this is exactly what we want”

2 Likes