In selective laser melting (SLM) and selective laser sintering (SLS) additive manufacturing techniques, the powder spreading process plays a key role in the quality of the manufactured parts. Some of the important parameters that influence the quality of the powder bed are the powder particle size distribution, spreader-type (roller or blade), spreader speed, size and shape of the particles. In this work, we use the discrete element method to study the effect of these parameters on the quality of the powder bed. The interactions between the particles is modeled using Hertz-Mindlin contact model as well as Hertz-Mindlin with JKR contact model with the latter being used for studies of the effect of cohesiveness of particles on powder bed quality. The Dynamic Repose Angle (DRA) is used for validating the numerical models. Our studies differ from the previous studies in that we have introduced quantitative measures for powder bed quality in the form of Discretized Volume Fraction (DVF) and Particle Flow Rate (PFR) for the layering process. With the help of these quantities, we studied various factors that affect powder bed quality: cohesiveness of the particles, spreader shape, particle size and shape, and the distribution of particle sizes. Our results indicate that as DVF and PFR decrease and DRA increases, the potential for cavities and shifting defects increases due to increase in cohesiveness. Use of fixed particle size in the simulations leads to higher DRA than when a normal distribution of particle sizes is considered. Our results show that the roller geometry provides better bed quality as compared to the blade type geometry.