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.

First Backpacking Trip

IMG_20140901_091134I finally took Nachito on his first backpacking trip. We went to Desolation Wilderness, and following a friend suggestion we hiked the Pacific Crest Trail from from Echo Lake to Lake Aloha. There’s a boat taxy that takes you from one end of Echo Lakes to the other, and that shortens the hike quite a bit, allowing us to reach a fairly remote location with a real wilderness feel to it without having to walk all the distance.

Continue reading →

Irradiance Caching – Continued

Looks like I’m getting into the habit of starting article series and abandoning them after the first installment. Where’s part 2 of the irradiance caching article that I wrote several years ago? Before starting a new series, I think it’s about time to wrap that one up.

In the final part I wanted to write a bit about our record placement strategy. The main idea was to use the irradiance gradients to control the record density. That was nothing new, in Making Radiance and Irradiance Caching Practical Krivanek, et al also propose adjusting the record distribution based on the rate of change in the irradiance.

However, the interesting observation is that the scale of the gradient is not that relevant, what we care about are changes in the rate of change, that is, second order differences. If a sample has a small gradient and the one next to it has a large one, that’s an indication that the irradiance between the two changes abruptly and that additional samples may need to be taken in between them.

Continue reading →

Irradiance Caching – Part 1

I finally finished writing the next article about the lightmap rendering tech that I did for The Witness. This one is about irradiance caching, and in particular I describe how to estimate irradiance gradients when the irradiance is sampled using a hemicube distribution. I’m afraid the article is a bit too specialized and I suspect it will only be useful to those that are trying to solve this particular problem, but I think it’s good to have this documented anyway.

This time around we are trying something new and we are cross-posting it on #AltDevBlogADay. It seems to me that most of the subscribers to The Witness blog are non-programmers, so this way it may reach a wider audience. Hopefully this will also encourage me to post more regularly!