In this paper we introduce a generalized concept of field-transforming metamaterials, which perform field transformations defined as linear relations between the original and transformed fields. These artificial media change the fields in a prescribed fashion in the volume occupied by the medium. We show what electromagnetic properties of transforming medium are required. The coefficients of these linear functions can be arbitrary scalar functions of position and frequency, which makes the approach quite general and opens a possibility to realize various unusual devices.