Skip to main content
Tweeted twitter.com/StackGameDev/status/890705109986004994
improved formatting
Source Link
user35344
user35344

I´m trying to build a tool inside Unity that allows our artists to create different color palettes for our characters.

The big problem is that since every single sprite is hand-drawn and hand-painted with different brushes there are no "traditional" color palettes defined for our base sprites. We use around 10-15 base colors for our characters but each character has tons of different shades and saturation variants to their base color on every frame (again, the art is brush-painted like).

Since color indexing is not really an option (unless I want to create a really big color index texture with a gazillion colors) I was wondering if there was a way to create a shader that, given a set of "base colors" and an equivalent color palette, swaps every "similar color" of the character with the color from the new palette (i.e. swap every single red-ishreddish color within a tolerance range with a newly defined color).

The goal here is to do this on a shader in real time. I could just write a script that does this and generates a new spritesheet with the swapped colors, but managing one spritesheet per character variationmanaging one spritesheet per character variation (we aim to have 10 variations per character)** is really problematic for our workflow.**

I reallreally hope you can help me. I´veI've been trying to find an answer for this for a week.

I´m trying to build a tool inside Unity that allows our artists to create different color palettes for our characters.

The big problem is that since every single sprite is hand-drawn and hand-painted with different brushes there are no "traditional" color palettes defined for our base sprites. We use around 10-15 base colors for our characters but each character has tons of different shades and saturation variants to their base color on every frame (again, the art is brush-painted like).

Since color indexing is not really an option (unless I want to create a really big color index texture with a gazillion colors) I was wondering if there was a way to create a shader that, given a set of "base colors" and an equivalent color palette, swaps every "similar color" of the character with the color from the new palette (i.e. swap every single red-ish color within a tolerance range with a newly defined color).

The goal here is to do this on a shader in real time. I could just write a script that does this and generates a new spritesheet with the swapped colors, but managing one spritesheet per character variation (we aim to have 10 variations per character)** is really problematic for our workflow.**

I reall hope you can help me. I´ve been trying to find an answer for this for a week.

I´m trying to build a tool inside Unity that allows our artists to create different color palettes for our characters.

The big problem is that since every single sprite is hand-drawn and hand-painted with different brushes there are no "traditional" color palettes defined for our base sprites. We use around 10-15 base colors for our characters but each character has tons of different shades and saturation variants to their base color on every frame (again, the art is brush-painted like).

Since color indexing is not really an option (unless I want to create a really big color index texture with a gazillion colors) I was wondering if there was a way to create a shader that, given a set of "base colors" and an equivalent color palette, swaps every "similar color" of the character with the color from the new palette (i.e. swap every single reddish color within a tolerance range with a newly defined color).

The goal here is to do this on a shader in real time. I could just write a script that does this and generates a new spritesheet with the swapped colors, but managing one spritesheet per character variation (we aim to have 10 variations per character) is really problematic for our workflow.

I really hope you can help me. I've been trying to find an answer for this for a week.

I´m trying to build a tool inside Unity that allows our artists to create different color palettes for our characters  .

The big problem is that sinsince every single sprite is hand-drawn and hand-painted with different brushes there are no "traditional" color palettes defined for our base sprites  . We use around 10-15 base colors for our characters but each character has tons of different shades and saturation variants to their base color on every frame (again  , the art is brush-painted like).

Since color indexing is not really an option (unless iI want to create a really big color index texture with a gazillion colors) I was wondering if there was a way to create a shader that  , given a set of "base colors" and aan equivalent color palette  , swapswaps every single "similar color" of the character with the color from the new palette (iei.e. swap every single red-ish color within a tolerance range with a newly defined color)  .

The aimgoal here is to do this viaon a shader onin real time  . I could just write a script that does this and generates a new spritesheet with the swapedswapped colors  , but managing one spritesheet per character variation (we aim to have 10 variations per character) is really problematic for our workflow.** is really problematic for our workflow.**

I reall hope you can help me ,. I´ve been trying to find an answer for this for a week.

I´m trying to build a tool inside Unity that allows our artists to create different color palettes for our characters  .

The big problem is that sin every single sprite is hand-drawn and hand-painted with different brushes there are no "traditional" color palettes defined for our base sprites  . We use around 10-15 base colors for our characters but each character has tons of different shades and saturation variants to their base color on every frame (again  , the art is brush-painted like)

Since color indexing is not really an option (unless i want to create a really big color index texture with a gazillion colors) I was wondering if there was a way to create a shader that  , given a set of "base colors" and a equivalent color palette  , swap every single "similar color" of the character with the color from the new palette (ie. swap every single red-ish color within a tolerance range with a newly defined color)  .

The aim here is to do this via a shader on real time  . I could just write a script that does this and generates a new spritesheet with the swaped colors  , but managing one spritesheet per character variation (we aim to have 10 variations per character) is really problematic for our workflow.

I reall hope you can help me , I´ve been trying to find an answer for this for a week.

I´m trying to build a tool inside Unity that allows our artists to create different color palettes for our characters.

The big problem is that since every single sprite is hand-drawn and hand-painted with different brushes there are no "traditional" color palettes defined for our base sprites. We use around 10-15 base colors for our characters but each character has tons of different shades and saturation variants to their base color on every frame (again, the art is brush-painted like).

Since color indexing is not really an option (unless I want to create a really big color index texture with a gazillion colors) I was wondering if there was a way to create a shader that, given a set of "base colors" and an equivalent color palette, swaps every "similar color" of the character with the color from the new palette (i.e. swap every single red-ish color within a tolerance range with a newly defined color).

The goal here is to do this on a shader in real time. I could just write a script that does this and generates a new spritesheet with the swapped colors, but managing one spritesheet per character variation (we aim to have 10 variations per character)** is really problematic for our workflow.**

I reall hope you can help me. I´ve been trying to find an answer for this for a week.

Source Link

How to make a palette swap shader that works withn non-pixel art sprites?

I´m trying to build a tool inside Unity that allows our artists to create different color palettes for our characters .

The big problem is that sin every single sprite is hand-drawn and hand-painted with different brushes there are no "traditional" color palettes defined for our base sprites . We use around 10-15 base colors for our characters but each character has tons of different shades and saturation variants to their base color on every frame (again , the art is brush-painted like)

Since color indexing is not really an option (unless i want to create a really big color index texture with a gazillion colors) I was wondering if there was a way to create a shader that , given a set of "base colors" and a equivalent color palette , swap every single "similar color" of the character with the color from the new palette (ie. swap every single red-ish color within a tolerance range with a newly defined color) .

The aim here is to do this via a shader on real time . I could just write a script that does this and generates a new spritesheet with the swaped colors , but managing one spritesheet per character variation (we aim to have 10 variations per character) is really problematic for our workflow.

I reall hope you can help me , I´ve been trying to find an answer for this for a week.