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

#61 samsoe

samsoe

    Piglet

  • Adv Members
  • 5 posts

Posted 01 November 2012 - 09:44 AM

Sorry… all this writing. Why not just create a KAVT (Kick Ass Video Tutorial)…? It is much faster than all of these technical descriptions.
Looking forward :o)
/Samsoe
  • Efferiacard and mikenicey like this

#62 fusionWannabe

fusionWannabe

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 525 posts

Posted 19 November 2012 - 01:44 PM

I'm trying to learn the best way to key R3D files, somewhat hindered by my primitive green screen where the floor is a different color than the green screen - which tends to leave a line where they meet.

I've gotten rid of the line, but ... I'm hoping I could do better with your tool.

I'm also using NeatVideo to denoise (not much noise) and sharpen slightly. Unsure if that's a good idea?

Anyway, would appreciate any input on the best way to key this as I've got to setup a workflow for about 1.5 hours of footage, which is a bit insane to deal with.

I'm including a comp using Primatte and NeatVideo as well as a single frame R3D.

Tried to upload a 100k png image, but 'error: this upload failed"?

Attached Files



#63 SecondMan

SecondMan

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,797 posts

Posted 20 November 2012 - 02:49 AM

First, upgrade to v2.5 :)

v2.5 - 19.nov.2012
Main
- cleanup of code so the macro is smaller in size, yet has more features. Crossed the 100 node count!
- default Helper is now Hold FG, for quicker setup (you can immediately pick a screen color) and less confusion by KAK's default output when Screen Type and Color are not set.
Clean Plate Generation
- the term Color Weight has been replaced by Clean Plate throughout, as it's a more intuitive term.
- massively improved hard matting!
- new "Hard Matte Looms" called Lloyd and Lusty, which are 2 different ways of generating the Hard Matte. They both are more intuitive to use and fine-tune than the previous method, with only one single fine-tuning parameter each. Lusty method yields results closest to those seen in previous versions of KAK.
- added Replace Hard Matte With FG Image Alpha Channel.
- added Soften Overall Color Weight.
- renamed/reordered some color weight parameters to something more meaningful.
Keyer
- fixed Matte Shift toggle button.
- fixed Use BG chroma/Use BG Luma don't work properly when BG alpha is transparent/zero.
- garbage matte now works with an external KAK color weight too.
- Clean Up now has a default value of 0.1, which is generally a more sensible value to use.

http://www.vfxpedia....KAK_Description


Then for your key. Here's a starting point:

- add KAK 2.5 to your comp
- connect your R3D image to the Foreground Image input
- connect your Background to the Background Image input
- set Screen Type to Green
- set Screen Color to

0.1366
0.3826
0.2084

- set Helpers to Key on BG
- under Clean Plate Generation, set Foreground Image Depth to 32bit float
- set Hard Matte Loom to Lusty
- set Lusty Finetune to 2.61
- under Keyer, turn on Garbage Matte / Shrink <> Expand
- set Helpers to KAK and study the RGB and alpha channels of the result

Keep your eyes on your image at every step of the way, you'll see some interesting stuff going on. Obviously this won't give you a final result, there are quite a few problems to solve but it hopefully gives you an idea of what is possible.

Pieter.

#64 fusionWannabe

fusionWannabe

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 525 posts

Posted 22 November 2012 - 01:34 AM

@SecondMan - wow, thanks for the instructions! I can see what it can do now. It's easily as good as Primatte with very little work and I can't wait to see it used at full potential!!!

I tried a different subject in the included comp and R3D.

I need to adjust it a bit more to get the area around the feet keyed properly, but that's not my concern. I noticed two things that confused me and I've got 3 questions.

1. If I set the 'garbage' after linking a BSpline garbage matte to the KAK.OpenKAK input, I notice that it does filter out the areas outside the garbage matte, but ... instead of improving the key, I now get a line where the green floor intersects with the green screen? That line goes away if I uncheck 'garbage'? I guess I thought it would only look at the area of interest if I used a garbage matte?

2. Somehow, the output from KAK is a smaller cropped image than the original R3D? In the R3D, the bottom of the right toe is maybe 6 inches from the bottom of the image, but it's getting slightly cut out in this comp?

3. What's the best way to handle sharpening when keying? I've done some slight sharpening in NeatVideo. My limited tests seem to indicate that sharpening there introduces less artifacts and looks better than trying to sharpen later, but ... I'm no doubt overlooking something obvious.

I sure do miss having the larger depth of field after moving to R3D's, but ... I'm hoping it's just a matter of implementing a proper sharpening workflow?

Here's the 2MB comp and R3D KAK Test2.zip (PigsFly failed for my upload even after breaking up into smaller zips and failed on a 100k image the other day, something seems amiss?)

