Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am looking for a way to apply (Photoshop, Gimp etc.) filters to seamless textures without the usual border artifacts. The kernel of the Photoshop Gauss filter for example does not wrap around the image (which in non-seamless cases is surely also not wanted) but shows severe artifacts at the borders. Is there any way around this?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

Just fake the wrapping (I assume we're talking about working in Photoshop/Gimp and not doing it at runtime in a game):

  • Depending on your editor there might be an easier way to do this.
  • Double the size of the canvas while keeping the original image in the center (i.e. don't scale it).
  • Copy/tile the actual texture to fill the (still blank) space outside the original image.
  • Apply the filter.
  • Downsize the canvas again to the original size, keeping the image aligned to the center.
share|improve this answer
    
Great idea! Why didn't I think of that ;-) –  pad_ares Jan 26 '13 at 2:22
add comment

Here's what I do: Duplicate your image into two layers, then on one of the layers use Filter>Other>Offset half the width and height. Apply your Gauss filter to each layer, offset the layer by half again, and use the eraser on the top layer to blend them together.

Edit: Make sure you use the Wrap Around option in the Offset filter.

seamless blending

On the top left is my original image. Top right is the top layer after applying an offset and then using Gaussian Blur. Bottom left shows the re-offset top layer with the erased area highlighted in red. On the bottom right is the final image.

share|improve this answer
1  
There'll still be some areas where you'll artifacts, i.e. where the borders of both layers (after correcting the offset) meet. –  Mario Jan 26 '13 at 1:23
1  
Not really - I'll revise my phrasing and maybe make a few images to show what I mean. –  jzx Jan 26 '13 at 1:26
1  
One layer will have artifacts around the outer borders, like [], while the other layer will have artifacts in the center, like + (due to moving the contents). Yet they'll still overlap at four points (so you can't just blend them there). I assume by "blend manually" you mean things such as deleting the areas with artifacts from the upper layer. –  Mario Jan 26 '13 at 1:29
    
That approach surely reduces artifacts a bit but you will still have some. –  pad_ares Jan 26 '13 at 2:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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