Researchers have designed new "smart windows" that can control the amount of heat and light they let in.

A thin coating of nanocrystals integrated into glass has the ability to "dynamically modify sunlight as it passes through a window," a Lawrence Berkely National Laboratory press release reported.

The futuristic glass improves comfort and convenience, but could also help save energy.

"In the US, we spend about a quarter of our total energy on lighting, heating and cooling our buildings," Delia Milliron, a chemist at Berkeley Lab's Molecular Foundry who led this research, said. "When used as a window coating, our new material can have a major impact on building energy efficiency."

The research team has already successfully created a window that can block near-infrared (NIR) light (which produces heat), while still letting in regular light.

The windows reduce the need for fans, air conditioners, and excessive artificial light.

"We're very excited about the combination of unique optical function with the low-cost and environmentally friendly processing technique," Anna Llordés, who also participated in the research, said. "That's what turns this 'universal smart window' concept into a promising competitive technology."

The glass panes are made from indium tin oxide crystals embedded in glassy niobium oxide.

A "synergistic interaction" in the area where diamond meets glass increase the material's electrochromic potency, allowing for a thinner and more economical coating of the material.

"From a materials-design perspective, we've shown that you can combine very dissimilar materials to create new properties that are not accessible in a homogeneous single phase material, either amorphous or crystalline, by taking nanocrystals and putting them in glass," Milliron said.

Atoms in the glass have the ability to rearrange themselves, controlling the amount of charge it lets through.

The research could also improve the function of battery materials.

"The most exciting part has been taking this project all the way from synthesizing a new material, to understanding it in great detail, and finally to realizing a completely new functionality that can have a big impact on technology," Milliron said.

WATCH: