Tinting a truecolor sprite via translations

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Rip and Tear
Posts: 186
Joined: Tue May 02, 2017 3:54 pm

Tinting a truecolor sprite via translations

Post by Rip and Tear »

Say I have a grayscale truecolor sprite in my mod. I'd like to use different colorized versions of this sprite— basically, using the brightness information in the sprite while applying hue/saturation values of some color across the entire sprite.

Is this something that could be done through GZDoom's translation features, or would I need to include a sprite for every color I'd want?
Gez
 
 
Posts: 17942
Joined: Fri Jul 06, 2007 3:22 pm

Re: Tinting a truecolor sprite via translations

Post by Gez »

Unfortunately, translation effects only apply to palette indices. Therefore when you apply a translation to a truecolor sprite, it is first forced into the palette, and then translated. Hopefully, the gray range in the palette is sufficiently large and granular that the image quality will not suffer too much.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Tinting a truecolor sprite via translations

Post by Graf Zahl »

There's other colorization options. To evaluate what's right for you and determine if it can be done, can you post an example?
User avatar
Rip and Tear
Posts: 186
Joined: Tue May 02, 2017 3:54 pm

Re: Tinting a truecolor sprite via translations

Post by Rip and Tear »

Graf Zahl wrote:There's other colorization options. To evaluate what's right for you and determine if it can be done, can you post an example?
Sure, take a look at https://github.com/perfectionismtech/Cr ... tes/flares. FLREA0 is the base sprite, B-G are the manually recolored sprites.
Post Reply

Return to “Scripting”