Crossing the Ludicon

I’m excited to announce that I’m starting my own business to research and develop graphics and game technologies, with a focus on the texture and mesh processing pipelines.

My first product is a real-time ASTC encoder that is orders of magnitude faster than existing offline compressors. It targets a small subset of the available encoding space, but achieves competitive quality through carefully crafted algorithms and creative optimizations.

In addition to that I’m exploring middleware products and applications that advance the state of the art in the areas of RDO texture compression, mesh processing algorithms such as simplification and parameterization, and alternative representations for rendering and physical simulation.

For inquiries, contact me at:

BC1 Compression Revisited

The NVIDIA Texture Tools (NVTT) had the highest quality BC1 encoder that was openly available, but the rest of the code was mediocre: The remaining encoders had not received much attention, the CUDA code paths were not maintained, and the accompanying image processing and serialization code was conventional. There was too much code that was not particularly interesting, it was a hassle to build, and required too much maintenance.

This compelled me to package the BC1 compressor independently as a single header library:

While doing that I also took the opportunity to revisit the encoder and change the way it was vectorized. I wanted to write about that, but before getting into the details let’s overview how a BC1 compressor works.

Continue reading →

My DMV Experience

A few years ago I renewed my driver’s license and when the new one arrived I was sad to find it had an error. The first half of my last name had been removed and treated as my middle name.

This is a common mistake that Americans make, but I was unhappy about it and hoped it could be fixed easily, so I made an appointment at the DMV to correct it. I brought my previous license as proof of identification. It had not expired yet, so it seemed to me that it would be a valid proof of identification. However, I was informed that in order to correct the error I would also have to bring my birth certificate.

I then made another appointment and went with my birth certificate. I was born in Spain, so it was a Spanish birth certificate with a certified english translation. Turns out however, that being a foreigner, I would have to bring my passport instead.

Well, one more appointment, and as you may be guessing already, my passport was not enough. I am a permanent resident, so the DMV worker actually needed my green card.

For my last appointment I brought all the requested documents and more, and finally things went smoothly. There was no wait! Employees were polite and helpful! They scanned my documents, and I was able to request a new license with my last name corrected. I was given a temporary license that didn’t have the error, and was told my new license would be mailed in a few weeks. I was impressed!

A few days ago my new license arrived and my last name still had the same error.

“Climbing a big mountain is hard”

That was my son’s conclusion after today’s climb. At 9000 feet his head was aching with that uncomfortable combination of altitude, sun exposure, fatigue, and dehydration that mountaineers are so familiar with. Pyramid would have to wait for us another time. Less than a 1000 feet to reach the summit. So close, but impossibly far at the same time.

This Winter I bought Nacho his first pair of mountaineering boots and crampons. He has been practicing self belay and self arrest over the last couple of years, but it was time to take his climbing to the next level. One of our goals is to climb Shasta. This does not only requires competency using crampons and ice axe, but also fitness and endurance to ascend 7000 feet in a couple of days.

Continue reading →


The ladybug, ladybird beetle, or simply lady beetle, has a special place in our culture: A children’s favorite, loved by gardeners, enemy of aphids, bringer of good fortune. What’s more exciting than finding a ladybug? Finding thousands of them!

Maia holds a lone ladybug by the South Yuba in April 2015.

Ladybugs are migratory insects. Here in California, during the winter months, they travel from the valley to the foothills and clump together at specific spots, typically sunny areas near water, covering rocks and vegetation in a living red carpet.

Continue reading →

Castle Peak 2015 – 2019

Nacho and I climbed Castle Peak together for the first time nearly 4 years ago. He had been asking me to take him camping in the snow and had been saying he wanted to climb a mountain (Mt Shasta! no less). To get him started I decided to take him to Castle Peak and climb it in two days.

I have to admit that back then I had very little experience camping in the winter, but had done it enough times to feel confident taking him along. That said, I didn’t know what to expect, we didn’t have any specialized winter equipment, just our 3 season tent and regular camping gear, we even had to rent our snowshoes! Thankfully winters in California are fairly mild and weather forecasts are pretty accurate, so it was easy to pick a day with good weather and warm temperatures.

Continue reading →

2018 Recap

One of my goals for this year is to write more about our trips and adventures. I’ve been thinking I could write a guide book with all the material that I have, but in order to do that I would have to get better at documenting and organizing it. To get started I’m going to do a quick overview of the trips we did last year.

I thought 2018 was a slow year compared to the previous ones, but now that I sit down and look at everything we have done, I think it’s probably about average. I went on a total of 36 trips, totaling 63 days and 16 nights outdoors. The kids joined me on 24 of those trips (for 41 days and 10 nights). Initially I was thinking I could write a summary about each one, but that would be a very long post! Instead I’m just going to highlight the ones that I enjoyed the most.

None of the trips were particularly challenging. The year was punctuated by several injuries and I’ve been feeling out of shape and more tired than usual. I don’t know if this is a sign of me getting old, or just that I need to slow down and give myself more time to recover. The kids are also growing up, it’s getting easier to take them along, and they both enjoy hiking and climbing, so I’ve been exploring with them more instead of going on personal trips.

Continue reading →

Lightmap optimizations for iOS

One of the main challenges of porting The Witness to iOS was reducing the app memory footprint. The lightmaps that we used in the PC version simply did not fit in the memory budget that we had for iOS.

As described in my previous article, on PC we compress our lightmaps using DXT5-RGBM. The DXT5 texture compression format is not available in iOS, so the first problem was to find a suitable alternative.

Continue reading →

Lightmap Compression in The Witness

In my initial implementation of our lightmapping technology I simply stored lightmap textures in RGBA16F format. This produced excellent results, but at a very high memory cost. I later switched to the R10G10B10A2 fixed point format to reduce the memory footprint of our lightmaps, but that introduced some quantization artifacts. At first glance it seemed that we would need more than 10 bits per component in order to have smooth gradients!

At the time the RGBM color transform seemed to be a popular way to encode lightmaps. I gave that a try and the results weren’t perfect, but it was a clear improvement and I could already think of several ways of improving the encoder. Over time I tested some of these ideas and managed to improve the quality significantly and also reduce the size of the lightmap data. In this post I’ll describe some of these ideas and support them with examples showing my results.

Continue reading →

D3DX UVAtlas released

I think it’s really awesome that Microsoft and Xin Huang released the source code of their D3DX mesh parameterization library. Chuck announced it on his blog.

There’s a lot of good stuff in there, more than in any of the previous D3DX source code releases. I was never too happy with the k-means style clustering that we use in The Witness, top-down spectral clustering seems a much better approach. Also their stretch-minimization parameterization is certainly better than our plain LSCM.

I wrote about our implementation in this article. A few people asked for our code and we released it here. However, today I’d recommend using Xin Huang’s as a better starting point.