Amateur photographers have been trying to figure this out for years, but NASA came up with a cool hack.