
Google and Binomial Open-Source Basis Universal Texture Format - jasondavies
https://opensource.googleblog.com/2019/05/google-and-binomial-partner-to-open.html
======
modeless
Compressed texture formats are underused. I think few people outside of game
development understand the benefits. The linked post explains it but I'd like
to take a stab at it too.

Regular image compression formats like PNG or JPEG save network bandwidth and
disk storage but not RAM. They must be completely decompressed and stored
uncompressed in RAM as long as they are displayed. Compressed texture formats
_do_ save RAM. They _remain compressed_ in RAM while they are being displayed,
typically 1/6 the size of regular images or even smaller. That saves not only
RAM but memory bandwidth and power too; especially important on mobile.
Switching to compressed textures can make applications significantly faster.

Compressed texture formats have two main disadvantages that Basis solves. One
is that their compression ratios are fixed and not as good as JPEG. Basis adds
extra compression to make them more comparable to JPEG on disk.

The other, larger issue is that compressed texture formats require hardware
support on the GPU, and GPUs don't agree on what formats to support. There is
no single format with guaranteed support on every platform, which means that
cross platform applications must encode each image multiple times and ship
different formats to different users. Basis solves this by efficient runtime
transcoding to most common GPU formats. This capability is unique and a really
big deal.

Anyone with images in their application should take a look at Basis. Now that
you can ship a single compressed texture file that's supported everywhere, I
hope that this technology can expand beyond games.

~~~
60654
From this [1] it sounds like the texture is a modified variant of ETC1, which
gets loaded up from disk into memory as such, and transcoded on the CPU into
target GPU format (DXT, PVRTC, etc), and then uploaded to VRAM.

If so that sounds similar to their previous Crunch library [2], in that it
does transcoding on the CPU before moving the texture to the GPU - but most
likely _much_ faster than Crunch because it starts with ETC as shared basis.
(And artifacts are a common with transcoding between compressed formats,
especially when transparency is present, but I have high hopes for this one
considering the authors! :) )

Authors suggest that a version that transcodes on the GPU would be possible -
that would be really interesting, I would imagine that would be even faster,
although at the cost of higher texture memory usage.

[1] [https://github.com/binomialLLC/basis_universal#quick-
basis-f...](https://github.com/binomialLLC/basis_universal#quick-basis-file-
details) [2]
[https://github.com/BinomialLLC/crunch](https://github.com/BinomialLLC/crunch)

~~~
modeless
Crunch only supports one family of formats, DXT. (Unity has a fork that
supports the ETC family, but it does _not_ support decoding ETC and DXT from
the same compressed file). Efficiently transcoding one compressed file to
multiple compressed texture formats at load time is the key new feature that
only Basis provides.

------
nod
Congratulations to
[https://twitter.com/sehurlburt](https://twitter.com/sehurlburt) ! ...who is
also a font of interesting and insightful business advice and life/growth
thoughts

~~~
emit_time
Seconded. Very friendly too :)

------
yingw787
This is amazing to me from an outsider's point of view; I thought Binomial was
a two-person shop (idk if they expanded recently). To be able to partner with
Google and Chrome Media on an equal level just doesn't seem possible to me.
Binomial must have some pretty nice tech. Congratulations on the partnership!

~~~
sanxiyn
They are still two persons.
[https://twitter.com/sehurlburt/status/1131371251790835712](https://twitter.com/sehurlburt/status/1131371251790835712)

~~~
yingw787
Thanks for the link!

------
edwintorok
There is a paper describing the technique here:
[http://gamma.cs.unc.edu/GST/gst.pdf](http://gamma.cs.unc.edu/GST/gst.pdf)

~~~
Scaevolus
That paper described the inspiration for Basis, but Basis itself is slightly
different.

[https://github.com/binomialLLC/basis_universal#quick-
basis-f...](https://github.com/binomialLLC/basis_universal#quick-basis-file-
details)

> Internally, Basis files are composed of a non-uniform texture array of one
> or more 2D ETC1S texture "slices". ETC1S is a simple subset of the ETC1
> texture format popular on Android.

------
markdog12
Three.js already supports it:
[https://github.com/mrdoob/three.js/pull/16522](https://github.com/mrdoob/three.js/pull/16522)

------
manigandham
Is this going to lead to a new general image format? What happens with webp?
That seemed to have never taken off much because of legacy support.

------
ttoinou
Is anyone thinking of adapting this create a new GPU-based video format ? Like
HAP [https://hap.video/](https://hap.video/)

