Jump to content
HairyDalek

Problems with pixel view and whole number coordinates

Recommended Posts

HI,

I’m using Affinity Designer, and using the pixel view option to make sure that there’s not too much pixel mis-alignment. I’m setting x and y coordinates to whole numbers to try to get rid of any vertical and horizontal antialisaing.

The problem I have here is that an object of a solid colour seems to gain some vague transparency/antialiasing even when x and y coordinates are whole numbers. This is an dartboard, and the artboard’s coordinates are also whole numbers (I know this can have an effect on this as well). Screen shots show this, with an element butted up against the artboard left hand edge.

The screen shots show the problem - look at the left hand column of blue/grey pixels. They should be the same colour as column to their right, but what seems to be happening is that something is making Designer antialias the edge, giving it a bit of a transparent look. In this case, there seems to be no way to solve this problem - dragging the edge out of the artboard bounds doesn’t fix this.

I am also seeing a similar effect in other places - the coordinates are whole numbers (they have been typed in). I’ve have to manually drag the elements a little to the left or right (or up and down) to resolve the problem. It feels like there is some minor number rounding that’s causing elements to cross the pixel boundaries a little to just cause this. The second pair of screenshots shows an element at x position of 9px . There is some antialiasing to the left. If I just nudge the element a shave to the left, that antialiasing goes away. If I then type 9 into the x position in the transform palette, the object returns to the previous location and the antialiasing/transparency is back.

Why is this a problem? Well, apart form not giving whole, solid, pixels, these objects are animated, and it seems that this small amount of transparency causes flickering as they move.

I was hoping that if I typed a whole number into the transform palette that they would be bang on the pixel border, and not require manual adjusting.

Screen Shot 2018-05-24 at 17.39.10.png

Screen Shot 2018-05-24 at 17.39.30.png

Screen Shot 2018-05-24 at 17.50.16.png

Screen Shot 2018-05-24 at 17.50.29.png

Share this post


Link to post
Share on other sites
1 hour ago, MEB said:

Hi HairyDalek,
Do you mind uploading a sample file with a couple objects displaying this issue using this link? You can delete all the rest if you want. Thanks.

Hi,

Done. I’ve uploaded a file called Truck 2.afdesign - if you zoom in on the right hand artboard, and switch on Pixel View, you should see the problem. It’s based on the file the screenshots were created with. Hopefully this problem can be repeated with this file at your end. Some elements are in groups, and if you manually move the elements just a little bit, the antialiasing vanishes, and the edges firm up to match pixel boundaries. The thing is, the movements needed are so slight that the numbers don’t change in the interface (zooming in is a big help here).

Share this post


Link to post
Share on other sites
14 minutes ago, owenr said:

You can set the displayed number precision to be from zero to six decimal places in the UI section of the app preferences. There's a control for each of the measurement units, such as pixels.

 

 

I found that, thanks. The numbers are still whole numbers. No decimals. However, if I nudge one element that is a x=9px and displays the problem to 8.955281 px, the antialiasing appears to go away.

Share this post


Link to post
Share on other sites

Oh, and I mean to add, an exported bitmap shows the problem too. It doesn’t seem to be a display issue, it appears to affect output.

Share this post


Link to post
Share on other sites

I have the same problem, even with nudge set to 1px, Move by whole pixel and force pixel alignement active.

I tried disabling the pixel snapping options and increase by 0.5 px, it seems to work but when you reselect the point it shows an integer again :35_thinking:

Capture d’écran 2018-07-19 à 13.01.30.png

Share this post


Link to post
Share on other sites

Both :D

Ideally when I activate the Force pixel alignement, I should only be able to move points on a 1px grid. This means that any misaligned point would be snapped to this grid and that you could easily cleanup a misaligned file like the one above to be pixel perfect.

But, if I disable the Force pixel alignement or type a coordinate containing a comma, it should show me the correct value in the transform panel.
Right now, after I typed X: 303.5 in the transform panel it shows me that the point X coordinate is 304 which is false.

If the point isn't exactly at 304.000000 it should be visible in the transform panel despite any alignement options I might have activated.

Share this post


Link to post
Share on other sites

Ok, I did and it was indeed set to zero.
I don't remember doing that but I do remember that on an earlier version I had trouble with pixel alignement that would snap on half pixels. I might have changed it then to try to fight this behaviour.

What I don't understand is why was I able to put a point to a non integer place while having the decimal place set to zero ? Shouldn't the system round the position to the nearest integer ?
I don't see the point in changing the decimal place in the preferences if it only round the displayed value and not the position itself. :35_thinking:

This brings me to a new feature option that would align the item to a grid (you could define the grid and rounding options before applying). This would make things a lot easier for web designer :x

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×