The erosion of hydraulic machines by solid particle impacts is a widespread problem that leads to outage for expensive repairs, efficiency reduction, and cavitation enhancement. Numerical simulations can be used to study the phenomenon, provided they feature accurate thermomechanical and contact modeling. Numerical investigations often assume that the impacting particles are spherical and rigid, with only some recent studies modeling them as elastic polyhedrons or spheres. However, in the specific case of the erosion of hydraulic machines, particles are far from spherical or polyhedral and are less rigid than the base material. The present investigation focuses on the effect of the particle shape and elasticity on the erosion of oxygen-free copper and martensitic stainless steel 13Cr-4Ni impacted by quartz sediments. First, a novel algorithm to generate realistically-shaped sediment discretizations is presented, bypassing the need to use simplified shapes such as polyhedrons. The algorithm is shown to produce particle discretizations of predefined characteristic size that closely follow the objective sphericity value selected, which can cover the full range of sphericity values found in real sediments. Then, the effect of the particle elasticity on the impact damage is investigated, revealing that an error of up to 38 % is introduced by assuming that the particles are rigid. The effect of the particle shape is then assessed. For the case of copper, sharp sediments generate an increase in damage per unit mass of up to 225 % with respect to spherical particles; a comparable effect is expected on the erosion rate. For the martensitic stainless steel, the shape effect is similar in character but significantly weaker in magnitude. The results are analyzed and explained in terms of the known erosion mechanisms and their dependence on the particle shape, the material ductility and hardness.