[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Webp
There are really four completely separate image format needs here:
1) A format that is for putting 2D pictures onto 2D web pages. It can be
lossy - and you can tune your lossy compression highly optimally since
decoding time and client-side storage spaces are not an issue - and
(critically) you know that the end user is looking at pixels that are
comparable to the resolution of the human eye. You can know things like
that there are 92 million intensity detectors (rod cells) but only 4.5
million chroma detectors in the human eye - so do things like storing
hue/saturation at one quarter the linear resolution that you need to store
intensity. That we're twice as sensitive to green light as red and half
as sensitive to blue. That's pretty much what JPEG and Webp do to get such
spectacular compression. But it's largely irrelevant to WebGL.
2) A format that is for putting 3D textures onto 3D objects in 3D web
pages. It CANNOT be optimized based on the simple human-factors stuff
that JPEG and Webp use because these textures will be re-lit and resampled
over a gigantic range of scales and brightnesses. Alpha is much more
important. Because most 3D applications need WAY more texels than there
are pixels on the screen (perhaps 100 times more in many applications) -
it's important that whatever compression scheme you use fits with what
your hardware can do so you don't have to eat memory and CPU time to
decompress it. That's pretty much what DXT and ETC compression do...and
DDS and the new KTX formats are where it's at. Our hands are tied here
because we need hardware support - so innovation is very difficult. This
format also needs to support things like cube maps, 3D textures, floating
point texels, a full alpha channel. I cannot overstress how JPEG and Webp
are complete non-starters here because they produce horrible artifacts
when not viewed under super-special conditions.
3) A format that compresses - but not lossily. Games use textures and
"images" for very non-traditional things like height maps and normal maps
and all manner of weird stuff. You absolutely need a "what goes in is
exactly what comes out" format. Right now, that's PNG - although both DDS
and KTX can do lossless storage.
4) A vector image format...SVG is the one true choice here.
So the minor differences between Webp and JPEG make them competitors - but
since JPEG has such a gigantic market share and support structure - it's
hard to imagine Webp getting hugely popular given the relatively small
degree of improvement over JPEG.
The choice between DDS and KTX basically boil down to the choice between
Direct3D and OpenGL. I haven't used KTX yet - but it certainly seems to
be a direct replacement for DDS - but presumably without the IP
PNG is really the only candidate for lossless. TIF, BMP and "SGI" formats
have enthusiastic followers - but without comprehensive web support, they
are non-starters. DDS can do lossless - but it doesn't do ANY compression
- not even run-length encoding! Dunno about KTX.
SVN is really the only choice for vector work - it also produces TINY
files when the image needs to be high-resolution but "cartoonish".
So - for WebGL, we need KTX, PNG and SVN...and to a much lesser extent, JPEG.
You are currently subscribed to email@example.com.
To unsubscribe, send an email to firstname.lastname@example.org with
the following command in the body of your email: