As the recession of the early 1980s eased its grip on the home construction industry a couple of years ago, builders Ann and Gary P. Grimm decided it was time to branch out. Ann Grimm took over the couple's home-building operation and her husband started up commercial building and development companies.

Last year, Gary Grimm did about $13 million in commercial projects, while Ann did the same amount of business building and selling slightly more than 100 houses, he said.

The Grimms, based in Fairfax County, are among a growing number of residential builders here and across the nation who are going into commercial development to protect themselves from the ups and downs of the housing market. The devastating effects of high interest rates on the home-building industry in the last recession propelled hundreds of developers into office, retail and hotel projects.

More than half of the National Association of Home Builders' 130,000 members already are engaged in some kind of commercial development, and many more evidently are interested in making the move. Seminars on how to get started in commercial building drew standing-room-only crowds of hundreds at the NAHB's convention last month in Houston.

Now, the time is right for diversification, Robert L. Siegel, a New Orleans real estate researcher and consultant, told builders attending the seminars. For the first time, nonresidential development accounts for more than half of all construction in the nation, he said.

Like many home builders who diversify, Gary Grimm eased into commercial construction by building office condominiums that were a "semi-residential, semi-commercial style." This allows developers to stay with many of the same construction techniques and subcontractors they used when the built houses, and their projects are subject to many of the same building codes as residences.

In the Washington area, Gary Grimm is contributing more than half a million square feet of office and retail space to the growing commercial market this year. He has office buildings under way in Montgomery and Prince William counties, and more projects in the planning stage. The residential construction company his wife runs has two single-family home projects under way in Montgomery County and another in Northern Virginia, and there are plans to start three more projects between now and summer.

The Grimms were seeking security when they decided to diversify, Ann Grimm said. Now, if the economy "goes into a slump, we'll have some variety in our business and will be able to give our employes some stability."

Northern Virginia developer Ray Smith went into the office, hotel and retail construction market last year by teaming up with a large Kentucky-based builder and is now working on "several major projects" in the Virginia suburbs, he said.

The move into commercial development "gives us protection from changes in the business cycle," he said. Smith, who began with residential building when he started his own company in 1981, said it was part of his "long-term plan" to diversify first into land devlopment and then into commercial construction.

"When you build nice residential properties you sell them and end up owning nothing. We want to build and keep, and to build up a portfolio of income-producing properties," he said.

According to Oklahoma City tax attorney Patrick Jon Casey, many builders who followed the same business strategy as Smith "were able to survive in the early '70s or the early '80s simply because . . . they had built and kept an apartment project or two, or retail or office building."

Typically, builders start their careers by building single-family homes. "From there [a builder] will go to multifamily because he has to . . . survive. From there he goes into commercial. The next step is he builds and he keeps," Casey said.

Casey advised his listeners at an NAHB seminar to guage the potential of commercial development by looking at "some of the projects in your town that sold 10 years ago. They're in the wrong part of town; it was built by the sorriest builder you know. And look how much that thing's appreciated in last 10 years. If built by a good builder, namely yourself, in the right part of town, think what it would be worth."

Speakers at the Houston seminar discussed approaches builders can take to enter commercial development. Siegel said the way to diversify is "twofold" -- by either building and managing one's own projects, or becoming a contractor and building for other people. Building for others "is a very fascinating . . . way of getting into this construction because there are so many things to do," including "rehabs, shopping centers, industrial buildings, office buildings. There are a variety of . . . miniwarehouses."

Frederick, Md., builder Michael S. Milliner described a technique he said "does not require a lot of risk or a lot of money" and is "an opportunity to gain a lot of experience working on other people's projects."

He calls the method a "design-built approach," which requires convincing a prospective customer that he or she will save money, time and headaches by foregoing competitive bidding and the services of an architect in favor of putting the development of his project into the developer's hands.

"Anybody who is trying to build something is dealing with so many issues, and they're trying to run their business at the same time," Milliner said at the Houston seminar. "You can be the single person they have to deal with to achieve all their goals."

Medium-sized buildings ranging in cost from $100,000 to $1 million are "in the price range that is absolutely ideal for design building," he said. "A lot of these projects use construction techniques that are not dramatically different from residential construction.

"On the issue of pricing, you can deal strictly on a fixed-fee basis or a fixed price," Milliner said. Or "you can go direct cost plus a fixed fee . . . or direct cost plus a percentage of the direct cost to cover overhead and profit." He advised builders to "decide what's right for you," and then to convince customers to use that pricing method.

This year is expected to be a good one for builders, and a good time to branch out, Siegel said. He predicted a 1 to 1.5 percentage-point decline in mortgage interest rates in 1985, and a drop in the prime rate -- the interest rate banks charge their most credit-worthy borrowers -- to under 10 percent before the end of the year.

He predicted that 2 1/2 million new jobs will be created in 1985, only half of the 5 million in 1984 but still a healthy number.

"The way those jobs are distributed is important, particularly if you're going to get into office construction," Siegel told builders, adding that every person added to the payrolls in an area creates a market for 16 square feet of new general-purpose office space. He noted that the Department of Labor publishes employment information every month, including figures on how jobs are being distributed around the country.

Santa Barbara, Calif., developer Michael Towbes, who started out as a home builder 30 years ago, branched out into commercial projects by erecting office buildings, and then diversified into banking. He is chief executive officer of an $80 million bank in Santa Barbara now, he told builders in Houston.

"If interest rates go up, I put on my banker's hat," Towbes said. "If interest rates go down, I always think of myself as a builder."