Go to any business conference and you’ll hear people talking about transformation. For a lot of companies it’s a matter of life and death. Their legacy business is fading, and they need to become something new. The problem is that most companies, like most people, aren’t good at change.

Some, though, are amazing at it. Like those Hasbro toys that start out as a robot but can be bent into the shape of a car, these companies start out doing one thing, then—poof!—flip a few switches and become something else.

Consider Nvidia nvda , a chip company in Santa Clara, Calif., that started out 23 years ago and originally became successful in the somewhat humble business of making graphics boards that videogame fans used to soup up the performance of their PCs. Then, in 2006, Nvidia figured out that its graphics chips could be hooked together to make a supercomputer. Today its graphics processors power many of the brawniest computers in the world, and they will be used in two next-generation supercomputers being designed by U.S. Department of Energy labs. That line of business generates $150 million a year for Nvidia.

But now the chipmaker has spotted a market that could be its biggest opportunity yet: self-driving cars. To make a vehicle autonomous, you need to gather massive streams of data from loads of sensors and cameras and process that data on the fly so that the car can “see” what’s around it. Turns out Nvidia’s graphics chips are great for that. So far, 80 companies, including Volvo, Audi, and Tesla tsla , are using Nvidia technology in their research around autonomous vehicles. “We’re transforming into an artificial-intelligence company,” says Danny Shapiro, a senior director in Nvidia’s automotive group.

Read More: My Year in Startup Hell

Why has Nvidia been such a natural quick-change artist? Well, it turns out that it and other “transformers” have a few traits in common:

Big ears. They listen to customers. Nvidia’s self-driving-car business grew out of a long-standing relationship with auto companies. Car guys used Nvidia chips for computer-aided design, then used Nvidia supercomputer chips to do crash simulations. When the car guys started thinking about autonomous vehicles, Nvidia leaped at the chance to help them solve the problem.

▸ An impatient boss. Transformer CEOs like change and will drive it down throughout the organization. Nvidia’s CEO, Jen-Hsun Huang, is an engineer and a chip designer. He ­cofounded Nvidia and still runs it like a startup.

▸ Active imaginations. Conventional companies try to find new uses for capabilities they already have. Transformers look at what the market needs and then go build it, hiring new people and/or taking people off other jobs.

For more on self-driving cars, watch this Fortune video:

▸ A brush with death. That’s not the case at ­Nvidia, but a close call with the corporate undertaker can sometimes provide a necessary spark. Think of Apple’s aapl multiple rebirths under Steve Jobs.

▸ Finally: Yes, transformation is hard—but not changing can sometimes be fatal.

Dan Lyons is the bestselling author of “Disrupted: My Misadventure in the Start-Up Bubble.”

A version of this article appears in the December 1, 2016 issue of Fortune.