FORUMS: list search recent posts

1 pixel line in after effects

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
kevin tang
1 pixel line in after effects
on Feb 3, 2020 at 4:30:55 pm

Hi, 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?


Return to posts index

Richard Garabedain
Re: 1 pixel line in after effects
on Feb 3, 2020 at 5:28:25 pm

if you make it bigger than 1 pixel...how will anyone know the difference?


Return to posts index

kevin tang
Re: 1 pixel line in after effects
on Feb 3, 2020 at 5:48:31 pm

Hi, 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.


Return to posts index


Eric Santiago
Re: 1 pixel line in after effects
on Feb 3, 2020 at 7:48:06 pm

You 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.


Return to posts index

Walter Soyka
Re: 1 pixel line in after effects
on Feb 3, 2020 at 8:36:04 pm

Hopefully 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 [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

kevin tang
Re: 1 pixel line in after effects
on Feb 3, 2020 at 8:55:14 pm

Thank 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?


Return to posts index


Walter Soyka
Re: 1 pixel line in after effects
on Feb 3, 2020 at 9:16:47 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 [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]