Daniel Terdiman/CNET

SAN FRANCISCO--I'm standing behind Leo Villareal, watching the well-known artist calibrate settings in the software running on his screen. Each time he moves a slider, one of the world's largest art installations -- mounted on one of the world's most-famous landmarks -- changes in an instant.

It's a gorgeous evening on the Embarcadero, San Francisco's eastern waterfront, with the San Francisco-Oakland Bay Bridge dominating the landscape in front of us, and a near-full moon doing its best to overcome the typical evening fog cover. Lights from the city, and from Oakland on the other side of the bay reflect brilliantly in the water. And with just the most subtle adjustments in his custom-designed software, Villareal makes thousands of LEDs strung out over the 1.8 mile-long western span of the bridge almost instantaneously change what they're doing, and how they're interacting with each other.

Villareal is here to finish his work on the Bay Lights Project, the world's largest LED art installation and an epic presentation of the power of programming, imagination, visual arts, and, yes, setting. Encompassing 25,000 one-inch wide LEDs, the light sculpture is strung up on the northern side of the famous suspension bridge and the intent is simple: wow locals and visitors alike with a nightly show of LED artistry on a scale never seen before.

The Bay Lights don't officially turn on until March 5, but Villareal, a New Yorker, has been in town several times recently for nights of what he calls "sequencing," essentially the final programming on the project before the underlying code that powers it is locked down for good. As a result, those lucky enough to get a glimpse of the bridge on a number of nights in the last couple of weeks have been able to see the project up and running, albeit without any of the fanfare that will accompany its formal launch next month.

Lucas Saugen

Long a fan of the project, and of Villareal's other work, I had the privilege of spending some time with him one night recently as he and lead technician Jason Cipriani worked on that final sequencing. To anyone looking at what was happening on their computer, the collection of buttons and sliders would have been boring and made no sense. But to anyone glancing up at the bridge, quiet and majestic in a cool, gentle breeze, the patterns evolving and morphing amid the thousands of LEDs, spreading and undulating, rising and falling, sprouting and diminishing, and responding almost instantly as they made little tweaks in the software, were surely the stuff of lifelong memories.

'All this responsibility'

It's taken two-and-a-half years, a privately-funded budget of $8 million, and the approval of a raft of public agencies. But although Villareal isn't from San Francisco, he knows he's been granted an incredible opportunity to impact the millions of people who will see the Bay Lights Project over its minimum two-year run.

As a result, Villareal, who's no stranger to installing art in very public places, feels a great deal of pressure to ensure that the project delights everyone who sees it, no matter where they see it from. "I feel all this responsibility to make sure it looks great all the time," Villareal said. "I've taken into consideration all the viewpoints, and I want it to be elegant, and sophisticated."

Underlying the Bay Lights experience is patterns. Lots and lots of patterns. And rules to govern them. As Villareal developed the project, he's created a set of algorithmic rules that will determine what people see when they look at the bridge: pre-programmed patterns selected randomly in real time, and played for random amounts of time, blended together and layered on top of each other. And all controlled automatically from a computer mounted on the bridge itself.

The idea has been to generate specific patterns that can do any number of things -- explode, blossom, rise, fall, dissolve, and so on -- and mix them into a nearly infinite number of possibilities. In theory, Villareal explained, a viewer should never see the Bay Lights Project doing the same exact thing twice because what's playing out on the individual pixels (each of the 25,000 LEDs is a single pixel in the overall layout) mounted on the cables high above the bay is based on a deep library of patterns, many of which can be running at the same time, often overlapping each other. "When you make thousands of pixels and all are interacting and maybe some physics [is thrown in], then you see something compelling," Villareal explained. "I'm picking those sequences, harvesting those moments. We're combining them, adjusting speed [and the result is] very painterly manipulations."

Though most of the work had long been done by the time I was out on the Embarcadero with Villareal and Cipriani just a few weeks prior to the official launch, the two are still trying to settle on the final set of sequences that will be part of the locked-down library. By applying the rules Villareal has created, the ones that determine how the wave patterns oscillate, and how much physics to apply to the waves, he's looking for combinations that have real personality, and that almost appear to come alive as they slowly make their way across the 1.8-mile span. If they see new ones they like, they save them, enhancing the library. "It's like an editing process," he said, "constant refinement to end up with the final piece."

Different than on a screen

Back on the Embarcadero, I'm looking at Cipriani's computer, slightly mesmerized by a representation on the screen of the bridge and the patterns playing out across the span's four major sections. But something is definitely missing. Though this representation -- and even a better one in a demo on the Bay Lights Web site -- provides a sense of what the light show is intended to look like, it barely captures the magic of the real thing.

That, of course, is another reason Villareal and Cipriani have been making their way out here from New York for the last few weeks: there's nothing at all like seeing the results of their work on the giant canvas they have at their disposal.

One of the biggest challenges for Villareal was coming up with authoring tools capable of designing patterns in which every pixel matters. That's because, he explained, though the Bay Lights Project is 1.8 miles wide, it incorporates just a tiny fraction of the pixels used in a photo that even a phone can take. "When working with this resolution, it requires a different approach," Villareal said, "where each pixel is important."

That's why Villareal and his team created their own software. After all, there had never before been a need for tools purpose-built for generating 1.8-mile-wide LED animation.

Testing

Testing the Bay Lights Project is, in some respects, just like testing any software. You tweak. You look at the results. You tweak some more. You see how things change. You stop and take a break.

In other respects, though, there's something entirely surreal about this testing. After all, we're talking about something that could hardly be visible to more people. One moment the western span of the Bay Bridge is awash in beautiful, poetic patterns of LED light. And the next, it goes dark. All because someone pushed a single button on a smartphone. Watching Cipriani push that button, and seeing the sudden results, is very cool.

Lucas Saugen

On the computer, controls allow Villareal and Cipriani to adjust things like brightness and contrast and speed. They can turn layers on and off on a whim, and they can also just point their mouse at a spot on the bridge on the screen, and pull the movement of the patterns.

Unfortunately, they're having some technical difficulties tonight. The remote connection between the computer they're working on and the machine mounted on the bridge is having trouble, and they seem to be struggling a bit to get things working as they want.

At one point, all the LEDs -- save for one small vertical line on one of the bridge's towers -- turns off, and Cipriani can't get them back on. He plugs away for a couple of minutes, and then the lights suddenly reappear. Writ 1.8 miles long, this starting and stopping is bizarre. But at least we know what's going on, unlike anyone who just happened to be watching the bridge. Villareal is unphased. "It's an up and down process," he said. "Now we're on, and before we weren't. You just kind of have to roll with it."