Jump to content

Recommended Posts

Okay, I thought this would be easy to figure out, even without the ability to use the AP Help (which doesn't work), but alas, I can't figure out how to draw a simple, solid, 100% opaque 1-pixel line in Affinity Photo.

I tried the Pen tool, but it only allows me to set the width in points, which results in a semi-transparent line with anti-aliased edges. If I set the line to "1 pt" I get a relatively clean, 1-pixel line but it's semi-transparent. 

1533448199_ScreenShot2018-10-08at2_46_52PM.png.2935efe11a9358236122d61639074f8c.png

Not what I want! 

Can I set the line tool to pixels instead of points? I tried typing in "1 px" where it says "1 pt" but it just randomly changed it to "0.8 pt" when I hit Enter. Speaking of which, that interface is a bit messy. When I click inside a field there I see double of what was in that field, plus it's really hard to read due to the white text on light gray background.

1404192618_ScreenShot2018-10-08at2_45_47PM.png.0c36e911f6f5a4c300207be24369aa37.png

In Photoshop this is very easy, and I can set whether the line is drawn as a vector object, or as pixels, and I can set the line width in pixels or points. 

Am I not able to do something similar in Affinity Photo? How do I draw a simple, crisp, 100% opaque, 1-pixel straight line in Affinity Photo? 

Share this post


Link to post
Share on other sites

Use the pixel tool. Press "b".  Welcome back to CG, c. 1980.


iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb,  AMD Radeon R9 M290 2048 Mb

iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil

Huion WH1409 tablet

Share this post


Link to post
Share on other sites
1 minute ago, gdenby said:

Use the pixel tool. Press "b".  Welcome back to CG, c. 1980.

I want to draw a straight line, a bit hard to do with a single-pixel brush tool. And if the line is slanted, I'd like it to be anti-aliased (but not if it's a straight horizontal or vertical line). That's why a line drawing tool would work better, but I can't get what I want from the AP line tool. 

Share this post


Link to post
Share on other sites

You can change the line units in Preferences > User Interface > untick "show lines in points":

To draw a pure 1 px line it has to have .5 grid placement value.

cheers :)

Share this post


Link to post
Share on other sites
7 minutes ago, JimmyJack said:

You can change the line units in Preferences > User Interface > untick "show lines in points":

To draw a pure 1 px line it has to have .5 grid placement value.

Thanks, I did look for a way to change the measurement type for lines, but couldn't find it before. 

I'm not sure what you mean by the .5 grid placement value, though. 

When I uncheck the "show lines in points" option, and then draw a straight 1-pixel line, it is still semi-transparent. 

356769601_ScreenShot2018-10-08at3_25_32PM.png.81ed1ecacf28df935ddac789be495e82.png

The layer it is being drawn on has Opacity set to 100%, and the line stroke is also 100% opacity. But I keep getting a semi-transparent line for some reason. 

I also have "Force Pixel Alignment" and "Move by Whole Pixels" and "Snapping" set on. 

Share this post


Link to post
Share on other sites

If you hold down shift, the pixel line will be constrained to vertical and horizontal while drawing.


iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb,  AMD Radeon R9 M290 2048 Mb

iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil

Huion WH1409 tablet

Share this post


Link to post
Share on other sites
2 hours ago, TomHu said:

I'm not sure what you mean by the .5 grid placement value, though. 

I also have "Force Pixel Alignment" and "Move by Whole Pixels" and "Snapping" set on. 

I'm talking about how/where the line is placed on the document.
See the attached. See how the pure black line is placed at 162.5. And the other semi transparent "double" (it's not, it's 1px) line, like you're getting, is centered on the whole number 165.

You can have Force pixel alignment on, you'll just have to type the final placement into the transform panel like I did.
Otherwise if you start off with pixel alignment and you're moving by whole pixels you'll never get to the .5 grid placement.
Once the line is at a .5 position, then move by whole pixels is your friend. Fun huh!? O.o:D

598699312_ScreenShot2018-10-08at6_35_53PM.png.c1ecb25ed38104a223b3449713278b24.png

Share this post


Link to post
Share on other sites

OMG, really? I have to transform every line by half a pixel just to get a single-pixel, 100% opaque line? 

:46_confounded:

I think I'm just going to finish this project in Photoshop, I'm really frustrated with Affinity Photo right now.

Thanks for your help.  

Share this post


Link to post
Share on other sites
8 hours ago, TomHu said:

to finish this project in Photoshop

But you will have to do the same in it. A 1px line must be placed exactly at 0.5 px.


