I am currently working on an image (wallpaper for personal use) based on lowpoly graphics. When creating the lowpoly part, I have created several triangular shapes, covering the part I wish to 'transform'. Since the image is not that big, I only made around 350 shapes, yet this is still a lot of selecting, averaging, and deselecting.

Example of the "select -> average"-action

Recently I became aware of scripts in PS, and figured maybe using this function could be the solution - as in "Do it once, apply script, job done!".

Is this possible, or do I just have to work through it? I will probably be doing more of this sort of work, is there an "easy"/smart solution?

  • What do you want the script to do? Do you want it to create rest of the triangles? ..or the next step after that... which is...?
    – Joonas
    Jan 26, 2016 at 0:58
  • Scripting in itself is often easy but your usecase might not be the best first script.
    – joojaa
    Jan 26, 2016 at 7:44
  • What I imagined the script should do is repeating the actions done for each triangle - Select (running ants) - Select layer (image layer) - Average selection - Deselect - Repeat. Jan 26, 2016 at 10:40

2 Answers 2


Scripting is definitely the solution for reducing repetitive work. However, if you have not done any scripting before (in any context) and/or you have not scripted Photoshop before, then no, it won’t be “easy.”

To get started scripting Photoshop, you will want the Scripting Guide that goes with your version of Photoshop. For example, here is the one for Photoshop CC:

Photoshop CC Scripting Guide

Then you have to choose the language you are going to write scripts in. Basically, you can script Photoshop with Web scripting (JavaScript) or Mac scripting (AppleScript) or Windows scripting (VBScript.) If you are not sure, then you probably want to use JavaScript.

One way to get started with scripting is to use the “do action” command a lot. Then you can create Actions in Photoshop, and write scripts that for example, open a document, run 3 Actions on it, export a copy, and close the original document without saving. That way, fairly simple scripts can do very sophisticated things because they are running sophisticated Actions.

Sample javascript ( .jsx ):

The script loops through all immediate child layers of the group: My Group and runs action: My Action from the action folder: My Action Folder.

var doc = app.activeDocument,
    layers = doc.layerSets.getByName( "My Group" ).artLayers;

for ( var i=0; i < layers.length; i++ ) {

    doc.activeLayer = layers[ i ];

    app.doAction("My Action", "My Action Folder");

  • Even though they say that the windows scripting api is for visual basic its not really a VBSvript API. It is a COM API, which essentially means you can use, any com aware language. So any dot net language works fine as does, Python, Perl, c... Nearly any language. Maybe with exception for java which is possible but needs extra libraries that cost money if you want to be productive.
    – joojaa
    Jan 26, 2016 at 7:40
  • Thank you for the respons(es)! I guess I will have to do some reading on scripts, and just get started with it. I have a very limited knowledge of Java, yet I am not sure this will help me in any way. Time to study! /Simon Jan 26, 2016 at 10:37

A 2 year old question, the system wants something. Here is:

Scripting can be useful, but it can be used to decide also the polygons. What's best, Adobe has thought it and included something to try.

An example:

enter image description here

The image is a well known image example from Windows. It's right half is filtered with Filter > Pixelate > Crystallize. It seems to divide the image to 3...5 sided polygons which are averaged. Polygon size is selectable, but the algorithm is fixed.

Your own attempt seems to have strokes. That effect can be simulated, too. One possiblity is to use one of Photoshop's egde emphasizing filters:

enter image description here

The crystallized image layer is duplicated and filter Glowing Edges is applied. The filtering result is mainly black, so blending mode Add is used. The opacity is reduced to keep the effect subtle.

Low poly art needs some interactivity in the triangulation process. No automate can do the decisions as a human. Crystallized image surely hasn't the same impact as a manually done. The difference is huge when the image has recognizable parts such as faces and everyday things.

There's plenty of software available for more intelligent automatic processing and also to help the manual process. (you also wanted one, namely one click averaging of the created triangles). Do some web searches for Triangulation and Low Poly software. There are plenty of plugins available - free and paid and even some online apps.

See this link: https://www.vectorgraphit.com/applications-to-create-geometric-low-poly-art/amp. GIMP has some tools for it, too and it's free.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.