This discussion is locked
imaiden

Q: Cleaning up skin tones, Shake script not working

I am trying to alter a sequence of this actor here:

http://img353.imageshack.us/i/870177trythiscopyxt8.jpg/?a=j&ci=-1&rt=2

With what is being described here:

http://forums.creativecow.net/thread/154/855212

What I come up with is this:

N870177trythis = SFileIn("//User\xd5s mac pro/Volumes/SUN/870177trythis.jpg",
"Auto", 0, 0, "v1.1", "0", "");
Blur1 = Blur(N870177trythis, 34.1, xPixels/GetDefaultAspect(),
0, "gauss", xFilter, "rgba");
Saturation1 = Saturation(N870177trythis, 10);
SwitchMatte1 = SwitchMatte(Blur1, Saturation1, 1, "R", 1, 0);


// User Interface settings

SetKey(
"nodeView.Blur1.t", "0",
"nodeView.Blur1.x", "210.75",
"nodeView.Blur1.y", "579",
"nodeView.N870177trythis.t", "1",
"nodeView.N870177trythis.tnChannel", "0",
"nodeView.N870177trythis.tnTime", "1",
"nodeView.N870177trythis.tnVisible", "1",
"nodeView.N870177trythis.x", "258.5",
"nodeView.N870177trythis.y", "640.125",
"nodeView.Saturation1.t", "0",
"nodeView.Saturation1.x", "370.5",
"nodeView.Saturation1.y", "589.75",
"nodeView.SwitchMatte1.t", "0",
"nodeView.SwitchMatte1.x", "305.25",
"nodeView.SwitchMatte1.y", "490.75"
);


I am sure that I am missing something basic but I just cannot seem to get this script to work.

Any help is appreciated.

Mac OS X (10.5.4), samba

Posted on Dec 24, 2010 7:13 AM

Close

