The invention relates to a filter (10, 80, 90) capable of absorbing, retaining and releasing heat and/or moisture of exhaled and inhaled gas, preferably for use in a medical heat and moisture exchanger (HME). The filter (10, 80, 90) has at least one sheet (20, 70) of filter material comprising a plurality of elevations (40, 42 72, 74). Further, the invention relates to a method of forming such a filter (10, 80, 90) by pressing a pattern on the at least one sheet (20, 70) to form the elevations (40, 42 72, 74).