PS Research: Circular brushes and gradient Curvature

Source: Internet
Author: User

In the past two days, when comparing the hardness parameters of the PS paintbrush tool, we found that the circle drawn directly by the brush is different from the circle filled by the shape path, note the following figure:


It is also a circle with a radius of 100 pixels,LeftIs filled by the shape layer with gradient,RightIs directly from the hardness of 0% brush click to draw.

It can be found that the right image is slightly larger than the left image and the gradient is smoother. The outermost circle of the Left graph seems to have a clear boundary line, not like a smooth transition to pure white. It seems that the hardness gradient in the PS brush is not a simple radial linear gradient. For more precise analysis, I checked the actual color at different radius and marked every 10% of the changes. The results showed that:

The dial line at the top of the line indicates that the line starts to be 100% black, and the line at the bottom is reduced by 10% for each line to the next line until the line at the bottom is 0% (that is, pure white ). It can be clear that the gradient used for paint rendering is indeed not linear, and its actual radius actually reaches 160 pixels, more than half of the specified 100 pixel radius! The black degree at the radius of 100 pixels is about 10% (that is, the penultimate curve of the right image ).

I was surprised to find that the actual rendering is not actually linear even when the simplest linear gradient is used in PS, instead, a non-linear algorithm with narrow width and middle is used.

We know that the physiological perception of a person is proportional to the logarithm of the actual physical stimulus intensity. That is to say, when the stimulus intensity increases to 10 times, the human sensation is only increased to 2 times. This is why we only feel an octal higher when the frequency of sound doubles. If we adopt a strict linear gradient, we will feel that the transition between the two ends is too fast, and the intermediate transition is too slow, resulting in the illusion of "non-linear.

PS adopts a nonlinear gradient here, which should be used to compensate people for such physiological characteristics. After all, PS is the first goal for plotting, not the correctness of mathematics. To better display this variable curvature, I drew the following curve:

The curve on the left side is relatively simple. Although some curve compensation is used, it is still approximately linear and can be directly fitting through a simple cubic curve, while the curve on the right side is relatively large, in addition, a cubic curve cannot be used for fitting. It seems that two curves can be connected at the midpoint of 50%.

In addition, the ratio of the gradient to the actual part and the actual size of the overall paint brush are constantly changing and non-linear for Different Hardness brushes. Shows the change trend of the actual size of the real part and the paint brush from 0% to 100%:

The top line is the Solid Edge, that is, the radius distance from the center to the top line is pure black, while the bottom line is the overall actual size edge, that is, the radius distance between the top edge and the bottom line is the curvature gradient, while the radius distance from the bottom line is pure white and does not belong to the paint range of the brush. These two lines also have minor curvature compensation (probably this is the most linear case in PS by default ).

The specific curvature change functions need further measurement and calculation, but the overall idea is clear.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.