Image dyeing ...

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
zick
Novice
Novice
Posts: 194
Joined: 21 Feb 2007, 03:30
Location: City Of Champions Again

Image dyeing ...

Post by zick »

I was reading about image dyeing in the wiki and had a question. If we use an image with "|W" is the palette applied to it the same thing as a gradient map in photoshop?
Thanks for any answers ...
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Post by Crush »

I don't know exactly how gradient maps work in photoshop (I am a GIMP user) but it sounds like a quite similar system.

The color palette created is a gradient (in RGB space) evenly distributed over the brightness values. When you have 4 color values, for example, the colors between 0% brightness and 33% brightness are replaced by a gradient between the 1st and 2nd color, the colors between 33% and 66% by a gradient between 2nd and 3rd color and the colors between 66% and 100% by a gradient between the 3rd and 4th color.

Note that pure black (#000000) is added to the beginning of the color list in the palette definition. So when you got "|#0000ff,00ff00,ff0000" as a palette you will get a gradient from black to blue to green to red.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
zick
Novice
Novice
Posts: 194
Joined: 21 Feb 2007, 03:30
Location: City Of Champions Again

Post by zick »

How well does it work with alpha blended anti-aliased images? I don't see a whole lot of the artists here using images with those properties. Most have very hard edges between colors, and single transparency.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Post by Crush »

It works perfectly with alpha transparency.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
zick
Novice
Novice
Posts: 194
Joined: 21 Feb 2007, 03:30
Location: City Of Champions Again

Post by zick »

And what about anti-aliasing (or regions of color blending into another color) ... Sorry to ask so many questions.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Post by Crush »

Only pixels with a "pure color" will be colored. A "pure" color in the RGB color model is a color where all three RGB components are either 0 or identical. In the HSV color model a "pure" color got either 100% or 0% saturation and a hue divisible by 60. When the color value of a pixel isn't "pure" it won't be colored.

I think this should answer your question.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
zick
Novice
Novice
Posts: 194
Joined: 21 Feb 2007, 03:30
Location: City Of Champions Again

Post by zick »

What about pure greyscale ... you could use grey colors where all the RGB values are the same.

EDIT: I think I just answered my own question ... If I use greys like #333333, #666666, #999999, or really any grey for that matter.
zick
Novice
Novice
Posts: 194
Joined: 21 Feb 2007, 03:30
Location: City Of Champions Again

Post by zick »

In theory, could you make ground tiles greyscale and apply a palette to them that simulates a time of day (morning, noon, dusk, night)?
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Post by Crush »

Tilesets can't be dyed yet (AFAIK) but it would be no problem to enable it. So theoretically it would be possible. But the practical problem would be the coloring at daytime.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
Post Reply