Sg2.9
Vector Pixels
Recent RSS
Creator:  Graham van de Ruit
Date:  18. February 2013, 13:41

This script uses the selected paths to create a vector version of the selected raster images. It is similar to the Object Raster script from the examples, but there are some important differences:

  • The paths are NOT scaled to obtain different grayscale values. Instead the path with the closest matching gray value is used for each area of the raster image. It is VERY IMPORTANT, therefore, to use multiple paths with different areas. The more paths you use and the greater their variation in tone, the more accurately the raster image will be recreated.
  • To scale the paths in the final image (ie change the resolution) just scale the sample paths. They will be used as is, with no change in size or style.
  • The script uses any paths you select, so you can use simple shapes such as circles (remembering to select mutiple circles at different sizes), custom shapes such as hearts, or even letters or more complex shapes. To use letters, create a text box, type each character or glyph you want to be included, then expand the text box to convert the letters to outlines. Use this group as your sample paths.

Note that the paths are all centered on their grid squares when used in the image, so letters will NOT maintain their baselines. If anyone is able to adapt it to allow for a standard baseline I think it might be a valuable addition.

You can get particularly rich images by using negative values for the grid gutters and applying transparency and blend modes to your sample paths. Inverting the tones is useful if you want your shapes to be filled with a light colour and set on a dark background

In most of the sample images I have included my sample paths to the bottom left of the final image.

Feel free to post queries or report bugs. I’d love to hear if you find it useful.

Re: Vector Pixels
From:  Clayton Perryman
Date:  18. February 2013, 20:12

I made a brief little tutorial image that can be seen below. Hope this helps anyone who may be confused!

Thanks a ton Graham! This script is top notch!

Vector Pixels - Brief Tutorial

Re: Vector Pixels
Date:  18. February 2013, 21:12

Wonderful! Thank you Clayton.

I’ve already had one friend tell me he couldn’t understand, so hopefully your image will help people like him. I knew I should do a step-by-step for those who are not so familiar with the process, and I’m glad you’ve saved me the effort.

NOTE Beware of trying to use very large images with tiny paths. The script can use a lot of memory and take a long time if there are lots of shapes.

Re: Vector Pixels
From:  Zeno
Date:  20. February 2013, 00:28

Is not working for me. I did the paths. Expanded/outlined them and placed a bitmap on the canvas. I selected the bitmap and the paths and press "create". A message pops up "please select pats and raster image".
I have tried a few times even changing the bitmap and shapes. Can you help please.

Thank you

Re: Vector Pixels
Date:  20. February 2013, 07:47

I forgot to mention that the bitmap image needs to be embedded. So, once you’ve placed it just click Embed in the menu bar and then try. I can’t think what else could be causing the problem, but let me know if it still doesn’t work.

Re: Vector Pixels
From:  bart bral
Date:  16. April 2013, 18:24

Hi there.

Nice script but it doesn't work as i expected...

When i use it as in you example it works the way it should...
but when i made my own simple shapes and i tried it just filled the whole rasterimage with the smallest shape i had made...

What am i doing wrong?

======

I've made a screenshot to explain a bit more/better

The shape with the arrow is the only shape that gets drawn...

  • ---------

Cheers !!!

Bart

Re: Vector Pixels
From:  Clayton Perryman
Date:  16. April 2013, 19:55

@ Bart

I was able to replicate your problem, which is indeed unexpected.

After a bit of tinkering around in AI I found that it works if you make each shape a "Compound Path"

To do this:
Select the single shape > 'Object' menu > Compound Path > Make

Here is an example using the shapes you provided: http://i.imgur.com/CXAtoQC.jpg

I tested this on a few other shapes with positive results. Do let us know if this works for you!

Re: Vector Pixels
From:  Bart Bral
Date:  22. April 2013, 09:19

Cheers for checking this out...

I'd been trying with compound paths, before the question above... But I'll check it out again... Later on this day...

Cheers Again

Bart

Re: Vector Pixels
From:  Bart Bral
Date:  22. April 2013, 17:50

And Yes!

It works fine now...

It took a bit of time...

  • I used Pathfinder first...
  • Then used Simplify path (to lose the unused points)
  • Then used Make Compound Path (cmd-8)

Cheers again !

Re: Vector Pixels
Date:  22. April 2013, 19:50

Excellent, thank you Clayton for helping Bart. Glad you got it working!

Re: Vector Pixels
From:  Jim
Date:  24. July 2013, 15:52

Hi Graham,
Looks like a great plugin but I'm getting an error on line 109:

"TypeError: Cannot call method "convert" of null
at scripts/rasters/Vector Pixels.js:109"

I'm only using 10 different circles (ranging from 1mm–10mm all expanded to compund shapes) and a 300px square raster image (embedded).

So I'm not quite sure what's happening? Any idea?

J

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19