Jump to content
  • 0

Displaying more than 256 colors for sprites


Cixls

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  06/01/20
  • Last Seen:  

I have been trying to change monster's colors with Act Editor without success. The color displays accurately in the editor but changes when displaying in-game, it got converted to the nearest simple color but not the color I specified with HEX in the editor. For example, when I specified #001603 (near black) in the editor and exported ACT and SPR, it will be displayed as #001000 (black) in-game.

 

I supposed this is because sprites are limited to 256 colors only, am I right? Is it possible to overcome this limitation? What about guardians (bow, sword, etc) that are 3D, are they bound to 256 colors as well?

 

Thanks!

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.01
  • Content Count:  208
  • Reputation:   60
  • Joined:  09/23/17
  • Last Seen:  

13 hours ago, Cixls said:

I have been trying to change monster's colors with Act Editor without success. The color displays accurately in the editor but changes when displaying in-game, it got converted to the nearest simple color but not the color I specified with HEX in the editor. For example, when I specified #001603 (near black) in the editor and exported ACT and SPR, it will be displayed as #001000 (black) in-game.

 

I supposed this is because sprites are limited to 256 colors only, am I right? Is it possible to overcome this limitation? What about guardians (bow, sword, etc) that are 3D, are they bound to 256 colors as well?

 

Thanks!

From what I've seen if you use Photoshop and define the image as indexed(after finalization the image)(at least for single frame things) the colors wont matter. I can create skill icons with any color no problem however i don't know too much about altering monsters, but you could give it a go

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  06/01/20
  • Last Seen:  

On 6/2/2020 at 12:31 PM, TheDerpySupport said:

From what I've seen if you use Photoshop and define the image as indexed(after finalization the image)(at least for single frame things) the colors wont matter. I can create skill icons with any color no problem however i don't know too much about altering monsters, but you could give it a go

I have never edited skill icons but it sounds similar to monster sprites because of editing SPR and ACT files. Did you get the originally desired HEX colors when extracting BMP after converted to SPR? Mine colors got changed when converted to SPR which can be verified when converting it back to BMP and inspect with color dropper, the HEX won't remain the same I wanted.

 

On 6/2/2020 at 12:31 PM, TheDerpySupport said:

From what I've seen if you use Photoshop and define the image as indexed(after finalization the image)(at least for single frame things) the colors wont matter. I can create skill icons with any color no problem however i don't know too much about altering monsters, but you could give it a go

A little update. I have tried editing a BMP frame (derived from SPR) using Photoshop in indexed color mode. I used pencil tool to dot a near black color (#001603) in the BMP file and saved. Then opened the BMP file and inspected the dot with color dropper, the color was changed to #000000 (perfect black). Did I do something wrong?

 

What I want to achieve is to use more than 256 colors in a sprite. Thanks.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  417
  • Reputation:   354
  • Joined:  11/11/11
  • Last Seen:  

Guardians and other 3D mobs do not use sprites but skeletons and textures (granny3d), don't ask me for details, though.


Most sprites use indexed bitmaps, which are limited to 256 colors, but as you can see on some newer headgears and monsters, sprites can certainly be more colorful, at the cost of size and unnatural look, through the use of sprites with 32-bit TGAs inside. Whether some software supports that is different question.

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  06/01/20
  • Last Seen:  

20 hours ago, Ai4rei said:

Guardians and other 3D mobs do not use sprites but skeletons and textures (granny3d), don't ask me for details, though.


Most sprites use indexed bitmaps, which are limited to 256 colors, but as you can see on some newer headgears and monsters, sprites can certainly be more colorful, at the cost of size and unnatural look, through the use of sprites with 32-bit TGAs inside. Whether some software supports that is different question.

 

Thank you!

 

After researching about sprite and TGA, I stumbled upon a tool called actOR2. It is said to be able to make 32-bit sprite by using the built-in script to change SPR Type from 0 to 1. However when I tried that script I got an error "SprNo is over than NumFlatImage". Also I cannot change SPR Type in each image. Do you know why? 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  417
  • Reputation:   354
  • Joined:  11/11/11
  • Last Seen:  

No idea how actOR2 deals with sprites, but if I remember correctly, images in .spr files are organized in two sequential lists, first all indexed images, then all full-color images. So maybe you have to put them in such order in the program, too.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  660
  • Reputation:   668
  • Joined:  11/12/12
  • Last Seen:  

Heya,

Could you show an example of the issue? It's not normal for the color to change in-game as it would indicate a new unknown behavior with indexed images in the client (and that's not very likely). If you do not want to share the file in public, please send it privately to me.

Are you building the sprite file from multiple BMP files in a folder? If so, that would be the problem as you have different palettes in each one of your BMPs. You cannot do that as it's not really possible to mix palettes. If you use Act Editor, it should give you a warning that the palettes aren't matching and it will attempt to fix the issue for you by converting the image to something as close as possible as your image. Depending of the option you select, you can retain 100% of the image quality. If you choose to find the closest color in the sprite palette instead, then it will end up picking #001000 as it's the closest color match to #001603.

Ideally you want to stick with one palette and not change colors in your BMP files though. You can also choose to convert the image to Bgra32 directly and that will solve the issue, with compression loss however.

Edited by Tokei
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...