Jump to content


Photo

Kak. Or Ibk For Fusion. It Sucks Less.

Macros Matte SecondMan

  • Please log in to reply
115 replies to this topic

#16 Pilalitos

Pilalitos

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 791 posts

Posted 14 September 2012 - 10:37 AM

Hmmm.... I didn't keep that flow but I will try to replicate it. If I manage to get the same result I will send you the frame and comp. :D

#17 leif3d

leif3d

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 554 posts

Posted 14 September 2012 - 11:23 AM

:)

Oooooh hot pixels not good.

Here are a few first things to check:

- Check your input is 16 bit at least
- Check the image weight for ringing artifacts. You should be able to get rid of them with Edge Erode. Also see if there is no more black in there.

If you think there is something else weird going on, could you send me a frame and your settings?

Thanks for testing!


I turn all my loaders to 32 bit float by default, but maybe you should have a button for "convert to float" in the macro to avoid user error?

#18 SecondMan

SecondMan

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,797 posts

Posted 14 September 2012 - 11:38 AM

I turn all my loaders to 32 bit float by default, but maybe you should have a button for "convert to float" in the macro to avoid user error?


It's on the growing to-do list to cater for that a little bit. A button is a good idea, but on the other hand it's another node that isn't necessary in most cases.
In any case I won't convert automatically. One reason is that at some point I got some interesting visuals specifically by not converting, so I want to keep control over that in the hands of the user. Sometimes you might not want float either...

I have a few options in mind. One idea I am warming to is to start putting tips and warnings in the console.

I must say, making big macros is like playing with Lego - it's good fun! :)

#19 SecondMan

SecondMan

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,797 posts

Posted 18 September 2012 - 02:07 AM

"- Think you can't pull a hard matte with KAK? Think again. As with most parameters in Fusion, you can supercharge the ones in KAK too. Try setting the Red and Green/Blue Weights to something like 5, and do the same with Squeeze Matte Low and High and see what happens!"


v1.1 - 17.sep 2012
Color Weight Generation:
- Added bit depth conversion button for the foreground image.
- Set default values for Erode and Edge Erode for a better out-of-the-box result.
- Adjusted Erode and Edge Erode sliders to a more sensible range.
- When using Preview Hard Matte On FG, the hard matte itself is now output in the alpha channel as well.
- Added Hold FG option for color picking.
Keyer:
- Added Preview Key On BG option.
- Use BG Chroma now influences just the hue instead of the hue and saturation of the edges, which should give nicer results in general.
- Added BG Bleed to complement Use BG Chroma where results are less than satisfying.

:)

#20 alt

alt

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 156 posts

Posted 18 September 2012 - 02:38 AM

Haven't tried KAK yet, but Blender seems to use Voronoi diagram for generating gradient backing screen image. So this might be of interest:
http://wiki.blender....tes/2.64/Keying

#21 ChadCapeland

ChadCapeland

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,975 posts

Posted 18 September 2012 - 08:42 AM


I turn all my loaders to 32 bit float by default, but maybe you should have a button for "convert to float" in the macro to avoid user error?


It's on the growing to-do list to cater for that a little bit. A button is a good idea, but on the other hand it's another node that isn't necessary in most cases.


It only makes the comp/setting larger. If you have it set to "keep" it just references the input in the output, so no speed/memory penalty.

EDIT: Whoops, I see you updated it already.

#22 bfloch

bfloch

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 960 posts

Posted 18 September 2012 - 09:45 AM

Awesome work Pieter. This thing is magic.

BTW: I wouldn't put plain email addresses inside a macro / script as vfxpedia is regularly visited by viagra selling bots ;)
Cheers,
Blazej

#23 ChadCapeland

ChadCapeland

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,975 posts

Posted 18 September 2012 - 11:19 AM

That's not bad, really. It's the Louis Vuitton handbag bots that are going to be annoying.

#24 SecondMan

SecondMan

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,797 posts

Posted 18 September 2012 - 11:46 PM

Thanks Blazej! I have a couple more things planned, too... :)

Yeah, and good point, too. Enough with the handbags already. Fixed. Well, "fixed" really, I am pretty sure the bots are smart enough to know about the old parentheses trick and I think VFXPedia keeps old files in the database. Ah well..

@alt - Thanks for the link - I'll check it out. lt sounds like quite a different approach and according to the site - or at least the bits I could read - there is some motion estimation involved, too. So it might be slower. Have you used it?

#25 SecondMan

SecondMan

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,797 posts

Posted 19 September 2012 - 12:47 AM

v1.2 - 18.sep.2012
Keyer:
- Use BG Luma, Use BG Chroma and BG Bleed fixed and now work as they should (i.e. do not influence the matte).
- Use BG Chroma influences both the hue and saturation of the edges again, now that the issue causing strange results has been resolved.

