Nick Perrin Posted March 27, 2007 Hello hello. It's been a while. And yes, I am working on MoUAC. So, down to the issue. As we all know, "Nearest Neighbour"/MSPaint-style image resizing sucks A LOT, but a lot of the time is done to better accomodate the simplistic doom palette. I've been resizing some weapons images in photoshop, the better way, and the results when pasted back into a WAD with the doom palette are quite good except I get that annoying colored lining around the image where the resizing anti-aliased it. Kind of a transformation of the anti-aliased semi-transparent lines that become colors ranging from blue to green once reinserted into the WAD. I was basically wondering if there is an effective way of dealing with this, some kind of process, action or palette trick, short of erasing all the lines manually. I believe there was something like this done for the creation of the Counter-Doom mod, where every single CounterStrike weapon was remade into doom. All the weapon images had to be resized, but it was done well. Also, there were clearly too many frames for the creator (Blackfish I think it was?) to have erased annoying lines manually, unless he's insane. THANKYOUTHANKYOUTHANKYOU FOR ALL THE HELP. I will be posting some new stuff on MoUAC soon, so for those of you who care, thanks for the support and stay tuned. OUT 0 Share this post Link to post
Amaster Posted March 27, 2007 You could do an image>adjustments>replace color to get rid of large areas quickly. You could also just set image interpolation to nearest neighbor, which is what I think blackfish did. Or try bicubic sharper for a little less of "outlining". Edit: Wait what's wrong with resizing them after converting to indexed color? I believe this still uses the nearest neighbor method but at least it's "safe". 0 Share this post Link to post
Nick Perrin Posted March 27, 2007 I guess I forgot to say that using nearest neighbour, when enlarging or rotating, looks like absolute crap. 0 Share this post Link to post
andrewj Posted March 27, 2007 Here is one way: Step 1: convert background color (Cyan) to an alpha channel Step 2: Resize the image Step 3: Threshhold the alpha channel at 254 Step 4: Flatten image back onto a Cyan background By "Threshhold alpha", this is an operation in the GIMP that tests the alpha channel at each pixel and if it is below, the new alpha is 0 (completely transparent), and if it is above, the new alpha is 255 (completely opaque). Photoshop would have the same thing, maybe under a different name. 0 Share this post Link to post
Nick Perrin Posted March 27, 2007 Thanks, that sounds great. I just have to find out where that threshold is in Photoshop, or get GIMP haha. I might actually do that to see what it's like anyway... 0 Share this post Link to post
Vegeta Posted March 27, 2007 Doesn't Edge allow multiple palettes, and 32 bit colors? 0 Share this post Link to post
Nick Perrin Posted March 27, 2007 Vegeta said:Doesn't Edge allow multiple palettes, and 32 bit colors? Yes, but that would require that I make the images into PNG images for which setting the weapon's X and Y offsets on your HUD is very difficult. You can't move it the same way like in Wintex or XWE and see exactly where it will be, and even setting the same offsets as an identical non-PNG image that is in the WAD will give it a different position. Until that is changed, the PNG implementation is no good for weapons. Great for all else though! 0 Share this post Link to post
Kappes Buur Posted March 27, 2007 Try SetPNG for setting sprite offsets in PNGs, found on this page: http://grafzahl.drdteam.org/index.php?page=topic&id=230 0 Share this post Link to post
Maes Posted March 28, 2007 The best way is to do all resizing/rotation/effects BEFORE applying the doom palette, for the same reason that e.g. Audio is always processed in the best possible quality and is downgraded to whatever distribution format only after all the edits are done. 500th post BTW, FTW \o/ 0 Share this post Link to post
andrewj Posted March 28, 2007 Nick Perrin said (Re: EDGE weapons) Until that is changed, the PNG implementation is no good for weapons. Great for all else though! Let me know how it can be improved. 0 Share this post Link to post
Nick Perrin Posted March 28, 2007 Maes said:The best way is to do all resizing/rotation/effects BEFORE applying the doom palette Yup, that's what I do, only way to get those good effects looking good. Ajapted said:Let me know how it can be improved. Here are my thoughts: -Two weapon sprites of the exact same size, one PNG and one within the WAD. The WAD sprite's offsets are set in WinTex or XWE etc. Using those offsets in IMAGES.DDF for the PNG entry of same dimensions, the PNG sprite would be in the exact same position as the WAD sprite. -The smoothing or some kind of graphical process seems to be handled differently for external PNGs than bitmaps from the WAD, so if some frames of a weapon are PNG they could possibly look out of place on lower detail levels. -Is there some way to make sprites which have parts that slowly fade out look more natural at the edges, rather than cutting off after the lowest possible alpha level? This is hard to explain, I can provide a screenshot if needed Thanks for all the help! MUCH appreciated. 0 Share this post Link to post
andrewj Posted March 29, 2007 Nick Perrin said:Two weapon sprites of the exact same size, one PNG and one within the WAD. The WAD sprite's offsets are set in WinTex or XWE etc. Using those offsets in IMAGES.DDF for the PNG entry of same dimensions, the PNG sprite would be in the exact same position as the WAD sprite. That seems reasonable. The smoothing or some kind of graphical process seems to be handled differently for external PNGs than bitmaps from the WAD, so if some frames of a weapon are PNG they could possibly look out of place on lower detail levels. Off the top of my head, I don't know what could cause that. Is there some way to make sprites which have parts that slowly fade out look more natural at the edges, rather than cutting off after the lowest possible alpha level? This is hard to explain, I can provide a screenshot if needed I know what you mean here. In order to fix the last two problems, ideally I need a wad to test with. If you could zip something up and email it to me at ajapted@gmail.com or PM me a download url, that would be great. (No rar files please). 0 Share this post Link to post
EarthQuake Posted March 29, 2007 I was basically wondering if there is an effective way of dealing with this, some kind of process, action or palette trick, short of erasing all the lines manually. Have you tried moving the image in Photoshop to a transparent layer, deleting the cyan with the magic wand, manipulating it, and then copying that layer and pasting into MSPaint? The edges should be rough and not anti-aliased with the cyan from the tranformation... or at least that is how it worked with Photoshop 5.0 and MSPaint on XP. I haven't tried it yet in CS2 and Win2k's MSPaint, but I'd imagine it would work the same way. 0 Share this post Link to post
Nick Perrin Posted March 29, 2007 EarthQuake said:Have you tried moving the image in Photoshop to a transparent layer, deleting the cyan with the magic wand, manipulating it, and then copying that layer and pasting into MSPaint? I can't try it right now because I'm not at home, but I think it'll still make a border around the weapon, just of different colours, probably white or something. 0 Share this post Link to post
Dark_Shadow4002 Posted April 1, 2007 i never had any problem getting my offsets in EDGE with the PNG weapons for Fatal Disaster...hell you got the old build :P if you want i will set the offsets for ya. Hi-res weapon PNG's look far better than typical sprites... 0 Share this post Link to post