https://www.yousendi...hUENnYU9Ga2NUQw

#65 Tilt

Tilt

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 2,137 posts

Posted 22 November 2012 - 01:55 AM

sharpening before keying is a big no-no.

#66 SecondMan

SecondMan

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,797 posts

Posted 22 November 2012 - 02:41 AM

Thanks for your kind words, fusionWannabe :)

To answer your questions:

1. Yes, that's because the Garbage Matte piped into OpenKAK will replace your internal Hard Matte (the pink overlay) as a garbage matte. You can choose to combine the two outside of KAK. I might change this a little in a future version, I agree it would be nice if you could just add to the internal one.

2. That is because your background is smaller than your foreground.

3. What Tilt said. Given your footage I would not bother with denoising or sharpening at all.

I put a comp together showing you how to connect two KAKs together and combining the garbage mattes. Hope that helps.

Pieter.

Attached Files



#67 fusionWannabe

fusionWannabe

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 525 posts

Posted 22 November 2012 - 05:01 PM

@SecondMan - thanks for re-working the comp for two KAK's - and the tip about upping my default frame depth!!!

I guess I've got to spend some time re-learning the basics of Fusion!

When I rendered the KAK Test3.comp you returned, it would show only a small area in the lower left as the output - with none of the subject shown.

To get it to render properly, I had to change the 'frame format' to 3840 x 2160.

1. Is that what I should be doing with QuadHD R3D files, even if I'm rendering to 1080p? I'm trying to figure out an R3D workflow, so any tips would be very appreciated!

2. I thought that I'd just need to fiddle with the settings for a while to get the area below the feet to key out properly, but ... even though the color of the green matte at that location is only slightly lighter than the rest of the matte, I'm having difficulty finding the proper setting to change?

I noticed that the screen color chosen (unless choosing is order dependent?), doesn't seem to affect the output very much, if at all?

What am I overlooking to get the area below the feet to key out properly? I'd like to maximize the area available on the green floor, as the subjects will be exercising and may step out to near the edges.

Thanks!

#68 SecondMan

SecondMan

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,797 posts

Posted 23 November 2012 - 12:41 PM

Ha, yes, that would be me trying to be a little fast. I simply put your BSpline into a Boolean background input. In that case, when you reopen the comp, the BSpline cannot inherit the resolution of another tool (it is not used as a mask) so it will take its resolution from the default Frame Format settings, which was smaller than 3840x2160, so when used as a garbage matte it will crop the results of the KAK.

So...

1. You can do either. If ALL of your source material is 3840 x 2160 and you are basically comping at that resolution and simply down-scaling at the end, then yes, use that as your Frame Format. If however everything is 1080p and only your input footage is 3840 x 2160, pretty much scaled down after you bring it in, then I would recommend putting it at 1080p. But keep your eye on your masks, as illustrated above ;)

2. Depends, really. What is it you are trying to achieve? Do you wish to keep the shadow, for example, or get rid of it? Would it perhaps be easier to use 2 keys, one for above the line, one for below, and combine them? Try a few different things.

And you are correct, when using a Clean Plate to key against in KAK (internal or external) the Screen Color is used to help generating that Clean Plate, so adjusting the Screen Color after that will have less or no influence on the final key unless it really changes the results of your Clean Plate.

If you want to key against the Screen Color itself, set Clean Plate to Screen Color. I would recommend you try that, too, just to see what happens.

Now, if you would like somehow try a combination of the two, i.e. you want a Clean Plate and more control over your Screen Color, you can split out two KAKs as in my example, and color correct the Clean Plate from KAK 1 before it goes into KAK 2. Again, just give that a shot, but be careful not to destroy edges and other results that way. I wouldn't recommend that as a default setup, but no harm to just play with it and get to know the tool.

As I say on VFXPedia, "Often you will find that there isn't a one-tool-wonder for keying. This one is no different. A good key is often built up from several different layers generated with as many different keyers."
You'll have to do some experimenting and figure out what works best for you. Hope this helps, and good luck! :)

#69 fusionWannabe

fusionWannabe

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 525 posts

Posted 23 November 2012 - 02:06 PM

@SecondMan - KAK is proving to be better than any keying solution I have, so ... thanks a lot!!!

I've got a number of subjects to key, and I do want to get rid of all the shadows.

I just tried your suggestion of changing the 'clean plate' to 'screen color' for the 2nd KAK (that uses the 1st for a garbage matte), and that seems to have fixed my problem for the area below the feet in the 2nd KAK.

However, in all my attempts, I could never get the area below the feet included in the garbage matte in the 1st KAK with the African American lady.

