PDA

View Full Version : masking out in multiply mode


fandalis
08-18-2010, 11:57 PM
Hi, i'm an AE user switching to NUKE. i'm trying to recomp my composites from ae to nuke but i'm stuck with masking out edges of my smoke footage. The smoke footage i'm using has no alpha. I want to foreground layer the smoke in multiply mode (so the whites will be transparent) then mask out the edges of it. i tried to connect the smoke footage to a COPY NODE then connect my RotoPaint node then Premult it then connect to a Merge node. Inside the merge node, over mode, my mask is ok but i need to set it to multiply. but when i set this to multiply the masked out layer turns black. i also tried to switch the "alpha masking" on, again the masking is ok but the white are there again.

Here's a screenshot;

http://www.elementalfx.net/masking.jpg

fandalis
08-19-2010, 12:17 AM
BTW, i'm using nuke 6.1 PLE. thanks a lot in advance!

scrawford
08-19-2010, 01:00 AM
You could just merge the smoke over the dog, and plug the mask into the mask input of that merge.

scrawford
08-19-2010, 01:02 AM
If you had to take care of it before the merge, you would need to merge white over your smoke where you didnt want it to show since you are multiplying in the merge. Right now when you premult your alpha you are creating pixels with rgb values of 0. When 0 is multiplied by the color of the dog your just getting 0 back.

fandalis
08-19-2010, 01:25 AM
you mean like this? the smoke is again not multiplied...

http://www.elementalfx.net/masking2.jpg

fandalis
08-19-2010, 01:32 AM
If you had to take care of it before the merge, you would need to merge white over your smoke where you didnt want it to show since you are multiplying in the merge. Right now when you premult your alpha you are creating pixels with rgb values of 0. When 0 is multiplied by the color of the dog your just getting 0 back.

yes that's what i've been thinking... is there another workaround for this?

MasonDoran
08-19-2010, 10:40 AM
Technically, smoke should be used as "over" because it does not darken or multiply and is actually opaque particles preventing you from seeing the image underneath. The alpha is needed to control how much you see. Artistically of course, you may want a different effect.

Why not use a luminance key to create your alpha of the smoke, add a roto to clip the falloff, and just use over blend mode?

To get some kind of darkening effect, you can then use the alpha of the smoke and grade the image beneath the smoke.

MasonDoran
08-19-2010, 10:48 AM
set cut_paste_input [stack 0]
version 5.2300
push $cut_paste_input
Noise {
output {rgba.red rgba.green rgba.blue -rgba.alpha}
center {512 512}
name Smok_noAlpha
selected true
xpos -211
ypos -211
}
Keyer {
operation "luminance key"
selected true
xpos -211
ypos -160
}
Bezier {
invert true
points {{
{234 84 141 -0.66 141}
{758 70 150 0.61 150}
{928 742 150 2.48 150 0 268.2 0.34}
{164 828 141 -2.53 141 0 370.7 -0.42}
}}
shape {{curve i L x1 0}}
center {512 512}
color 0
name falloff
selected true
xpos -211
ypos -110
}
set Nc51ef90 [stack 0]
push $Nc51ef90
Grade {
whitepoint 2.18
add -0.022
gamma 0.375
name CC_Smoke
selected true
xpos -211
ypos -11
}
push $Nc51ef90
ColorWheel {
inputs 0
edgeSaturation 0.395
centerValue 0.372
gamma 0.294
name ColorWheel1
selected true
xpos -57
ypos -346
}
Constant {
inputs 0
channels rgb
color {0.14 0.42 0.14 0}
name Constant1
selected true
xpos 68
ypos -341
}
Merge2 {
inputs 2
name Merge1
selected true
xpos 31
ypos -206
}
Grade {
inputs 1+1
multiply 0
gamma 0.375
name CC_Image
selected true
xpos 31
ypos -110
}
Merge2 {
inputs 2+1
name Merge2
selected true
xpos 31
ypos -11
}

fandalis
08-20-2010, 09:48 PM
Hey thanks! I'm trying to work this out right now. Is'nt there a bezier node tool in 6.1ver? or was replaced by the rotopaint node in the latest version. coz i tried your script and the masking is working fine but when i replace it with the roto or rotopaint node the blacks are there again. i compared/inspected your parameters to mine i think they are set fine. i will do a screencapture after this.

fandalis
08-20-2010, 10:12 PM
here is the screen capture
http://www.elementalfx.net/masking3.jpg

MasonDoran
08-22-2010, 01:23 PM
Roto replaces bezier and works a bit differently although is essentially the same, you will have to manually control the alpha output in the Roto node.

CGTalk Moderation
08-22-2010, 01:23 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.