Builders in a dozen U.S. communities, aided by federal officials who persuade local governments to waive zoning and building code regulations, have been experimenting with new construction techniques and site plans to cut the cost of housing.

But after two years of struggle, the only thing that has produced really substantial savings has been higher density -- smaller houses on small lots -- something neither suburban communities nor potential home buyers are enthusiastic about.

As inflation and rising interest rates have pushed housing prices up in recent years, more and more Americans have been unable to afford new homes, to the dismay of the housing industry. The dozen housing developments are the first to be completed in the solution to the "affordability problem" proposed by builders and the Department of Housing and Urban Development.

Under the plan, called the Joint Venture for Affordable Housing and launched two years ago, municipal and county governments are urged to waive zoning requirements, streamline the permit approval processes and ease building codes to save builders money and time.

But the vast majority of the savings reported so far are the result of building more and smaller homes on less land than local regulations allow, and critics question whether a significant number of local governments will routinely waive, or change permanently, their requirements.

"They've made all these savings by badgering local governments for higher density and getting it because this is experimental," said one.

HUD Secretary Samuel R. Pierce Jr. told a conference of home builders this week that projects have been finished or are in some phase of planning and construction in more than 20 states.

"We hope by the end of 1985 to have them in all states" and "we hope housing can be built 20 percent more cheaply" than now, Pierce said.

The department touts the joint venture as one of its major programs and a prime example of letting the private industry sector solve problems without government funds.

HUD's role is to provide "direct encouragment and technical assistance," according to a department statement on the project. In a recent statement Pierce said the joint venture "has demonstrated that unnecessary local zoning and building regulations often add significantly to the cost of housing."

"Higher density is almost essential to increase housing affordability . . . particularly for first time home-buyers," said Michael Shibley, the NAHB's director of land use and environmental affairs who has been monitoring the progress of the joint venture.

He said he believes some local governments will be willing to make permanent regulatory changes allowing higher density, but concedes that otherss will not.

Density "is a sensitive issue and must be approached with care," Shibley said. "It doesn't lower property values" as many homeowners and local officials believe, he said.

Communities chosen to take part in the demonstration projects "had already demonstrated . . . a willingness to modify regulations and to take other steps to encourage local development," according to a case study of the Phoenix development prepared by the NAHB.

In the Phoenix project, the first to be completed and sold out, Knoell Homes Inc., erected 255 units using a special planned residential development zoning category approved by city officials. The town houses and detached homes were priced at $45,000 for a 770-square-foot town house up to $63,000 for a 1,163-square-foot home, in contrast to the average cost of a Phoenix home, $85,300 in July 1982 before the Knoell development was built.

The company spent $1.36 million, or more than $8,000 per unit, less than it would have on the 149 units it planned to build before deciding to take part in the joint venture program, the case study said. Almost half the savings, $3,676, came in land development costs, most as a result of using less land, and $2,198 per unit for building more units allowed by the PRD zoning, shorter processing time and elimination of a bonding requirement.

Arkansas developer Rex Rogers built 104 homes on 12.52 acres of land in Crittenden County in another demonstration. His per-unit cost was $4,789 less than it would have been under existing zoning, $4,500 of that amount saved as a result of the reduced lot size.

Builders say they are delighted with the results of the experiment so far, and the cooperation of local governments in waiving zoning regulations, allowing narrower streets, eliminating requriements for sidewalks and rights of way, and granting other concessions.

A recent HUD announcement said case studies of completed projects will be used to encourage other local governments make regulatory changes, and said many national organizations and local governments have shown "a great deal of interest in and acceptance" of the program.

The number of the new, low-cost homes resulting from the demonstrations will be a few hundred or less in a project in each state, with with little assurance that other local governments will be willing to follow.

"Every city is different and regulatory change is a slow process," said NAHB's Shibley. But "I'm encouraged."