I am in the process of generating a number of gentle curve masks to be used later on some images.
In doing so, I generate two 8 bit images, one black, the other white. I then comp one into the other, using the Mask Spline tool. I start this tool by doing a large oval shape, that spans the entire width (and past the edges) of the image. I then place two points, each about 1/4 the way from the opposite edges along the top of the curved line, then raise one and lower the other, in an attempt to make a horizontal gentle "S" curve.
However, upon close inspection, the curve has two noticeable points/bumps in the line, where those two points had been placed. I have tried placing more than the two points to smooth out the curve but that just results in more little bumps/points at each location. If I don't place any points along the line, the single curve comes out nice and smooth.
I am likely doing something wrong or am misunderstanding exactly how spline curves work, so am wondering if someone can give a bit of advice on how to achieve gentle, perfectly smooth, "S" type mask curves.
Thanks in advance,
Marv
Spline Mask tool
Moderator: jsachs
Re: Spline Mask tool
There are infinitely many different smooth curves that pass through a few points. The only way to get the mask spline tool to make a specific curve is to add lots of extra points. The spline curves used by the mask spline tool tend to have fairly straight line segments which is good for making some shapes but not so good for making others.
You might try creating a mask using the Line and Arrow tool instead as this tool uses a more powerful type of spline that lets you control the slope and velocity of the curve as it passes through each point. If you create an 8-bit black and white image using Line and Arrow, you can then select this as a starting mask by clicking on the amount box and choosing the image. To get the Line and Arrow path to align to features of the image, first apply it in white onto the image. Then do a File New of an 8-bit black and white image of the same dimensions, with a black background, and insert a copy the Line and Arrow transformation after it.
You might try creating a mask using the Line and Arrow tool instead as this tool uses a more powerful type of spline that lets you control the slope and velocity of the curve as it passes through each point. If you create an 8-bit black and white image using Line and Arrow, you can then select this as a starting mask by clicking on the amount box and choosing the image. To get the Line and Arrow path to align to features of the image, first apply it in white onto the image. Then do a File New of an 8-bit black and white image of the same dimensions, with a black background, and insert a copy the Line and Arrow transformation after it.
Jonathan Sachs
Digital Light & Color
Digital Light & Color
-
- Posts: 702
- Joined: September 13th, 2009, 3:19 pm
- What is the make/model of your primary camera?: Nikon D810
- Location: Port Coquitlam, British Columbia
Re: Spline Mask tool
Jonathan,
Thanks, just tried the Line and Arrow and it works perfectly for making buttery smooth curves (which can easily be turned into the masks I am looking for).
And the snap-to angles discussed in a previous post is also a great addition.
Marv
Thanks, just tried the Line and Arrow and it works perfectly for making buttery smooth curves (which can easily be turned into the masks I am looking for).
And the snap-to angles discussed in a previous post is also a great addition.
Marv
Re: Spline Mask tool
I would love to see how you create and apply this I am not sure exactly how this mask is created and how you use it???
-
- Posts: 1431
- Joined: April 25th, 2009, 12:56 am
- What is the make/model of your primary camera?: Fuji X-E2
- Contact:
Re: Spline Mask tool
If I follow Jonathan's Line and Arrow technique, how do I close the lines and fill them so that they become solid masks?
As an aside, I also discovered that if I start with my Image A, insert Line and Arrow transformation below it and draw the line, then I create a New 8bit image with the same dimensions, copy the Line and Arrow transformation below it (i.e. My Mask B) and then use the Mask B in the Amount of Line and Arrow of Image A, the PWP crashes silently.
As an aside, I also discovered that if I start with my Image A, insert Line and Arrow transformation below it and draw the line, then I create a New 8bit image with the same dimensions, copy the Line and Arrow transformation below it (i.e. My Mask B) and then use the Mask B in the Amount of Line and Arrow of Image A, the PWP crashes silently.
Maciej Tomczak
Phototramp.com
Phototramp.com
Re: Spline Mask tool
File New followed by Copy is a nicer solution to how to generate an aligned mask than I came up with.
To close the curve, you need to manually drag the first point over to the last point -- there is no way to produce a closed curve within Line and Arrow.
To fill the interior, you can use the Fill tool.
I see the crash and will fix it shortly.
To close the curve, you need to manually drag the first point over to the last point -- there is no way to produce a closed curve within Line and Arrow.
To fill the interior, you can use the Fill tool.
I see the crash and will fix it shortly.
Jonathan Sachs
Digital Light & Color
Digital Light & Color
Re: Spline Mask tool
This is a replacement for the Mask Spline tool, useful mainly if you want to create a mask with a smooth, sweeping curve. Using the Mask Spline tool, to get such a curve you have to insert a lot of control points as it tends to connect control points with somewhat straight line segments. This is fine if you are copying a shape that has a line of fine detail and/or straight sections, but not so good for tracking a long smooth curved area.
First you need to read up on the Line and Arrow tool which can produce curved lines using a different type of spline algorithm than the Mask Spline tool. If you select curved lines instead of broken lines, each control point has two additional control points that let you control the slope and velocity of the curve around the control point.
1) Use the Line and Arrow tool to paint a thin, white line around the object you want to mask. To create a closed curve, you will need to drag one of the endpoints over the other.
2) Use File New to create a new 8-bit black and white image of the same dimensions in pixels as the image you want to mask.
3) Copy the Line and Arrow transformation to the File New command. This paints a white line on the black background. To copy, Ctrl-click on the Line and Arrow transformation, click on the File New transformation, and then click the Copy button in the image browser (you may have to click the down arrow button first to display the copy button).
4) Use the Fill tool to fill the interior of the curve with white by shift clicking anywhere in the interior.
Now you have an 8-bit black and white image that has a black background and is white within the region you defined using the Line and Arrow tool. This image can then be selected as a mask for other transformations applied to the original image, such as Adjust or Brightness Curve or Composite.
If you want, you can save the mask as an image file if you think you will need to use it again in the future, although it will only work with images of the same dimensions as the original image.
First you need to read up on the Line and Arrow tool which can produce curved lines using a different type of spline algorithm than the Mask Spline tool. If you select curved lines instead of broken lines, each control point has two additional control points that let you control the slope and velocity of the curve around the control point.
1) Use the Line and Arrow tool to paint a thin, white line around the object you want to mask. To create a closed curve, you will need to drag one of the endpoints over the other.
2) Use File New to create a new 8-bit black and white image of the same dimensions in pixels as the image you want to mask.
3) Copy the Line and Arrow transformation to the File New command. This paints a white line on the black background. To copy, Ctrl-click on the Line and Arrow transformation, click on the File New transformation, and then click the Copy button in the image browser (you may have to click the down arrow button first to display the copy button).
4) Use the Fill tool to fill the interior of the curve with white by shift clicking anywhere in the interior.
Now you have an 8-bit black and white image that has a black background and is white within the region you defined using the Line and Arrow tool. This image can then be selected as a mask for other transformations applied to the original image, such as Adjust or Brightness Curve or Composite.
If you want, you can save the mask as an image file if you think you will need to use it again in the future, although it will only work with images of the same dimensions as the original image.
Jonathan Sachs
Digital Light & Color
Digital Light & Color
Re: Spline Mask tool
Thanks so much for the example.....makes sense now....
-
- Posts: 702
- Joined: September 13th, 2009, 3:19 pm
- What is the make/model of your primary camera?: Nikon D810
- Location: Port Coquitlam, British Columbia
Re: Spline Mask tool
priort,
Thought I would add a comment or two, in addition to what Jonathan and others have already posted, just to give you an idea of what I was trying to accomplish. A while back (as in years) I did up a series of images that combined a mask (or two) in combination with hand drawn lines across the page to get some graphic results (although they were based on images I had taken in the American southwest, the results were markedly different from a photographic image). At that time, I did not obtain smooth lines by free-handing the lines, so thought I would give it another try. As a result of my questions and Jonathan's responses, I tried the Line and Arrow tool. The lines were drawn across the entire image, so did not need to be a completed circle, and as I indicated, I wanted them smooth.
Attached are two images, one of the originals from a while back and the second, one that I am using to generate masks, by flood filling each section with a mask, then using that mask in another image. I also used the line image as a mask for the section outlines.
Hope this clarifies.
Marv
Thought I would add a comment or two, in addition to what Jonathan and others have already posted, just to give you an idea of what I was trying to accomplish. A while back (as in years) I did up a series of images that combined a mask (or two) in combination with hand drawn lines across the page to get some graphic results (although they were based on images I had taken in the American southwest, the results were markedly different from a photographic image). At that time, I did not obtain smooth lines by free-handing the lines, so thought I would give it another try. As a result of my questions and Jonathan's responses, I tried the Line and Arrow tool. The lines were drawn across the entire image, so did not need to be a completed circle, and as I indicated, I wanted them smooth.
Attached are two images, one of the originals from a while back and the second, one that I am using to generate masks, by flood filling each section with a mask, then using that mask in another image. I also used the line image as a mask for the section outlines.
Hope this clarifies.
Marv
- Attachments
-
- lined-2-light-moon.jpg (19.53 KiB) Viewed 3489 times
-
- Curves-v12.jpg (14.4 KiB) Viewed 3489 times