Affinity Photo 1.6.4.104, Affinity Designer 1.6.4.104.
Windows 10 Pro, Version 1803, Build 17134.112.
Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080.

Share this post


Link to post
Share on other sites
9 hours ago, Pšenda said:

But you will have to do the same in it. A 1px line must be placed exactly at 0.5 px.

Not sure what you're talking about, I don't have to do any such thing in Photoshop. When I draw a single-pixel line in Photoshop, it isn't two pixels wide and semi-transparent as happens in Affinity Photo, requiring it be moved by half a pixel. 

Share this post


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

When I draw a single-pixel line in Photoshop, it isn't two pixels wide and semi-transparent

Then the line must be placed in a 0.5px position (I assume, that even in PS you are working with vector lines like the AP).
Alternatively provide a preview of how PS does, something like JimmyJack showed.


Affinity Photo 1.6.4.104, Affinity Designer 1.6.4.104.
Windows 10 Pro, Version 1803, Build 17134.112.
Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080.

Share this post


Link to post
Share on other sites
4 hours ago, Pšenda said:

Then the line must be placed in a 0.5px position (I assume, that even in PS you are working with vector lines like the AP).
Alternatively provide a preview of how PS does, something like JimmyJack showed.

All I do is select the line Shape tool, set it to pixels, make sure it's set to 1 px, then draw. I hold down the Shift key while drawing to keep the line perfectly horizontal or vertical. 

That's all I have to do in Photoshop. There's no screwing around with 1/2 pixels or anything like that. 

Here's a screen cap of me drawing two lines to show you how straightforward it is in Photoshop:

 

Share this post


Link to post
Share on other sites

Yes, this is one of those cases where anti-aliasing wreaks havoc with the result, and Affinity Photo does not have an option to automatically render all objects to the pixel grid automatically. Yes, there's Force Pixel Alignment, but a 1 pixel line will have to be placed exactly at 0.5 - which is a bit ridiculous to ask of the user.

Other design apps solve this with a simple document wide or even layer-specific pixel snapping that changes the rendered result on the fly. Not so in Photo, unfortunately. One of the many reasons why I think Affinity Photo is rather unsuitable for precise pixel work and pixel art. Another reason being the lack of a simple document-wide option to turn off anti-aliasing. And the Coverage Map work-around is a half-baked one.

[ On a side note, I found that it is often the simple basic things which require all sorts of convoluted hacks and work-arounds in Photo. That is why I mainly use it for HDR merging, stacking, and sometimes panoramas, and then export the result to continue work in other image editors. Of course, this is my personal experience, and a bit of a shame. Basic workflow foundations in Photo are quite shaky. ]

Share this post


Link to post
Share on other sites
7 hours ago, TomHu said:

select the line Shape tool, set it to pixels

But then it is not working with a vector like the AP. It is a specific tool that works directly with pixels. In AP, that works only with vector, it has to be substitute by setting the grid to 0.5 px, and then it works just as in the PS.

On 10/9/2018 at 12:57 AM, TomHu said:

I have to transform every line by half a pixel just to get a single-pixel,

If you have all the lines aligned to 1 px, you can all shift them by 0.5 px at a time.


Affinity Photo 1.6.4.104, Affinity Designer 1.6.4.104.
Windows 10 Pro, Version 1803, Build 17134.112.
Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080.

Share this post


Link to post
Share on other sites

As I understand it (which I admit could be totally wrong), the real problem is Affinity does not have a tool equivalent to the Photoshop Line tool. From what I have read, the PS tool is based on the rectangle tool, so pixel alignment works as it does because all the the edges of these rectangle-like shapes are pixel aligned, at least when they are perfectly horizontal or vertical so no aliasing occurs.

In this respect, they behave much like thin, un-stroked rectangle vector shapes in Affinity Designer. Obviously, this is much different than how the Affinity Pen tool works in line mode, so (I think) what is needed in Affinity to fix this is a separate line tool that works like the PS one.


Affinity Photo 1.6.7 & Affinity Designer 1.6.1; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.6.9.81 & Affinity Designer 1.6..2.24 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.0

Share this post


Link to post
Share on other sites
On 10/9/2018 at 4:46 PM, Medical Officer Bones said:

Other design apps solve this with a simple document wide or even layer-specific pixel snapping that changes the rendered result on the fly. Not so in Photo, unfortunately. One of the many reasons why I think Affinity Photo is rather unsuitable for precise pixel work and pixel art.

