A geometry-based simulation is used to predict porosity caused by insufficient overlap of melt pools (lack of fusion) in powder bed fusion. The inputs into the simulation are hatch spacing, layer thickness, and melt-pool cross-sectional area. Melt-pool areas used in the simulations can be obtained from experiments, or estimated with the analytical Rosenthal equation. The necessary material constants, including absorptivity for laser-based melting, have been collated for alloy steels, aluminum alloys and titanium alloys. Comparison with several data sets from the literature shows that the simulations correctly predict process conditions at which lack-of-fusion porosity becomes apparent, as well as the rate at which porosity increases with changes in process conditions such as beam speed, layer thickness and hatch spacing.