What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[Help] Automated Clean 1 Pixel Lines?


AlcopopStar

New Member
Messages
3
Likes
0
Hello Forum!

I'm a pixel artist, and I enjoy sketching with the pencil tool in Photoshop, the issue being I spend a lot of my time cleaning lines, in particular I spend a lot of time getting rid of the blocky bits of the linework that tends to crop of with fluid use of the pencil tool.

I did a quick messy sketch and manual cleanup to show what I mean.
tumblr_nsagych2Zm1u3fa1zo3_500.gif
tumblr_nsagych2Zm1u3fa1zo2_250.pngtumblr_nsagych2Zm1u3fa1zo1_250.png

You can imagine, especially when I go a little larger (which is uncommon for pixel art but something i'm interested in) how long it takes to clean these works.

I'm pretty proficient with Photoshop but I can't figure out a way to treat the lines, I've tried messing with brush presets and actions, but nothing has worked.

Does anyone know a way that would speed up the cleaning process. Is there any way to automate this? Am I kidding myself?

It doesn't need to be perfect, any tips or tricks would help.

Thanks in advance!
 

Tom Mann

Guru
Messages
7,223
Likes
4,343
My first thought was about applying dilation / erosion morphological operators on your pixel grid, but rapidly convinced myself that these wouldn't work, at least in a simple form.

At this point, the only way I can think of automatically cleaning up such pixels is by writing a little program that has specific rules to detect what we perceive of as stray pixels, and then delete them. For example the rules could look something like this:
IF ( the current pixel has two common edges with neighboring pixels, and those neighbors are neither perfectly horizontal nor vertical ) AND IF (blah, blah), THEN delete that pixel. Repeat for all pixels in the image.

My preference would be to use an image processing language like Matlab's Image Processing toolbox or ImageJ to write a stand-alone program that would process your file, but this is only because of my familiarity with these. Someone who knows how to write PS plugins could undoubtedly provide the same functionality.

------

Here's another thought ... This would probably require a completely different workflow on your part, but looks like it should work. My idea is to draw guide lines using the pen tool and then stroke the resulting paths with a 1 pixel, square crayon brush. This should produce wide pixel "blobs" only when the underlying paths require it. For example, here's a 20x20 pixel grid in which I drew a random path with both straight line segments and curves.

20x20pixel_grid_with_path.jpg

Next, I stroked the path as described above.

stroked_path-1px_square_crayon_brush.jpg

And, here are the pixels on a white background with the path visibility turned off.

without_the_pixel_grid_and_path_guide_line.jpg

I guess if you are reasonably comfortable / fast with the pen tool, this might be appealing, otherwise not.

Just my $0.02,

Tom M
 

AlcopopStar

New Member
Messages
3
Likes
0
Hey Tom,

Thanks for your two cents!

I'de given the pen tool a try previously and unfortunately it doesn't really fit with the sketching style I've developed.

On the point of photoshop plugins, do you know how i would go about commissioning something like that and what it might cost? I think it would save me time and money in the long run so i'm quite invested in figuring this out.
 

Tom Mann

Guru
Messages
7,223
Likes
4,343
re: Not wanting to change the sketching style you have developed -- I understand completely. That is an important and fundamental part of your talent, and most artists wouldn't want to change that just to achieve a fairly small benefit (in the grand scheme of things) like reducing the number of stray pixels.

re: Commissioning the development of specialty software to clean up stray pixels - There are many different approaches you could take. If it were me, and I could wait several months to get the software, the first thing I would do is approach the professors who teach the senior design course in Computer Science at your local universities, explain that you have a possible senior design project for one of his /her students, and then describe what you want. If the project appeals to one of the profs, you become "the customer" for a student, and you could get the work done for free because it effectively becomes a requirement for their degree.

The downside of this is that the kid will probably need to talk to you a lot to figure out exactly what you want, and it is properly tested to your specs. You will also likely have to attend a few formal presentations by the student over the semester or year, depending on how long the course runs. Unfortunately, even with a good undergrad student, the program he develops is likely to be rough around the edges (eg, dirt-simple user interface, occasionally crashes, etc.), but you can't beat the price.

At the extreme opposite end of the spectrum, you could approach some of the companies who regularly develop photoshop plugins (...I'm thinking of Eric Yang of Topaz), and ask if he currently has a currently underemployed programmer on staff that needs temporary "coverage". If he does, you will likely receive a beautiful, fully functioning product of professional quality. If he doesn't, maybe he can recommend someone not on his staff. Quite a few developers of plugins are single individuals or very small teams, and these might be more interested in taking on such a project

The downside, of course, to hiring professional developers is the cost. If I had to pull a number out of thin air, let's say that it takes the programmer 2 weeks to develop the program / plugin for you, and he is paid $70k per year. At a corporate loading rate of 2.5, this means that his cost to you for those two weeks will likely be somewhere around $6500. If it takes longer, the cost goes up.

An intermediate approach is to put your project up as a challenge on some programming discussion group, and say that you are willing to pay a couple of hundred $$$, but you will only pay this after testing that the product delivered actually works. They can then deliver cripple-ware to you (eg, doesn't save the result or something similar) to ensure that you pay up.

Anyway, those are a few possibilities that immediately came to mind.

HTH,

Tom M
 

Top