Q: Cleaning up skin tones, Shake script not working

  • All replies
  • Helpful answers

  • by stuckfootage,Solvedanswer

    stuckfootage stuckfootage Dec 24, 2010 7:05 AM in response to imaiden
    Level 4 (3,040 points)
    Dec 24, 2010 7:05 AM in response to imaiden
    Hi,

    You forgot the Over node at the end, which combines blurred skin with clear BG.

    Looking at the alpha channel of the SwitchMatte node, I see that the matte
    is not very good, so I inserted an Expand node to push up the skin, but leave
    the eyes and lips clear.

    Finally, I backed off on your Blur to make things a little more natural.
    The effect smooths out small textural details like pores and freckles,
    but doesn't work on big things like the scar. BTW, if you crank up the
    blur, you get a cool cartoon or watercolor effect.

    I hope that answers your question.

    Les Stuck

    N870177trythis = SFileIn("./870177trythis.jpg", "Auto", 0, 0,
    "v1.1", "0", "");
    Blur1 = Blur(N870177trythis, 20, xPixels/GetDefaultAspect(),
    0, "gauss", xFilter, "rgba");
    Saturation1 = Saturation(N870177trythis, 4);
    Expand1 = Expand(Saturation1, 0.9, 0, 0, 0, 1, rHi, rHi, 1);
    SwitchMatte1 = SwitchMatte(Blur1, Expand1, 1, "R", 1, 0);
    Over1 = Over(SwitchMatte1, N870177trythis, 1, 0, 0);


    // User Interface settings

    SetKey(
    "nodeView.Blur1.t", "0",
    "nodeView.Blur1.x", "80.04309",
    "nodeView.Blur1.y", "259",
    "nodeView.Expand1.t", "0",
    "nodeView.Expand1.x", "200.75",
    "nodeView.Expand1.y", "213.25",
    "nodeView.N870177trythis.t", "1",
    "nodeView.N870177trythis.tnChannel", "0",
    "nodeView.N870177trythis.tnTime", "1",
    "nodeView.N870177trythis.tnVisible", "1",
    "nodeView.N870177trythis.x", "183.043091",
    "nodeView.N870177trythis.y", "401.2044",
    "nodeView.Over1.t", "0",
    "nodeView.Over1.x", "378.5",
    "nodeView.Over1.y", "69.25",
    "nodeView.Saturation1.t", "0",
    "nodeView.Saturation1.x", "195.043091",
    "nodeView.Saturation1.y", "259",
    "nodeView.SwitchMatte1.t", "0",
    "nodeView.SwitchMatte1.x", "65.79309",
    "nodeView.SwitchMatte1.y", "153"
    );
  • by imaiden,

    imaiden imaiden Dec 24, 2010 7:05 AM in response to stuckfootage
    Level 1 (10 points)
    Dec 24, 2010 7:05 AM in response to stuckfootage
    Thanks!
  • by William Holderness,Helpful

    William Holderness William Holderness Dec 24, 2010 7:05 AM in response to imaiden
    Level 1 (80 points)
    Dec 24, 2010 7:05 AM in response to imaiden
    You might want to also consider masking the edges from the blur, this will allow you to smooth (blur) surfaces more without making the details too soft, (Use a convolve or an edgedetect to modulate an iBlur node.)

    SFileIn1 = SFileIn("//Tinman/Users/Bill/Desktop/870177trythis.jpg",
    "Auto", 0, 0, "v1.1", "0", "");
    Bytes1 = Bytes(SFileIn1, 2);
    EdgeDetect1 = EdgeDetect(SFileIn1, 4.9, 0.47312, 1, 0, 0, 10,
    27.8, xBlur/GetDefaultAspect(), 1.5, xDilateErode/GetDefaultAspect(),
    0, 0, "Sobel", 8, 1);
    Invert1 = Invert(EdgeDetect1, "rgba");
    IBlur1 = IBlur(Bytes1, Invert1, 20, xPixels/GetDefaultAspect(),
    0, "triangle", "triangle", 5, 1, "R", "rgba", 0);


    // User Interface settings

    SetKey(
    "nodeView.Bytes1.t", "0",
    "nodeView.Bytes1.x", "158",
    "nodeView.Bytes1.y", "341",
    "nodeView.EdgeDetect1.t", "0",
    "nodeView.EdgeDetect1.x", "272",
    "nodeView.EdgeDetect1.y", "386",
    "nodeView.IBlur1.t", "0",
    "nodeView.IBlur1.x", "186",
    "nodeView.IBlur1.y", "233",
    "nodeView.Invert1.t", "0",
    "nodeView.Invert1.x", "311",
    "nodeView.Invert1.y", "315",
    "nodeView.SFileIn1.t", "1",
    "nodeView.SFileIn1.tnChannel", "0",
    "nodeView.SFileIn1.tnTime", "1",
    "nodeView.SFileIn1.tnVisible", "1",
    "nodeView.SFileIn1.x", "211.25",
    "nodeView.SFileIn1.y", "546.375"
    );
  • by William Holderness,Helpful

    William Holderness William Holderness Dec 24, 2010 7:05 AM in response to William Holderness
    Level 1 (80 points)
    Dec 24, 2010 7:05 AM in response to William Holderness
    P.S.

    Ooops....
    Neglected to mention the upsample (bytes node) Normally when I blur to remove grain I upsample to 16 bits to prevent adding (8bit) banding, though that node is not really necessary (in this case).

    BTW it is the blue channel in that image that is causing you most of the problem, the noise and compression artifacts (in blue) are horrid.
  • by imaiden,

    imaiden imaiden Dec 24, 2010 7:05 AM in response to William Holderness
    Level 1 (10 points)
    Dec 24, 2010 7:05 AM in response to William Holderness
    I still do not fully understand your script and why it works but it is exactly what I was looking for. The photo was a screen grab so I am hoping that the actual video is not that bad.

    Thanks for your help.
  • by William Holderness,

    William Holderness William Holderness Dec 24, 2010 7:06 AM in response to imaiden
    Level 1 (80 points)
    Dec 24, 2010 7:06 AM in response to imaiden
    Glad it worked for you.
    Basically it uses a edgedetect to find the edges (details) then fattens (dilate) and blurs them to use as a mask. This edge mask (inverted ) is used to control the blur in the iblur node (which is also fed the main image from the filein), so basically it (iblur node) only blurs where details weren't found.
  • by William Holderness,

    William Holderness William Holderness Dec 24, 2010 7:06 AM in response to imaiden
    Level 1 (80 points)
    Dec 24, 2010 7:06 AM in response to imaiden
    I took a screen shot of an AB compare / blue only. Not only can you see just how rough the blue channel is but also that the despeckle script gets the bulk of it without completely torching details.
    http://idisk.mac.com/holderness/Public/Concept/BlueAB.tiff
  • by imaiden,

    imaiden imaiden Dec 24, 2010 7:06 AM in response to William Holderness
    Level 1 (10 points)
    Dec 24, 2010 7:06 AM in response to William Holderness
    I am starting to understand. Can you tell me what the bytes node does for us?
  • by William Holderness,

    William Holderness William Holderness Dec 24, 2010 7:06 AM in response to imaiden
    Level 1 (80 points)
    Dec 24, 2010 7:06 AM in response to imaiden
    Whenever you blur you can easily create banding in 8 bit color (particularly in luma ramps), the jump to 16 bit color (via bytes node) ensures that you don't introduce banding with the blur. (though with this source I don't think you would notice any banding (the more grain, the less you see banding) so you could likely delete or disable the bytes node in this case (as it does increase the processing load.)