Jump to content


Photo

Blurred Edges Restoration Macro

Macros Edges Gringo

  • Please log in to reply
13 replies to this topic

Poll: Blurred Edges Restoration Macro (17 member(s) have cast votes)

What is the most appropriate name for this tool?

  1. BlurredEdgesRestoration (7 votes [30.43%] - View)

    Percentage of vote: 30.43%

  2. FixEdges (6 votes [26.09%] - View)

    Percentage of vote: 26.09%

  3. FixEdgeArtefacts (1 votes [4.35%] - View)

    Percentage of vote: 4.35%

  4. FixEdgeColors (4 votes [17.39%] - View)

    Percentage of vote: 17.39%

  5. RestoreEdgeColors (4 votes [17.39%] - View)

    Percentage of vote: 17.39%

  6. CleanEdgeColors (1 votes [4.35%] - View)

    Percentage of vote: 4.35%

Vote Guests cannot vote

#1 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 09 January 2012 - 12:17 PM

There is always an issue with keying defocused and motion blurred objects: the color on the edges is mixed with the color of the background.
Basically, the problem arises even with static objects which are in focus, because there is always some softness in the practical image.

The most obvious solution to this is either to suppress (desaturate) the background color or to shrink the objects' edges.
In first case, you may have a problem if the background luminance is different, for instance, if you key dark objects against white (like trees against the sky)
In second case, the blurring may be so strong, that the objects disappear completely with shrinking.

This macro expands the actual color of the objects so that it extends through the entire blurred areas, replacing the background color mixture.

BlurredEdgesRestoration_Keyed.jpgBlurredEdgesRestoration_Result.jpg

The workflow is the following:

  • Connect the macro after the keyer
  • Set the Output Image parameter to Pre-Shrunk Image
  • Adjust the Pre-Shrink parameters so that the shrinking was as little as possible to just cut BG color spill completely
  • Switch the Output Image to Extended Color to check with what colors you are going to fill the edges, adjust the shrinking if nessesary
  • Switch the Output Image to Final Result
  • Set the Extend parameters so that you see no sharp borders in the blurred areas. Keep the parameters values as small as possible
  • Adjust the Soften Border group so that you don't see a border between the internal untouched areas and the recolored blurred areas

BlurredEdgesRestoration_v04-1.setting

You can set the parameters in standard Fusion units (relative to the image width) as well as in actual pixels, which may be useful with little amounts of blurring in the source image.

The X and Y multiplier values are used for objects which are motion blurred primarily in horizontal or vertical direction.

The macro also solves the problem of edging which happens due to the data compression or chromatic aberrations.



#2 Tilt

Tilt

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 2,137 posts

Posted 09 January 2012 - 03:44 PM

awesome macro, Gringo!

#3 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 10 January 2012 - 10:12 AM

This new version outputs the edges mask to the Coverage channel, you can use it downstream to re-apply grain.

Posted Image

BlurredEdgesRestoration_v04-2.setting

#4 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 25 January 2012 - 06:40 AM

See the full description of the macro with images here:
http://vfxpedia.com/...ion_Description

As soon as the application area of this macro is in fact much wider than fixing blurred edges and it can help get rid of any edge artefacts I think of changing the name of the tool to more general and self-explanatory.

Please, vote for the options above!

#5 bfloch

bfloch

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 960 posts

Posted 25 January 2012 - 08:45 AM

Sssssweet! Thanks for the great description.

#6 Pilalitos

Pilalitos

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 791 posts

Posted 25 January 2012 - 08:57 AM

Wow! Just gave it a try and It Works!

I didn't yet understand how exactly it does what it does but I just fixed a shot with that single macro and replaced a very elaborate flow that I was using to solve the problem before.

Well done and thanks for that tool!

The parasol-island site looks wonderful too!

#7 Tilt

Tilt

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 2,137 posts

Posted 25 January 2012 - 09:22 AM

this macro is really awesome and versatile. If you have contaminated edges from a key you might get rid of it with despilling and color corrections. But if you have roto'd an actor who was moving in front of a landscape or structure instead of a greenscreen, there's no other way to clean the edge artifacts. It can also help with sky replacements where the new sky is much darker and your luma key results in white fringes along tree tops :-)

#8 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 26 January 2012 - 08:06 AM

Thank you guys for the good response!

Please, vote for the new/old name for the macro in the poll above.

#9 Pilalitos

Pilalitos

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 791 posts

Posted 26 January 2012 - 11:40 AM

Can I change my vote? I voted for Fix Edges but now that I understood what the macro actually does I think the FixEdgeColors is better!

#10 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 26 January 2012 - 06:32 PM

No problem, you can click on Delete My Vote and then vote again.

#11 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 02 February 2015 - 04:55 PM

A new description page and an updated version of the macro:
www.compositing.tv/Research/Tools/BlurredEdgesRestoration
 
Apparently, for now it's the only tool in Fusion, which supports interactive help (select the node, hit F1)

#12 Attila Sziklai

Attila Sziklai

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 178 posts

Posted 18 February 2015 - 04:37 AM

Hi Gregory,

 

First of all I'd like thank you for your macro. It makes life much easier when I have to deal with any kind of matte/keying.

 

Maybe you already know that even the latest 4.5 version have some kind of memory leak issue. There is a topic at BMD forums http://forum.blackma...=memory#p192263

and I can confirm this issue. 

 

I tried both in 7.01  and 7.6 Studio. The more time frames it render the more memory remains that can't be flushed with PurgeCache. At the end it consumes more memory then the memory limit set in preferences  and finally the whole system with all processes collapses.

I know it sounds weird since the macro only contains native Fusion tools but this issue is there for sure. I looked into your macro and the only thing I can suspect are the expressions because my experience is that simple expressions can be unstable sometimes.

 

Can you look after what might be the problem. I'm here to assist you if you wish.

 

thanks,

Attila 



#13 Attila Sziklai

Attila Sziklai

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 178 posts

Posted 18 February 2015 - 04:51 AM

It turns the my suspicion was not wrong at all.

After I delete all simple expressions from the tools of your macro the memory consumption normalized without any memory leak. So simple expressions are a no-no till BMD don't solve this issue.

I'm pretty screwed about this Fusion issue,  I did know that there is something about simple expressions but I didn't dare to imagine something like this memory leakage stuff.

 

cheers,

Attila



#14 Attila Sziklai

Attila Sziklai

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 178 posts

Posted 09 April 2015 - 08:19 AM

As I see now BMD solved this bug with expressions in the recent release (7.7.1), so your macro works fine as well.

 

Attila







Also tagged with one or more of these keywords: Macros, Edges, Gringo

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users