:)

#26 Tilt

Tilt

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 2,137 posts

Posted 23 September 2012 - 09:50 AM

When I feed float images into the keyer or use the float32 switch in the macro, the result is just "-1.#IND" :-(

edit: ok, this only happens when using the key without a color weight map. The default color map for my blue screen was black though. I had to increase Blue High to 2.0.

#27 Tilt

Tilt

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 2,137 posts

Posted 23 September 2012 - 10:04 AM

Haven't tried KAK yet, but Blender seems to use Voronoi diagram for generating gradient backing screen image. So this might be of interest:
http://wiki.blender....tes/2.64/Keying


As far as I understood them, they are using tracking data to generate a triangle mesh that they are consequently filling up, so this would require tracking markers. You could use the SparseColor Fuse to generate such a clean screen as well :-)
But I gotta look at the source code a bit more to see what Blender is doing.

#28 SecondMan

SecondMan

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,797 posts

Posted 24 September 2012 - 11:28 AM

When I feed float images into the keyer or use the float32 switch in the macro, the result is just "-1.#IND" :-(

edit: ok, this only happens when using the key without a color weight map. The default color map for my blue screen was black though. I had to increase Blue High to 2.0.


Hi Tilt - that actually sounds normal. The idea for the first step of KAK is to generate an internal hard matte from which to generate the Color Weight extraction. That's what the Low/High settings are for. Values of 2.0 are not that exceptional, especially with over-bright screens. In its current form it's emulating the work-flow of IBK but I am looking into ways of making it more straightforward. It's already way less finicky than IBK I feel, but it can suck even less :)

#29 SecondMan

SecondMan

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,797 posts

Posted 24 September 2012 - 11:36 AM

v1.3 - 24.sep.2012

Color Weight Generation:
- Override With Solid Color mode is now much faster.
Keyer:
- RGB results of Use BG Luma, Use BG Chroma and BG Bleed will now yield sensible results instead of over-bright edges.
- Squeeze Matte controls no longer generate negative and +1 matte values when overshooting them.

:)

#30 Tilt

Tilt

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 2,137 posts

Posted 24 September 2012 - 02:26 PM

Haven't tried KAK yet, but Blender seems to use Voronoi diagram for generating gradient backing screen image. So this might be of interest:
http://wiki.blender....tes/2.64/Keying


