Grid Sage Forums

REXPaint => Everything REXPaint => Topic started by: b_sen on April 15, 2018, 11:01:26 AM

Title: [Feature Request] Option to Apply Only Select RGB Color Channels
Post by: b_sen on April 15, 2018, 11:01:26 AM
The use case behind this request is part of my ongoing mockup series (http://www.gridsagegames.com/forums/index.php?topic=1090.0).  The "zone of control" visualization has to show two overlapping sets of transmission ranges (one for stationary structures in the Complex, and the other for robots), and the most natural way to make it clear which of them apply to any tile is to give each set its own background color channel.  Unfortunately, unless I've missed a feature, right now that means applying the combined background color manually with frequent reference to guide layers, rather than being able to use the oval tool directly.
Title: Re: [Feature Request] Option to Apply Only Select RGB Color Channels
Post by: Kyzrati on April 15, 2018, 06:00:27 PM
I'm not 100% sure of what you mean in terms of how this would be applied. I can see a number of different possibilities, but I guess you just mean you're looking to have the oval tool just add Red to its area, for example, and a separate use of the tool centered on a different point would just add Green, resulting in different colors in the overlapping area?

I've considered adding blending modes for color, which would be able to handle this sort of thing, but that's a huge feature that would take a while to plan out and implement so not something that I can do now. It'd be for a future major version rather than a quick patch like some of the other requests over the past year.
Title: Re: [Feature Request] Option to Apply Only Select RGB Color Channels
Post by: b_sen on April 15, 2018, 07:40:14 PM
Yup, that's what I mean, though if it's not quick to implement I'll just have to do it the hard way for this mockup.  It is a pretty unusual use case. :P
Title: Re: [Feature Request] Option to Apply Only Select RGB Color Channels
Post by: Kyzrati on April 16, 2018, 12:04:55 AM
Alrighty well, good news, I went ahead and did it anyway :) (you're doing neat stuff with it and I did think of a way to edge this feature in using a sort of temporary approach...)

Here's a patched .exe (http://www.gridsagegames.com/blogs/fileDownload.php?fileName=REXPaint-v1.03_color_channel_patch.zip) for you to try out! (Edit: Feature now included with v1.04)

The new commands:
Quote
Shift-Alt-r/g/b          Toggle Foreground Color Channel Application (all tools)
Ctrl-Shift-Alt-r/g/b    Toggle Background Color Channel Application (all tools)

There is no UI indicator for the current channel settings, but any time you change a setting it'll remind you of all existing settings via a message.

I did some quick test samples....

Background:
(https://i.imgur.com/YiP7aA8.gif)

Foreground:
(https://i.imgur.com/M7iZdHR.gif)

Note that the effects of selective RGB channel replacement can be... pretty weird so it may take a moment to figure out how to apply this :P
Title: Re: [Feature Request] Option to Apply Only Select RGB Color Channels
Post by: b_sen on April 16, 2018, 12:44:44 AM
It works, thank you!  :D  It did also expose the fact that the blank image created when REXPaint opens uses a black background, while ones created later use a transparent background, since I was testing it using multiple images. :)

(The effects of selective color channel replacement look non-weird to me, but then I once worked with a series of puzzles revolving around manipulating RGB color channels, so I am kind of used to it. XD )
Title: Re: [Feature Request] Option to Apply Only Select RGB Color Channels
Post by: Kyzrati on April 16, 2018, 12:53:45 AM
Yeah, it does indirectly reveal that the "black looking background" is really (255,0,255), something I imagine I did so that it'd be easier to copy something from the base layer to higher layers? I dunno :P
Title: Re: [Feature Request] Option to Apply Only Select RGB Color Channels
Post by: b_sen on April 16, 2018, 01:08:06 AM
Only on images not created on a REXPaint startup, though - those use actual black. :P
Title: Re: [Feature Request] Option to Apply Only Select RGB Color Channels
Post by: Kyzrati on April 16, 2018, 01:28:22 AM
Yep.