Activity › Forums › Adobe After Effects › 1 pixel line in after effects
-
1 pixel line in after effects
Posted by Kevin Tang on February 3, 2020 at 4:30 pmHi, I need to do an animation with 1 pixel line, but whenever I move the line it seems to be blurry in-and-out / flickering. I guess it has something to do with how the line might fall into a sub-pixel position as it moves? Any ways to counter that? What is the best practice for dealing with lines this thin?
Walter Soyka replied 6 years, 3 months ago 4 Members · 6 Replies -
6 Replies
-
Richard Garabedain
February 3, 2020 at 5:28 pmif you make it bigger than 1 pixel…how will anyone know the difference?
-
Kevin Tang
February 3, 2020 at 5:48 pmHi, thanks for the response. It is integral to the design / look of the video that the line is as thin as possible. I’ve tried making it in 2px but it just looks heavy.
-
Eric Santiago
February 3, 2020 at 7:48 pmYou are basically fighting with Basics of Computer Graphics ☺
The general rule is 3 pixels due to the screen redraw.
It’s all trial and error.
You can use a 1-pixel line at a STATIC position then switch to a thicker line for movement. -
Walter Soyka
February 3, 2020 at 8:36 pmHopefully this is a horizontal or vertical line!
You can defeat subpixel positioning by either setting the 1-pixel layer to draft mode (and adjusting your render settings accordingly in the render queue), or by applying an expression like this one to your position property that forces it to only yield whole values:
[Math.round(value[0]), Math.round(value[1])]Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive | RenderBreak [blog] | Profile [LinkedIn] -
Kevin Tang
February 3, 2020 at 8:55 pmThank you all for the response! I really appreciate them.
Walter’s suggestion (math.round expression) worked well. Just out of curiosity, is there an advantage of using one over the other (mathround vs draft)? Are there any disadvantages to using math.round
Also, would there be any subpixel scaling issues, if I would like to scale a shape (let’s say a circle) with a constant stroke width of 1px?
-
Walter Soyka
February 3, 2020 at 9:16 pm[kevin tang] “Walter’s suggestion (math.round expression) worked well. Just out of curiosity, is there an advantage of using one over the other (mathround vs draft)? Are there any disadvantages to using math.round”
The expression will only work on a single property, and if you want to use other expressions too, you’ll have to figure out how to combine them.
If you use Draft mode, you have to modify your render settings — using the default “Best Settings” render settings template will override Draft mode on output.
[kevin tang] “Also, would there be any subpixel scaling issues, if I would like to scale a shape (let’s say a circle) with a constant stroke width of 1px?”
A circle with a 1px stroke will be tough — it will need antialiasing to look good.
For shape layers with specific linework, you want to manipulate the shape path/transforms themselves, prior to the stroke; if you manipulate the transform controls for the layer, the stroke will also be scaled.
Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive | RenderBreak [blog] | Profile [LinkedIn]
Reply to this Discussion! Login or Sign Up