For conventional patterning (optical or x-ray microlithography and micromachining) a mask with a substrate reasonably transparent to desired radiation is used. A new technique - transfer mask or sacrificial patterning - is described in this paper. The technique is based on forming absorber pattern directly on the surface of the sample. This method is suitable for any radiation (visible light, UV, X-rays, electron and ion beams) and allows use of a conventional master masks (optical or x-ray) with low, medium, high (submicron) resolution to achieve patterns with desired aspect ratio. Multiple exposures and sequential developments can produce patterns with extremely high aspect ratio. New lithography techniques, such as in-situ development, UV and x-ray radiation assisted chemistry (etching and deposition), can be easily realized by using this transfer mask technique. Forming the transfer mask directly on the sample opens new possibilities not available with the conventional masks: exposure of samples with curved surfaces and dynamic deformation of the sample surfaces during the exposure, etc.