Forseti Svarog
ESC
Join date: 2 Nov 2004
Posts: 1,730
|
10-12-2005 06:08
Having an odd problem with photoshop.
I create a new 256x256, 72dpi, RBG image I fill the foreground with black I bicubic image-size it to 512x512 then i bicubic image-size it to 256x256
Photoshop is essentially making a 1 pixel border semi-transparent (which comes out in a tga as a lighter edging)
It isn't easily noticeable just on an image itself, but when you take it into SL and try to tile/repeat it, the "border" becomes obvious
anyone know the root of the problem (hopefully i've explained it clearly)
|
Malachi Petunia
Gentle Miscreant
Join date: 21 Sep 2003
Posts: 3,414
|
10-12-2005 07:20
I've duplicated your result and have an explanation. You're seeing something akin to a rounding error. The upsample to 512 works fine, the downsample is a problem because of the way bicubic reduction works. Bicubic resampling takes the average of the 16 pixels surrounding the destination pixel; for an edge pixel, that means that half of the 16 pixels are null and so you wind up with a half black quasi-anti-aliased edge.
I'm not sure why you are doing this, but here are two workarounds. First, you could use a linear resample which works fine for a block of black, but I'm guessing you arent working on that. Alternately, you can bicubic resample down to 258x258 and trim off the top, bottom and side pixels using Image->Canvas size which will warn of clipping but will get rid of the fuzz.
Good luck.
|
Forseti Svarog
ESC
Join date: 2 Nov 2004
Posts: 1,730
|
10-12-2005 08:09
thanks malachi... well the example above was just to simply and clearly show the effect i'm getting.
what i'm actually doing is trying to take a seamless 512x512 texture (say, wood planks) and shrink it to 256x256 for better in-world performance
the problem with doing 258x258 and then clipping, is that it causes problems with the seamless nature of the texture.
|
Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
|
10-12-2005 08:52
Forseti - obviously you would start with 256x256 if you could, right? so, I'm guessing these are some thrid-party supplied textures. as such, they are hopefully just simple, single-layered images. so: it's a bit of work, but you should be able to set up a photoshop action to: - change the canvas size to 3 time wider and 3 times higher
- create an additional 8 copies of the layer, position them so that you hva e 3x3 seamless grid
- resize
- set the canvas size to 1/3 and 1/3
there are other variants to this, but basically you want to give the edge pixels neighbours (from the other side of the image) for them to seamlessly interpolate with.
|
Arito Cotton
Still Addicted
Join date: 25 Aug 2003
Posts: 131
|
10-12-2005 08:54
You can get a nice, clean edge for your resampled images if you do the following *before* you scale them (up or down): - Ctrl+A (select all), Image->Crop
- Layer->Flatten Image
Step 1 is not always necessary.With those, you're basically forcing Photoshop not to take offscreen pixels into account when it is performing any calculations.
|
Forseti Svarog
ESC
Join date: 2 Nov 2004
Posts: 1,730
|
10-12-2005 10:47
thank you all.
Ari -- you are right, if I flatten the image so photoshop calls it background rather than layer 0, then it resizes without the fringe. Excellent!
|