[eng] In this work, two sets of selective laser melting (SLM) process parameters were used alternately to produce a layer-structured NiTi sample. The transformation behavior of the sample shows that austenite transforms gradually into martensite over a wide temperature range (~ 130 K) during cooling. A microstructure composed of alternating layers of austenite and martensite is observed at room temperature. The sample shows excellent damping performance and the Elinvar effect, which originates from the gradual formation of martensite. This work suggests that SLM could serve as an effective way to directly fabricate functionally graded materials.