"Desaturated" translations (ACS & Decorate)

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: "Desaturated" translations (ACS & Decorate)

Re: "Desaturated" translations (ACS & Decorate)

by NeuralStunner » Sun Oct 18, 2009 10:53 am

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?

Re: "Desaturated" translations (ACS & Decorate)

by Rachael » Sun Oct 18, 2009 5:57 am

Thank you!! :)

Re: "Desaturated" translations (ACS & Decorate)

by Graf Zahl » Fri Oct 16, 2009 2:09 am

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.

Re: "Desaturated" translations (ACS & Decorate)

by Xaser » Sat Feb 14, 2009 1:40 pm

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.

"Desaturated" translations (ACS & Decorate)

by Rachael » Sat Feb 14, 2009 9:59 am

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.

Top