• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - IDE Replace transparent color on same layer in image editor

Is there any functionality similar to the "color mode: blend/replace" dialog from the image editor in GMS1? It doesn't appear that there is any easy way to, say, replace a couple opaque pixels with semi-transparent ones, or replace semi-transparent pixels of one color with another. If you try to draw a semi-transparent pixel over an opaque pixel, you can only get a blend of the opaque color and the transparent color (drawing a semi-transparent yellow over an opaque red always results in an opaque orange), and if you draw a semi-transparent pixel over another transparent one, the color is blended and the highest alpha is kept resulting in a pixel that is the same opacity but a different color(ex. trying to replace a 128-alpha yellow with a 128-alpha red results in a 128-alpha orange). I've also tried using the color replace tool, but that only changes the color and not the alpha values(replacing a fully opaque black with a transparent red gives an opaque red). You can delete the pixels you want to replace and draw the new color over the blank space, but that's a pretty arduous solution and makes it really hard to experiment with different colors. I've scoured the interface and the manual - what am I missing?
 

CasePortman

Member
I second this, In GM 1.4 I used the transparency replace for a lot of imported sprites that had an opaque background (generally one colour). My work-around is to select the magic wand too, then un-check contiguous mode, click the colour, and either hit delete or drag it off screen, not a fast process when I have a load of frames.
 

Mike

nobody important
GMC Elder
The (new) colour replace (while holding ALT - I think it is) should force in any colour + alpha you want.
 
Is there a way to make color replace only affect colors of a certain alpha? If I hold alt while using the color replace on a black line, it replaces every pixel that hasn't been drawn on, I'm guessing because the default layer color is a fully transparent black. Same thing if I have both a transparent red and the same red but fully opaque - alt-color replace changes both the transparent and opaque red to the new color and alpha. I can use the magic wand to select just the transparent area then control-color replace, but that's kinda convoluted for something that was so simple before.

After my original post I found a thread from a couple days ago where someone was looking for the same blend/replace functionality and you suggested that they file a suggestion - how can I do that? I didn't see anything in the bug report or help desk sections of the website about feature suggestion. I know it seems nitpicky, but that blend/replace dialog made the GMS image editor one of the best (in my opinion) pixel art editors available and I used that dialog constantly. I'm really digging the rest of the new image editor, but this has me thinking it might be easier to edit sprites in 1.4 and import them into 2. The paintbrush doesn't seem to use alt for anything - I'd be satisfied if holding down alt changed it from blend to replace.
 
Like I said, I can magic wand it first, it's that that's triple the number of steps - use the wand (or paint select, which is a really fantastic tool btw) then use the color replace then use the wand again to de-select - and I was hoping for something as easy as it was before.
 
I hate to bump something as old as this, but are there actually any plans to implement this? I hoped it would be in the official public release and was super pumped to upgrade my 1.4 Master Collection, but this really is holding me back.

This sprite is an example of something that I can easily work with in GMS but not GMS2:
skullsplode.png

The entire thing is made with just four shades of purple(and six pixels of black for the eyes), with varying amounts of alpha applied to the pixels in the middle to imply a membrane holding in fluid. While I was drawing it, and when I revise it in the future, it's easy to play with the shading on the membrane, the fluid levels, etc. by control-clicking to select a color then drawing with the blend mode set to replace. If I wanted to extend the shading on the upper-left corner of the membrane to imply more of a sphere, I could do it in two clicks.

In the GMS2 editor, I would need to erase the old color then draw in the new one, and that's if I only wanted to change one pixel and I knew exactly where I wanted to do it. If I wanted to mess with a lot of pixels and experiment to see what looked good, I could either: save all the transparent colors to a custom palette, replace the transparent colors with new opaque colors, draw my changes with the placeholder colors, then use the color change tool to switch back to the original palette and repeat until I got a result I was happy with, OR create an image with three layers, each one with a different level of opacity, which would still be difficult to manage because I would need to hit ctrl-z or erase and re-paint every time I accidentally painted on a pixel that already had color, and still wouldn't be quite right - the shading on the membrane isn't a transparent black applied to the original colors, which would be easy to accomplish with layers, it's from the bottom up the darkest purple, the medium purple, then the dark purple again with different alpha values, which helps accomplish a limited palette effect that's a snap in GMS but stupidly complicated in 2.

