"Desaturated" translations (ACS & Decorate)

Moderator: GZDoom Developers

Post Reply
User avatar
Rachael
Posts: 13955
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

"Desaturated" translations (ACS & Decorate)

Post by Rachael »

I don't know if this would be hard to implement, I am hoping not, but one thing I've wished for time and again when making monsters, mostly using recolors of existing ones, would be an option to create desaturated translations, similar to the "Ice" effect.

Something that could be defined maybe something like this: Translation 0%:100%=[192,0,0]:[255,255,0], for a simple fire-like translation.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: "Desaturated" translations (ACS & Decorate)

Post by Xaser »

Some type of general method involving blends instead of translation values would be much appreciated indeed, and probably similar to this here. Though it may have been brought up before... can't remember, myself.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: "Desaturated" translations (ACS & Decorate)

Post by Graf Zahl »

Added. Now that this was available for colormaps transferring the algorithm to translations was not that hard. The syntax is as follows:

Translation "start:end=%[rs,gs,bs]:[re,ge,be]"

start and end are palette indices which define the range to be translated.
rs...be are floating point values between 0.0 and 2.0.

For each palette entry in the range the color is calculated as follows:

translatedcolor = (rs,gs,bs) + grayscale(color) * (re-rs, ge-gs, be-bs)

which is the same as for colormaps.

This can be freely combined with other translation options, i.e. you can desaturate the entire sprite and then with additonal translations alter certain colors in a different way - or just desaturate a subrange of colors etc.

This option is also available for the TEXTURES lump as it uses the same code as DECORATE.

ACS is a different matter, unfortunately. That requires work on the ACS parser and I'm not going to change it.
User avatar
Rachael
Posts: 13955
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: "Desaturated" translations (ACS & Decorate)

Post by Rachael »

Thank you!! :)
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: "Desaturated" translations (ACS & Decorate)

Post by NeuralStunner »

I can see this being quite useful, especially for the simple purpose of recoloring an entire sprite. Stone Barons and the like. :)

Oh Graf, does this mean any progress toward dynamic translations, as you mentioned back in '08 some work would need to done on the Decorate parser? Or is this mostly unrelated?
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”