Jump to: Board index » General » Fusion

Apply film grain to a png

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

InterrobangMP

  • Posts: 253
  • Joined: Sun Jul 15, 2018 1:50 am
  • Real Name: Paul Rayner

Apply film grain to a png

PostMon Aug 15, 2022 1:33 am

I have a logo in pgn format with transparency.
I want to apply a film grain to just the logo. However if I merge it into the node tree I end up with grain over The entire length and breadth of the png including the transparency area. How can I apply it only to the logo part?
Note, the clip has been created from the edit tab, so the node tree looks like this right now:

Screen Shot 2022-08-15 at 1.32.32 PM.png
Screen Shot 2022-08-15 at 1.32.32 PM.png (82.97 KiB) Viewed 349 times
2021 Macbook Pro M1Max
10-core CPU, 32-core GPU and 16-core Neural Engine
64GB RAM
Resolve 18
Offline
User avatar

Bryan Ray

  • Posts: 2243
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Apply film grain to a png

PostMon Aug 15, 2022 3:24 am

Put an Alpha Divide right before the grain node and an Alpha Multiply right after. The grain will get applied to the entire image, but then multiplying by the alpha will knock it back down to 0 in the transparent areas. Dividing out the alpha first ensures you don't get a double-premultiplication.

However, if there are portions of the image that have non-zero RGB with zero alpha, this will destroy those pixels. If that's the case, then you'll need a different method. I'd have to give it a big think to figure out what that method might be, though.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

Sam Steti

  • Posts: 1878
  • Joined: Tue Jun 17, 2014 7:29 am
  • Location: France

Re: Apply film grain to a png

PostWed Aug 17, 2022 12:23 pm

Hmmm, I'd probably want to ensure the grain would apply to non alpha parts only by providing only this latter into the grain node... Maybe by combining a bitmap node or something ?
Also, cannot check right now : isn't there any pre divide/post multiply choice to tick in the parameters of the grain node as in a color correction one ?
*MacMini M1 16 Go - Ext nvme SSD
*Legacy MacPro 8core Xeons, 32 Go ram, 2 x gtx 980 ti, 1SSD for system, 2 SSDs raid0 for footage and caches
*Resolve Studio everywhere, Fusion Studio too
*https://www.buymeacoffee.com/samalaplaya
Offline
User avatar

Bryan Ray

  • Posts: 2243
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Apply film grain to a png

PostWed Aug 17, 2022 4:18 pm

Oh, you know I didn't look hard enough at the mmGrain4k node in the screenshot. It looks like it has only an effect mask input, so it's not structured the way I thought. Just plug the PNG into that blue input, then apply it as you normally would. And ensure that the resolution matches whatever you apply it to, of course. I assume it just gets Merged over? Or maybe Added with a Channel Booleans.

I had assumed the node was similar to FilmGrain, where you plug the footage into the input, but that it was a poorly constructed macro with no mask input. Thus the alpha divide/mult gambit.

There is an Alpha-Multiply switch in the native grain nodes, which is what you'd normally want to use when dealing with those.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com

Return to Fusion

Who is online

Users browsing this forum: No registered users and 4 guests