[Question] Editing Scope (White Outline) [SOLVED]
#1
I'm trying to create a new scope using Adobe Photoshop 7. I start a new file 512x512 pixels 72 DPI, I create a black box and hollow it out. Then I save it as a transparent PNG-24, the problem is that there is a white outline that occurs, changing the size of the the black area does not effect it. I know that there is a limit of the scope size to prevent cheating, but I am staying within the boundary.

Anyone have any idea why this occurs? Occasionally some parts are not white, but others are. I'm using complete black (#000000), modifying the original scope.png has a similar effect. Sometimes the white outline does not occur, or only some parts have it.

Doesn't make any sense, does this have to do with photoshop 7 or a bug in the cube engine? I also see this outline occasionally when editing hud icons or other items in /misc/packages, but changing size or re-saving makes it go disappear. Any ideas?

Here is an example:
[Image: iuIxI.jpg]
Thanks given by:
#2
Looks like alpha channel fringe; make sure your scope's alpha channel matches the RGB channels. Compare original scope image alpha and RGB for reference. I'd use a half-pixel gaussian blur over the edge to get rid of the fringe.
Thanks given by:
#3
Protip: the magic wand tool is essential for moments like these.
Thanks given by:
#4
I found the problem and the solution! Has nothing to do with alpha channels or the selection tool, since the images are clear in any paint program or when viewed in a web browser.

Photoshop (at least version 7) saves very unoptimized PNGs, this creates a large file size. The cube engine appears to have some type of a limit and compensates by limiting transparency. This is why small PNG files like items or icons don't suffer from this problem when saved from within photoshop, only if you add a lot of detail/transparency/gradients.

The solution is to save the file as a transparent TIFF, load it up in GIMP and re-save it. (Loading photoshop PNGs or PSDs in GIMP doesn't seem to work) GIMP appears to be using a much better algorithm to compress PNG files and therefore this limits the problem, since the filesize is smaller. However if you create a large image with a bunch of gradients and transparency in GIMP this problem also occurs.

Here is a clean and perfectly centered scope I created, I found that the original scope is not exactly correct because it's off by some pixels and is not a perfect circle but more like an oval.
[Image: PpkIC.jpg]

And here is the scope.png file I made, place it in assaultcube dir/packages/misc
[Image: Z08xl.png]
Thanks given by:
#5
looks/sounds good, gj
Thanks given by:
#6
W00T now I can make pretty scope!
But HF GL GF BBQ
Thanks given by:
#7
I wrote this earlier today, before I had access to the internet (at work).
Quote:Is that an artifact of png compression?
What compression level are you using?
And good job discovering that GIMP is better than Photoshop. ^_^
Thanks given by:
#8
YES. GIMP>PHOTOFLOP

:) I've had this problem too but the solution for me was a different one.
Thanks given by:
#9
The large file size of Photoshop PNGs is because it saves all vector and other editing data as well; instead of using normal save, you should be using the export option to make an "image only" release PNG.
Thanks given by: