Fabrication of material patterns by grid-assisted deposition