Here's Blender's keying operation - for blue screen only (for green screen you'd need to replace all occurances of g1 and g2 with b1 and b2):


{
Tools = ordered() {
Background1 = Background {
Inputs = {
GlobalOut = Input { Value = 100, },
Width = Input { Value = 1280, },
Height = Input { Value = 720, },
TopLeftRed = Input { Value = 0.0756756756756757, },
TopLeftGreen = Input { Value = 0.259459459459459, },
TopLeftBlue = Input { Value = 0.762162162162162, },
Gradient = Input {
	 Value = Gradient {
	 Colors = {
	 [0] = { 0, 0, 0, 1, },
	 [1] = { 1, 1, 1, 1, },
	 },
	 },
},
},
ViewInfo = OperatorInfo { Pos = { 990, 82.5, }, },
},
BlenderKeyingOperation_Blue = Custom {
CtrlWZoom = false,
NameSet = true,
Inputs = {
NumberIn1 = Input { Value = 0.5, },
LUTIn1 = Input {
	 SourceOp = "BlenderKeyingOperation_BlueLUTIn1",
	 Source = "Value",
},
LUTIn2 = Input {
	 SourceOp = "BlenderKeyingOperation_BlueLUTIn2",
	 Source = "Value",
},
LUTIn3 = Input {
	 SourceOp = "BlenderKeyingOperation_BlueLUTIn3",
	 Source = "Value",
},
LUTIn4 = Input {
	 SourceOp = "BlenderKeyingOperation_BlueLUTIn4",
	 Source = "Value",
},
Intermediate1 = Input { Value = "n1 * r1 + (1-n1) * g1", },
Intermediate2 = Input { Value = "(b1 - i1) * abs(1 - i1)", },
Intermediate3 = Input { Value = "n1 * r2 + (1-n1) * g2", },
Intermediate4 = Input { Value = "(b2 - i3) * abs(1 - i3)", },
AlphaExp<b></b>ression = Input { Value = "if(i2 < 0, 1,\r\nif(i2 >= i4, 0,\r\n1 - i2/i4))", },
NumberControls = Input { Value = 1, },
NameforNumber1 = Input { Value = "Screen Balance", },
ShowNumber2 = Input { Value = 0, },
ShowNumber3 = Input { Value = 0, },
ShowNumber4 = Input { Value = 0, },
ShowNumber5 = Input { Value = 0, },
ShowNumber6 = Input { Value = 0, },
ShowNumber7 = Input { Value = 0, },
ShowNumber8 = Input { Value = 0, },
ShowPoint1 = Input { Value = 0, },
ShowPoint2 = Input { Value = 0, },
ShowPoint3 = Input { Value = 0, },
ShowPoint4 = Input { Value = 0, },
Image1 = Input {
	 SourceOp = "Text1",
	 Source = "Output",
},
Image2 = Input {
	 SourceOp = "Background1",
	 Source = "Output",
},
Comments = Input { Value = "keyer from Blender 2.64, blue screen operation only\r\nrequires plate as Image1 and clean screen (or blue colored background) as Image2\r\n\r\ni2 = foreground \"saturation\"\r\ni4 = cleanscreen \"saturation\"", },
},
ViewInfo = OperatorInfo { Pos = { 990, 214.5, }, },
},
BlenderKeyingOperation_BlueLUTIn1 = LUTBezier {
KeyColorSplines = {
[0] = {
	 [0] = { 0, RH = { 0.333333333333333, 0.333333333333333, }, Flags = { Linear = true, }, },
	 [1] = { 1, LH = { 0.666666666666667, 0.666666666666667, }, Flags = { Linear = true, }, },
},
},
SplineColor = { Red = 204, Green = 0, Blue = 0, },
NameSet = true,
},
BlenderKeyingOperation_BlueLUTIn2 = LUTBezier {
KeyColorSplines = {
[0] = {
	 [0] = { 0, RH = { 0.333333333333333, 0.333333333333333, }, Flags = { Linear = true, }, },
	 [1] = { 1, LH = { 0.666666666666667, 0.666666666666667, }, Flags = { Linear = true, }, },
},
},
SplineColor = { Red = 0, Green = 204, Blue = 0, },
NameSet = true,
},
BlenderKeyingOperation_BlueLUTIn3 = LUTBezier {
KeyColorSplines = {
[0] = {
	 [0] = { 0, RH = { 0.333333333333333, 0.333333333333333, }, Flags = { Linear = true, }, },
	 [1] = { 1, LH = { 0.666666666666667, 0.666666666666667, }, Flags = { Linear = true, }, },
},
},
SplineColor = { Red = 0, Green = 0, Blue = 204, },
NameSet = true,
},
BlenderKeyingOperation_BlueLUTIn4 = LUTBezier {
KeyColorSplines = {
[0] = {
	 [0] = { 0, RH = { 0.333333333333333, 0.333333333333333, }, Flags = { Linear = true, }, },
	 [1] = { 1, LH = { 0.666666666666667, 0.666666666666667, }, Flags = { Linear = true, }, },
},
},
SplineColor = { Red = 204, Green = 204, Blue = 204, },
NameSet = true,
},
Text1 = TextPlus {
Inputs = {
GlobalOut = Input { Value = 100, },
Width = Input { Value = 1280, },
Height = Input { Value = 720, },
Font = Input { Value = "Arial", },
StyledText = Input { Value = "BLENDER KEY", },
Style = Input { Value = "Bold", },
ManualFontKerningPlacement = Input {
	 Value = StyledText {
	 Array = {
	 },
	 Value = "",
	 },
},
SelectElement = Input { Value = 1, },
Select = Input { Value = 1, },
ShadingGradient1 = Input {
	 Value = Gradient {
	 Colors = {
	 [0] = { 0, 0, 0, 1, },
	 [1] = { 1, 1, 1, 1, },
	 },
	 },
},
Enabled2 = Input { Value = 1, },
RenderToDPTFile = Input { Disabled = true, },
DPTType = Input { Disabled = true, },
DPTResolution = Input { Disabled = true, },
ElementShape2 = Input { Value = 2, },
Level2 = Input { Value = 1, },
ExtendHorizontal2 = Input { Value = 0.7154472, },
ExtendVertical2 = Input { Value = 0.2439024, },
Round2 = Input { Value = 0.4430894, },
Red2 = Input { Value = 0.07568359375, },
Green2 = Input { Value = 0.259521484375, },
Blue2 = Input { Value = 0.76220703125, },
ShadingGradient2 = Input {
	 Value = Gradient {
	 Colors = {
	 [0] = { 0, 0, 0, 1, },
	 [1] = { 1, 1, 1, 1, },
	 },
	 },
},
},
ViewInfo = OperatorInfo { Pos = { 825, 214.5, }, },
},
MatteControl2 = MatteControl {
Inputs = {
PostMultiplyImage = Input { Value = 1, },
Background = Input {
	 SourceOp = "BlenderKeyingOperation_Blue",
	 Source = "Output",
},
},
ViewInfo = OperatorInfo { Pos = { 1155, 214.5, }, },
},
},
}






Also tagged with one or more of these keywords: Macros, Matte, SecondMan

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users