Yes, I'm discovering that using AP for web designs or online graphics where pixel precision is necessary is a very frustrating task. It's great for photo editing, but not for layouts. So unfortunately I've decided to stick with Photoshop for now until the AP team can address this limitation. I use Photoshop 80% of the time for web design or online graphics, and 20% for photo editing. So pixel precision is extremely important to me.  

Share this post


Link to post
Share on other sites
On 10/9/2018 at 11:54 PM, Pšenda said:

But then it is not working with a vector like the AP. It is a specific tool that works directly with pixels. In AP, that works only with vector, it has to be substitute by setting the grid to 0.5 px, and then it works just as in the PS.

If you have all the lines aligned to 1 px, you can all shift them by 0.5 px at a time.

I can also draw a vector line in Photoshop and get the exact same results... 

 

See how easy that was? Photoshop has the "Align Edges" option that assures vectors with straight edges are perfectly aligned to the pixel. I thought AP's "Force pixel alignment" and "Move by whole pixels" settings would work the same way, but apparently they don't. In fact, I have no idea what these settings actually do in Affinity Photo. I think they only work with pixel tools like brushes, not vectors or shapes. 

325167139_ScreenShot2018-10-11at1_12_30PM.png.fa8b83bbea9c70ed4796d5e2e76b69a6.png

Also note that I am still using Photoshop CS6, which is now 18 years old. The ability to snap the edges of vector shapes to pixel borders isn't a new concept by any means.

Share this post


Link to post
Share on other sites
9 hours ago, TomHu said:

Photoshop CS6, which is now 18 years old

Photoshop CS6 was released in May 2012, somewhat less that 18 years ago..

Share this post


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

Photoshop CS6 was released in May 2012, somewhat less that 18 years ago..

6 years, 5 months, 5 days to be approximately exact :D


iMac 27" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Dell Inspiron 17 5767 i7 Laptop Windows 10 - Affinity Designer/Photo, Publisher Beta 1.7.0.140, Illustrator CC, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Deco 03 Pen Tablet, XP-Pen Artist12, 5 pages on LaunchPad - iPad2 iOS 9.35 B|  Instagram & Flickr - Affinity Designer (ADe) Tutorials - Affinity Photo (APh) Tutorials - Public Domain Images

Share this post


Link to post
Share on other sites
23 minutes ago, firstdefence said:

6 years, 5 months, 5 days to be approximately exact :D

No. It's approximately 11 years, 6 months and 26 days 'less' than 18 years. :D

Relatively speaking.


Windows PCs. Photo and Designer, latest non-beta versions.

Share this post


Link to post
Share on other sites
4 hours ago, Medical Officer Bones said:

It is an awkward and convoluted process in Photo to work pixel-precise this way.

Is it easier in Designer? If so, perhaps the answer is that the OP is using the wrong Affinity application.


-- Walt

Windows 10 Home, April 2018 Update (1803), 16.0GB memory, Intel Core i7-6700K @ 4.00Gz
Affinity Photo 1.6.5.123 and 1.6.5.123 Beta
Affinity Designer 1.6..5.123 and 1.6.5.123 Beta
Affinity Publisher 1.7.0.145 Beta

Share this post


Link to post
Share on other sites
52 minutes ago, walt.farrell said:

Is it easier in Designer? If so, perhaps the answer is that the OP is using the wrong Affinity application.

I'm not seeing much of any difference when using the pixel brush. In Designer, 1 px high rectangle will appear in pixel view w. antialiasing if it is not aligned to a whole pixel.


iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb,  AMD Radeon R9 M290 2048 Mb

iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil

Huion WH1409 tablet

Share this post


Link to post
Share on other sites

:34_rolling_eyes: Yes, I got the length of time that CS6 has been out wrong, sue me. I've been using Photoshop for 25 years, since version 2.0 (yes, go ahead and look it up).

The point is that Photoshop has had the ability to draw pixel-perfect shapes on a pixel grid for many years, this isn't something new or radical. 

Telling me I have to draw my lines then shift them all 1/2 a pixel to get clean, sharp lines in AP is absurd.

If I'm designing bitmap graphics using a bitmap program, when I draw a single-pixel line I expect to get a single-pixel line, not a two-pixel, partially transparent line. Is that really asking too much from a program designed to create bitmap graphics? 

Share this post


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

too much from a program designed to create bitmap graphics? 

Personally, I don't think it is a program designed to create bitmap graphics.

To me it is an image editing program, not a painting program. In fact it is advertised as "Professional image editing software" not "Professional painting software". A lot of Photoshop stuff has been added year by year so they could charge you for an annual upgrade fee, which Serif don't do. 

 

 


Windows PCs. Photo and Designer, latest non-beta versions.

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

×