The world is running surprisingly low on sand. Humans have found a staggering variety of uses for sand, from glass and concrete to electronics and artificial islands. And natural sand production is a slow process — mountains weather down to smaller and smaller rocks over eons — so it’s not shocking that sand is often harvested at a faster pace than it’s replenished.

But sand scarcity is more complicated than that. Sand is cheap to mine, but its weight and bulk make it extremely expensive to transport. And not all sand is alike: the particular shape and composition of individual sand grains is crucial for huge sand consumers like the concrete industry. So sand scarcity really comes down to where sand is found, where it came from, and what it’s made out of.

We wanted to see what all this actually looks like, so we went on a sand scavenger hunt around the San Francisco Bay Area. We collected samples from a riverbed, a beach, and an inland quarry and imaged each sample with a microscope. With the help of a very patient geologist, we learned everything we could about sand, grain by grain. Check out the video above to see the whole adventure in action.