A central aim in ecology is to understand the relation between organism diversity and ecosystem functioning. We investigate this relation using a generic individual-based modelling framework described in part 1, in which individuals within a community are characterised by physiological traits and interact within a spatially structured environment. We explore the effect of intraspecific variation among individuals on community-scale productivity in a range of homogeneous and heterogeneous environments. We show that diversity among individuals has a significant, and in most but not all cases positive, impact on community productivity. At low levels of resource the persisting plants giving highest productivity have slowest uptake rates and longest times to reproduction. In contrast, at high levels of resource the persisting plants giving highest productivity have highest uptake levels and shortest time to reproduction. Thus, the individuals' trait distributions defining community functioning emerge, after many iterations of the model, from the surviving individuals. We, therefore, show that different mechanisms, as evidenced in the surviving individuals' traits, increase community productivity in different environmental contexts, and so demonstrate the importance of accounting for diversity at the scale of the individual. Consequently, progress may be made in linking diversity and function by considering small, manageable systems and making physiological measurements on individuals.