I know it sounds like nitpicky whining from someone who doesn't want to learn a new workflow, but I truly can't think of a good way to do the same work with GMS2 - If there is a good and convenient way to do what I'm talking about I'm happy to learn and try it. And the moment that blend/replace functionality is added to GMS2 I'll be spending a couple hundred bucks to upgrade, since I really like everything else about GMS2. But be honest: is there any plan to actually implement it, or not?
 

Mike

nobody important
GMC Elder
Use the new colour replace tool (next to fill and line). Select the colour you wish to replace with then click on the colour to replace. Also you can press "ALT" while using the tool, this will force in the ALPHA of the colour as well as the colour if you need to.
 
I understand and have used the color replace tool, and it's great tool for changing a whole chunk of colors at once, but that's not what I'm talking about. I'm talking about drawing lines or shapes with a transparent color over existing transparent colors and getting the color and alpha value I selected rather than a blend of the two. Going back to the sprite I put up, if I wanted to change the angle of the lighting and make the shadow cover a greater area without making it color the ENTIRE area, the color replace tool can't help me with that - unless you're suggesting that I draw the changes with a brand new color then replace the new color with the original using the color replace tool. I suppose that would technically accomplish what I need to do but is much more of a pain than it should be.
 
Sorry for the double post, but maybe I can rephrase since we've had the same misunderstanding twice now - I need a color replace tool that will work on a per-pixel basis, rather than on a whole group of colors all at once. Any chance of that getting in anytime?
 

Mike

nobody important
GMC Elder
So you want an "alpha lock" really? letting you draw normally but never changing the alpha of what you're changing?
 
If I understand what you're describing, you're describing a tool that if I selected a color with a 128 alpha value and drew over a pixel with an alpha value of 200, the resulting pixel would have an alpha value of 200. I want the opposite, the resulting pixel to have exactly the color and alpha values I selected(in this case 128), rather than a blend of my color selection and the existing pixel.

As you've pointed out, the color replace tool does this but it acts kinda like a fill tool, changing ALL pixels with the color value under the cursor to the selected color values. I can use various other tools(pencil select, erase, etc) in conjunction with the color replace tool to achieve my desired effect, but they all take three or four times as many steps as they did previously and that makes experimentation really, really, really hard. It's kinda like saying that you could draw with layers in 1.4, you just needed to draw each layer in a separate image in the sprite then manually copy-paste them over each other in the proper order - technically it works, but it's more of a pain than it's worth.


EDIT: I made a quick video showing what I'm talking about.
Hope that makes it clear! Sorry the audio isn't great, especially towards the end.
 
Last edited:

Mike

nobody important
GMC Elder
Ahhh.... you want a "store" rather than blend option for drawing operations.
 
I think so, although I'm unfamiliar with the phrase "store" in relation to drawing operations - I'm guessing that means the pixel(s) I'm performing the drawing operations store the new color value I've selected, rather than combine my color selection with the existing color. Any chance of something like that?
 

Mike

nobody important
GMC Elder
store is pixel = src_pixel
blend is pixel = dest_pixel*src_pixel

(more or less)

Possibly... Quite a large change for all the different tools, but not impossible.
 
Then yes, that's exactly what I'm hoping for! I know it seems like a minor thing but it's become a pretty crucial part of my workflow in every previous version of GM, and its absence is the only thing about GMS2 that doesn't seem to be an improvement(although I'm sure everyone says that about their own weird pet feature/idiosyncrasy that's been changed).
 

Agneum

Member
I'm looking for the "Color mode: Blend/Replace" option that was present in GM 1.4. Right now it only blends.. why would you take a way a feature from the sprite editor..?
 
M

mjadev

Guest
Use the new colour replace tool (next to fill and line). Select the colour you wish to replace with then click on the colour to replace. Also you can press "ALT" while using the tool, this will force in the ALPHA of the colour as well as the colour if you need to.
it seems this function is not documented in GMS2 manual (at least in "the Image editor" > tools section)
 
Top