Re: [Algorithms] converting 32bpp textures to 8bpp textures with 32bpp CLUTs
Brought to you by:
vexxed72
From: Jamie F. <j.f...@re...> - 2000-11-30 16:41:22
|
Robert Dibley wrote: > > Correct me if I'm wrong (I wouldn't be surprised... :), but > > your solutions seem to be mainly to get the artists to do > > textures (at least roughly) in 256 colours in the first > > place. That's not really an option for us. > > Give them Photoshop, and tell them they have a choice - either they colour > reduce it themselves and get the palette that they think looks best, or you > do it for them using an automated process which has no idea what looks good. > They'll soon agree :-) Actually, they're quite happy with a nice little utility called Display which they've just introduced to me :) > > > For the arbitrary colour reduction, although we could code > > something ourselves, I've seen such a variety in the quality > > of quantisation I'm convinced that we wouldn't do a good > > job first time round. If photoshop and debabelizer don't meet > > our quantisation quality requirements, it's not a trivial job > > to do well, and it's not really where we want to spend our time. > > Yup - the human eye picks up on things that most algorithms don't handle > well. > > Currently, I suspect we'll take 32bpp images; if they have a > > trivial alpha or colour component, no problem. Otherwise, we > > split it into 2 images, one containing the transparent pixels, > > one containing the opaque pixels. Quantise to 7 bit, recombine > > into 1 8bpp texture. Quick experiments suggest nobody > > (including artists) can tell the difference between 8bpp / > > 7bpp quantisation anyway. > > Sounds ok, although I'd think you'd have trouble if its more than an on/off > alpha image, say like a dirty pane of glass - if you have both colour > variation and alpha variation its difficult to quantize well. > I'm actually not expecting trouble now, believe it or not. Display does a fantastic quantising job, far better than debabelizer or photoshop. Its 4bpp quantisation is comparable to photoshop's 8bpp quantisation :), and a quick whizz around some textures shows that none of us (including artists) can tell the difference between the 32bpp texture and the 8bpp Display-quantised version (whereas Photoshop had obviously lost some colours). And the 7bpp were just as good. So I'm not too scared about the opaque side of things. So now need to represent the alpha channel sanely to it (it doesn't handle the alpha channel itself).... Not quite as straight forward as I was originally thinking (brain on the fritz... original suggestion equivalent to 1bit alpha channel). Possibly take aggregate palette from quantisation of the 4 24bpp textures RGA / RAB / AGB / RGB, compare to plain old RGB palette.... Maybe average the palettes from 4 separate quantisations. No, not great. I think my brain just broke. Jamie -Virus Scanned and cleared ok |