In my earlier shot with the blond kid, I shot at f5 rather than f4, and as shown in the image, the area below his feet gets included in the garbage matte. That should have been the only change in the R3D.

So, getting the 1st KAK garbage matte to just show the body outline is the only thing that perplexes me?

here are the two matte images:

(I tried deleting attachments on PigsFly, but still won't let me upload 2 small images, so they are in youSendIt matte images.zip)

https://www.yousendi...ZQTY4aU1aQ2NUQw

If choosing the color only affects the output at one stage (this was my observation, and I think you confirmed this), maybe a button for 're-calculate with new screen color'?

I spent a lot of hours getting a feel for each input slider last night.

The one's that were most useful in my testing were:

'soft fill with clean plate'
'soften overall clean plate'
'clean up' under keyer

BTW - Would it be possible to shoot a clean plate shot with no subjects, and use that in some fashion?

Again, thanks a lot - this is a very cool tool.

#70 SecondMan

SecondMan

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,797 posts

Posted 24 November 2012 - 01:11 AM

Take a look at the updated comp I have attached to this message. It builds on your previous one, but I set Hard Matte Loom to Lloyd and fine-tuned it until the purple overlay covered the area underneath her feet. I have added some more notes in there too, in orange.

A "recalculate with new screen color" would not do anything helpful, nothing needs recalculating. KAK keys against a clean plate. That clean plate can either be a solid color, or a Clean Plate consisting of a range of colors in the backing screen. When you choose to use the Clean Plate, that Clean Plate selection of colors also starts from your Screen Color, but after that, the Screen Color is no longer used. If you think you do need to "adjust the screen color" further, just use the 2-KAK setup and color correct the Clean Plate to your liking.

That said, and to answer your question, yes of course you can shoot a clean plate with no subjects and use that in KAK! :)

In fact, I suspect you could get some terrific results with it. Just connect the clean plate to the Clean Plate input of KAK, set Clean Plate to External and you should be good to go!

Attached Files



#71 fusionWannabe

fusionWannabe

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 525 posts

Posted 24 November 2012 - 03:28 PM

Your changes with the Lloyd solved the 'feet' problem!!

When I combined that with an actual clean plate with no subject, keeping the 2 KAK workflow for all the other inputs, I got an absolutely perfect key (although the 2 KAK alone seemed to give slightly better hair detail on wisps).

Thanks a lot for all the time you've taken to help me!!

I've got 1.5 hours of R3D green screens of different subjects that will be a bit of a nightmare to deal with (a lot of hours devoted to rendering just the stripped image sequences as no RED Rocket).

They are talking some of the time and must also be synchronized in step with music (I sprang for an in-ear wireless monitoring system and method to get music into one channel of R3Ds) so I've got to come up with a workflow for 5 subjects on CGI stage at once with audio from each R3D (more of a Adobe CS6 issue, I expect). Ahhhh!

Probably a negative money flow, but ... it's a project that should help kids so ... I'm sure I'll be happy I did it and I'm learning a lot.

I hope having a few 'less than professionally shot' green screen R3D's was useful to your development of the tool (if you can handle the worst-case scenario, then the best-case is probably a cake-walk!)

#72 SecondMan

SecondMan

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,797 posts

Posted 24 November 2012 - 03:43 PM

Ha, nice, good to hear! :)

You're most welcome - if you don't mind, at some point, uploading one of your setups with an actual clean plate, I'd like to take a look. So far all of my tests and builds were for no-clean-plate-shoot-setups.

Can't ever have too many test cases. ;)

Very best of luck with your project!

Pieter.

#73 fusionWannabe

fusionWannabe

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 525 posts

Posted 24 November 2012 - 04:21 PM

Here's my minor change with the 'clean plate'.

I just duplicated the KAK and hooked in the empty clean plate (which actually has the subject leaving the screen, but is empty as far as where she was standing).

https://www.yousendi...VNkdlaFIzZU1UQw

#74 SecondMan

SecondMan

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,797 posts

Posted 25 November 2012 - 02:27 AM

Thanks fusionWannabe, much appreciated! :)

#75 fusionWannabe

fusionWannabe

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 525 posts

Posted 25 November 2012 - 04:29 PM

I'll be sure to shoot clean plates on my next shots and will have quite a mix of nationalities (unsure if/how that will affect keying).

The kids will be wearing fluorescent hot bright colors (none green or containing much green), so ... that should be interesting to key? I taped some swatches to a subject and the fabrics seemed to key ok, but ... won't really know until the clothes are finished and worn in real-life.

BTW - watched your 'Lost Cargo' short and found it really well done! Do you have a higher res download than the AWNtv site?





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