GIF colors way off

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Jkoseattle
Posts: 430
Joined: Tue Nov 08, 2016 6:39 pm

GIF colors way off

Post by Jkoseattle »

I'm creating an animated GIF which consists of a png image which is pure red and transparent. When I export the animation, the color of the png is not even close to the original red, coming out a reddish dark gray. I have adjusted the number of colors in the export animation dialog for animated GIF and it doesn't make any difference. Any idea what's going on or what setting I might want to adjust?
Most of the time I'm doing music stuff. Check me out at http://www.jimofseattle.com/music.

Thing I did for work: https://www.youtube.com/watch?v=LgFYGqifLYw
User avatar
Maestral
Posts: 531
Joined: Tue Jan 27, 2009 5:44 pm
Location: Belgrade, Serbia

Re: GIF colors way off

Post by Maestral »

Have you tried picking the colours for gif, from the rendered frame? Ctrl+R and at the bottom you'll find the button.

Also, it could be due to the number of colours. Your Original Red may be out of the gamut, for the desired/set number of colours.
User avatar
Jkoseattle
Posts: 430
Joined: Tue Nov 08, 2016 6:39 pm

Re: GIF colors way off

Post by Jkoseattle »

@Maestral thanks, so I just hot Ctrl-R to render a frame, and when I hit Sample GIF colors that changes something for the entire project? Well, that indeed made the image render correctly, so we're getting there. Now, the OTHER image that is in the GIF is much more red than it's supposed to be. There's also a green vector layer that is coming out red.

As for the other thought, I already guessed that maybe the number of colors and the RGB value was outside the gamut, so I adjusted it to 100% red, i.e. 255-0-0, so that's not it.
Most of the time I'm doing music stuff. Check me out at http://www.jimofseattle.com/music.

Thing I did for work: https://www.youtube.com/watch?v=LgFYGqifLYw
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: GIF colors way off

Post by Greenlaw »

GIF is limited to 256 colors so it's never going to look the same as a full color 24-bit render (with up to 16.8 million colors.) The problem is that GIF is a crappy image format from the 1980's. :)

One way you can compensate is to use the dithered option. This mixes pixels within the defined 256 colors to visually simulate more colors. The trade-off is that the render can look 'grainy'.

Tip: You don't necessarily want to sample from frame 0 or 1. Go to a frame that best represents all the colors in your animation, press Ctrl-R and then click the sample button. This will help keep the palette more 'correct' looking for most of the animation.

But no matter what you do, you'll eventually have to accept (embrace?) GIF for what it is: a vintage image format with quaint limitations.

BTW, there are a few modern alternatives to GIF that support higher bit depths and a proper alpha channel, like HEIF (as seen on the iPhone) and APNG. Unfortunately, Moho doesn't support these yet so you'll need to compile the Moho renders in a program that does. The downside is that not all web browsers support these formats yet. (I'm baffled that there isn't more development in this area. Replacing GIF with something better seems like a no-brainer to me.)

Hope this helps.
Last edited by Greenlaw on Mon Jun 01, 2020 12:57 am, edited 2 times in total.
User avatar
Maestral
Posts: 531
Joined: Tue Jan 27, 2009 5:44 pm
Location: Belgrade, Serbia

Re: GIF colors way off

Post by Maestral »

@Jkoseattle / You're most welcome, glad it helped. Still, I should have used 'palette' instead of misleading 'gamut' and perhaps I should have mentioned that one should 'organize' the artworks in that sample frame in order for it to show most (if not all) of the colours. That should produce the closest match with the used colours, for sampling.
User avatar
Jkoseattle
Posts: 430
Joined: Tue Nov 08, 2016 6:39 pm

Re: GIF colors way off

Post by Jkoseattle »

OK I understand how it works now. I chose a frame where everything is on screen and doing the Sample GIF colors trick there. Seems weird though that you click on a button in a dialog which appears to have no effect but which actually will affect how it ultimately renders when exporting. But whatever. I was using 256 colors and limiting my images to basic colors, so I was expecting a little change when rendering. Looking better now
Most of the time I'm doing music stuff. Check me out at http://www.jimofseattle.com/music.

Thing I did for work: https://www.youtube.com/watch?v=LgFYGqifLYw
User avatar
Maestral
Posts: 531
Joined: Tue Jan 27, 2009 5:44 pm
Location: Belgrade, Serbia

Re: GIF colors way off

Post by Maestral »

While we're there / here's a link to the video in which Victor explains another approach.

A while ago I used b&w + 2-3 darker shades of grey, on a transparent bgd - and all of it in order to reduce the gif size. Alas, the pure white was available only with 100+ colours palette. You've made me look so, thanks for this reminder :)
Post Reply