How to Fix Texture Seams When Several Layers Are Involved
With a script to apply offset to several layers at once with ease.
Updated: 02.06.2016 - Tested with Photoshop CS3, the script works.
Updated: 08.03.2012 - Tested with Photoshop CS5.1 trial version, and it seems to work.
Updated: 25.05.2005 - New Version (1.1) Now with Photoshop 7 support.
created on 03.05.2005
Hi all. This time I'm going to provide you with a nice little script that will bring happiness to your household. I hope this may prove useful to at least some of you. I know you're somewhere out there.
It is quite bit of a nuisance that the wonderful guys at Adobe do not let us swing around our canvas ever so freely. I think it would not be that hard for them to code a continuous canvas on edges so strokes at one edge affect the opposite side, and you could be panning around an infinite tile of your canvas (of course all of them being optional). Some texture maker programs has this superb functionality, with one little disadvantage: They are not Photoshop.
We can use Offset filter in Photoshop to offset out layers and fix the seams. But this is tedious when several layers are involved. It can't be properly saved as a Photoshop Action either, as there are variables that change with each document. With this script, you'll find it much easier to make your textures seamless.
Now this is where scripting comes in. PS7, CS and CS2 comes with scripting functionality. CS2 seems to have improved on it. It is still somewhat lacking important features for my own good tho. The reference they provide is really good, the possibilities are endless. I thought I could improve my scripting skills while providing a nice new function to Photoshop users, so I came up with the Offset All Visible Layers Script.
Extract the contents somewhere on your harddisk
For Photoshop CS2 and onward (Tested with CS2, CS3 and CS5.1), you can just double click the file and it will work from anywhere if Photoshop is open.
You can run the respective versions of the scripts for PS7, CS or CS2 from. There are three versions, one for PS7, one for CS and the last for CS2. Please do not use CS2 version with Photoshop CS, as this would crash the script (But not anything else hopefully).
You can also copy the appropriate version for your Photoshop to your
These scripts should work also on Macintosh computers.
I am so tired I won't write anymore! Here is what it does (The user interface seen here is for CS and CS2 versions, for PS7, see the notes at the bottom of the page):
What it does
This comes in real handy when you are doing seamless texture work and you can fix your multi layered texture's seams without going out of Photoshop. This could be done by hand per layer but it is tedious and this script computes half of the canvas by default so you needn't worry about calculating.
Another good use for this is fixing the seam for a cylindirical UV map. Here's a rough example:
- With its defaults settings, when run twice, the layers are restored to their normal positions, so do not freak out if your layers look haywire when you run the script the first time. Just run the script with the same layers visible, and everything snaps back to normal.
- Make a snapshot of your document or save it just in case, and run the script twice to see if your document is correctly offset. If everything is normal, then your document is ok to use with the script.
- The script only works for visible layers. This is not a bug, but a feature.
- The script does not move text layers (PS7/CS/CS2) and smartobjects (CS2) as they need to be rasterized before offsetting.
- The script will attempt to rasterize any vector mask layers that are visible. If you do not want the script to work halfway through because you cancel a rasterize operation, simply hide those layers..
- If there are visible layers that has pixels outside the canvas, the script will ask whether to crop-fix the issue or cancel the operation. Such layers cannot be properly offset along with the other layers. (CS and CS2 only)
- ALWAYS BACKUP YOUR WORK. I can't be held responsible for the malfunction of the script.
- There are clear instructions for you to tweak the scripts in the script file. You do not have to know scripting to customize the script to your needs.
Differences in PS7 version:
- Because of the limitations of PS7 scripting, the user cannot give specific pixel input to the script. The script does offset by half of document size by default if the user confirms two offset dialouge boxes.
- Because there is no way to determine layer size and position, the script cannot check for layers out of the canvas, so it does a crop by default. (But you can tweak the script so it doesn't.)
- Only for PS7, for the script to work, you may have to install the Photoshop 7.0 Scripting Plugin for Mac, and Photoshop 7.0 Scripting Plugin for Windows.
Feel free to email me comments and critiques and even some fresh ideas :) Bug reports and feature suggestions are welcome.
Prepared by Emrah BASKAYA ( a.k.a. Hesido, a.k.a EmDo )