Photometry is the main source of information on NEOs (and other asteroids) en masse. Surveys such as Pan-STARRS and LSST will produce colossal photometric databases that can readily be used for mapping the physical characteristics of the whole asteroid population. These datasets are efficiently enriched by any additional dense photometric or other observations. Due to their quickly changing geometries with respect to the Earth, NEOs are the subpopulation that can be mapped the fastest. I review the state of the art in the construction of physical asteroid models from sparse and/or dense photometric data (that can also be combined with other data modes). The models describe the shapes, spin states, scattering properties and surface structure of the targets, and are the solutions of inverse problems necessarily involving comprehensive mathematical analysis. I sum up what we can and cannot get from photometric data, and how all this is done in practice. I also discuss the new freely available software package for solving photometric inverse problems (soon to be released). The analysis of photometric datasets will very soon become an automated industry, resulting in tens of thousands of asteroid models, a large portion of them NEOs. The computational effort in this is considerable in both computer and human time, which means that a large portion of the targets is likely to be analyzed only once. This, again, means that we have to have a good understanding of the reliability of our models, and this is impossible without a thorough understanding of the mathematical nature of the inverse problem(s) involved. Very important concepts are the uniqueness and stability of the solution, the parameter spaces, the so-called inverse crimes in simulations and error prediction, and the domination of systematic errors over random ones.