Page 1 of 1

convert ANIM layer to CTG Layer - what is too many colors ?

Posted: 25 Jan 2017, 00:29
by D.T. Nethery
I have an ANIM layer (color fill layer) I want to convert to CTG Layer, but when I try to convert it , I get a message saying:

"This Layer contains too much colors to be converted"

But the layer only has two "colors" --- Grey and White . How is that "too many colors to be converted" ? What is the limit on the number of colors that can be converted from ANIM to CTG layer ?
IF it's not possible to convert only two colors (grey and white) then why even have the option of "Convert to CTG Layer" if it's not possible?
Transform to CTG Layer.jpg
.

Re: convert ANIM layer to CTG Layer - what is too many colo

Posted: 25 Jan 2017, 03:54
by Svengali
David, the antialiasing colors along the edges... those all are counted, too.

Re: convert ANIM layer to CTG Layer - what is too many colo

Posted: 25 Jan 2017, 19:04
by D.T. Nethery
Svengali wrote:David, the antialiasing colors along the edges... those all are counted, too.

Ok.

Well, I found a workaround for anyone else who has the same issue.

Here's what happened:

1.) I had a CTG fill layer with only two colors - medium Grey and White .
2.) I accidentally converted the CTG layer to Anim layer . (I had intentionally made it an Anim layer, but thought I was using a Duplicate layer so I had my original CTG layer intact,
but that was not the case , so I was stuck with the fill layer as an Anim , not CTG ).
3.) I wanted to turn it back to CTG layer , but then I get the error message: "This Layer contains too much colors to be converted" .

SOLUTION:

4.) I used FX Stack > Color Replacer . I selected the Grey tone as the Source , then for the Destination I selected the medium Grey from my palette .
I dialed up the Tolerance and Softness on the Color Replacer . Apply to all.

EDIT: I found that it also works to use FX Stack > Gaussian Blur (set to strength of 1) . After applying Gaussian Blur to all the frames of the Grey and White fill layer I can transform it to CTG layer.

5.) NOW when I went to "Transform to CTG layer" it did convert it back to CTG , but now I only had my medium Grey tone, the white areas had been converted to Grey . (the white was for eyes ) So I had to reapply the White areas, but that did not take long .

Re: convert ANIM layer to CTG Layer - what is too many colo

Posted: 26 Jan 2017, 09:17
by Eric Scholl
Actually, the color limit is set to 100 colors.
Only perfectly opaque colors are taken in account, we consider semi-transparent colors ( like antialisaing pixels ) as totally transparent.

So I don't know why you had this message if you are sure you only had 2 colors.
I even checked in the code and there seems to be no errors there.

Re: convert ANIM layer to CTG Layer - what is too many colo

Posted: 26 Jan 2017, 09:29
by NathanOtano
maybe it's because of the grey under the black lines? it's not aliasing but a gradient from black to grey

Re: convert ANIM layer to CTG Layer - what is too many colo

Posted: 26 Jan 2017, 12:54
by D.T. Nethery
NathanOtano wrote:maybe it's because of the grey under the black lines? it's not aliasing but a gradient from black to grey
But when I tried to convert it I did not have the line layer turned on (the line art layer is separate) . Only the Grey and White fill .
Layer contains too many colors to be converted.jpg
Layer contains too many colors to be converted.jpg (95.21 KiB) Viewed 36367 times
Applying FX Stack > Gaussian Blur or FX Stack > Color Replacer makes it possible to transform the layer to CTG .


.

Re: convert ANIM layer to CTG Layer - what is too many colo

Posted: 26 Jan 2017, 14:43
by NathanOtano
And so maybe it's the transition beetween white and grey? If your white is not transparent

Re: convert ANIM layer to CTG Layer - what is too many colo

Posted: 26 Jan 2017, 18:44
by Peter Wassink
i count at least 50 shades of grey

Re: convert ANIM layer to CTG Layer - what is too many colo

Posted: 26 Jan 2017, 22:37
by Svengali
Out of curiosity try generating a NEW PALETTE FROM IMAGE and see which and how many colors are derived?

Re: convert ANIM layer to CTG Layer - what is too many colo

Posted: 27 Jan 2017, 02:26
by D.T. Nethery
Svengali wrote:Out of curiosity try generating a NEW PALETTE FROM IMAGE and see which and how many colors are derived?
Interesting...

I tried generate New Palette from Image ... it says the Color Count is 256 colors ... then the palette generated shows one swatch of White (#FFFFFF) and the exact same swatch of Grey (#EBEBEB) repeated 255 times ... What the what ?!!!
new palette from current image.jpg

.

Re: convert ANIM layer to CTG Layer - what is too many colo

Posted: 27 Jan 2017, 15:37
by Fabrice
David, can you share your .tvpp file ?

Re: convert ANIM layer to CTG Layer - what is too many colo

Posted: 27 Jan 2017, 15:55
by Svengali
Fabrice,
In TVPaint Pro on my system, if I have a brand new Untitled project with a BLANK frame whose background is white... and I select to create a new palette from the current frame, the RESULT is a color count of 256, and a new palette which has color 0 set to white (255 255 255) and color 1 thru color 255 set to black (0 0 0).

Something fundamental seems awry... and that probably relates directly to David's original problem...

Sven

Re: convert ANIM layer to CTG Layer - what is too many colo

Posted: 30 Jan 2017, 07:57
by Mike
About the palette, I checked the code and the popup is asking the number of colors YOU want, it's not the number of color in the image.

And "from current image" is maybe not the good term, it should be "from current display":
_ if you change the background color, the palette will be different
_ and (nearly) every antialiased pixels will count as a new entry in the palette

Re: convert ANIM layer to CTG Layer - what is too many colo

Posted: 30 Jan 2017, 14:45
by Svengali
Mike wrote:About the palette, I checked the code and the popup is asking the number of colors YOU want, it's not the number of color in the image.
Ah, I understand. Creating a new color palette from the image (display) defaults to 256 colors... so of course there were 256 colors generated, one for the background and 255 defaulting to black. I notice the new default is whatever number of colors you generate for the previous palette.

On a related issue, is it possible to best render a limited color version of an image using ONLY the colors in the current palette?
Also, is it possible to generate a limited number palette based on, and sorted by popularity of pixels (or color families of pixels)?

Sven