The method involves preparing a layer for forming a recess portion for cooling medium and/or for forming a determination element. The metal alloy powder in the layer is melted by using energy rays (25) such as a laser beam. An independent claim is included for piston for combustion engine.