Welcome to WSL!

Make yourself at home, but before posting, please may I ask you to read the following topics.


Posting 101
Server space, screenshots, and you

Thank you!

PS. please pretty please:


Image

Getting an alpha from paint strokes

Moderator: SecondMan

User avatar
JimbobVFX
Posts: 21
Joined: Tue Jun 23, 2020 9:16 am

Getting an alpha from paint strokes

#1

Post by JimbobVFX » Fri Jun 26, 2020 5:17 pm

How can I get an alpha of just where my paint strokes are?

Is there also a way to convert 100 clone strokes into color strokes in one batch?

User avatar
ShadowMaker SdR
Fusionista
Posts: 896
Joined: Sun Sep 21, 2014 6:17 am
Answers: 8
Been thanked: 36 times

Re: Getting an alpha from paint strokes

#2

Post by ShadowMaker SdR » Sat Jun 27, 2020 7:57 am

The easiest way to change your clones is by changing the original source to a solid color. The clones will then be solid as well.

User avatar
JimbobVFX
Posts: 21
Joined: Tue Jun 23, 2020 9:16 am

Re: Getting an alpha from paint strokes

#3

Post by JimbobVFX » Sat Jun 27, 2020 7:58 pm

My source is solid. What I’m trying to get is an alpha that represents only the areas that my strokes are.

If they were color strokes then I would be fine because I could connect them to a transparent layer. But because they are clones that won’t work. So I was looking for a way to convert them all to color.

In other software I might find an option to change the output of the node to show strokes only, instead of over the background.

User avatar
ShadowMaker SdR
Fusionista
Posts: 896
Joined: Sun Sep 21, 2014 6:17 am
Answers: 8
Been thanked: 36 times

Re: Getting an alpha from paint strokes

#4

Post by ShadowMaker SdR » Sun Jun 28, 2020 12:37 am

I don't think I've explained this well enough. How did you set up your clone strokes? Are the sources of the strokes referring to an actual image/loader? If so, changing the image that feeds into the paint tool won't change the painted result. So if you feed the paint tool a transparent image, the result will be a transparent image with solid strokes, thus giving you the alpha you need.

Any chance you can share the comp with us? Changing all the strokes to color might even be possible with a relatively simple script.

User avatar
JimbobVFX
Posts: 21
Joined: Tue Jun 23, 2020 9:16 am

Re: Getting an alpha from paint strokes

#5

Post by JimbobVFX » Tue Jun 30, 2020 4:48 pm

I tried copying the node and feeding in a transparent background. Unfortunately the clone just clones the transparency.

User avatar
Midgardsormr
Fusionator
Posts: 1817
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 15
Location: Los Angeles, CA, USA
Been thanked: 109 times
Contact:

Re: Getting an alpha from paint strokes

#6

Post by Midgardsormr » Tue Jun 30, 2020 8:24 pm

This will be clearer with a picture. When you're in clone mode, there are two inputs. The main input of the Paint node is the image being painted over—the transparent Background goes there, to provide an empty canvas to paint on. In the Inspector, there's a Clone Source field. Drag whatever you're cloning from into that field, and you'll get this result:

Image

Added in 1 minute 18 seconds:
Set up in this fashion, you can still Merge the Paint node over the original footage to get the same result as if you'd put the source footage into the Paint's main input, but you also get the ability to use your paint strokes as a mask elsewhere.

User avatar
JimbobVFX
Posts: 21
Joined: Tue Jun 23, 2020 9:16 am

Re: Getting an alpha from paint strokes

#7

Post by JimbobVFX » Wed Jul 01, 2020 2:44 am

Thanks Bryan. I see now.

So if you don't put anything in the Source Tool field it automatically uses the input image as the clone source

I think I still need to go and modify the source for every one of my strokes though.

Unless there is a shortcut? :)

Find>Replace in text editor maybe?

User avatar
Midgardsormr
Fusionator
Posts: 1817
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 15
Location: Los Angeles, CA, USA
Been thanked: 109 times
Contact:

Re: Getting an alpha from paint strokes

#8

Post by Midgardsormr » Wed Jul 01, 2020 8:42 am

Hmmm... I see a hole in Batch Change Parameters—it doesn't have any way of finding Modifiers. One more thing for the list.

I imagine /for could do it. I don't have it installed, so can't give you the exact syntax. Or you could go pure Lua:

Code: Select all

for i, tool in ipairs(comp:GetToolList(false, "Multistroke")) do tool.PaintApplyRubThrough.SourceTool = comp.<tool name> end
The danger with both of those is that they'll hit every Multistroke in the comp, so if you're cloning from more than one source, it could be bad.