AbstractAimThere is widespread support that species richness increases with the available energy of an ecosystem, but the mechanisms underlying this driver of biodiversity patterns remain elusive. We evaluated gradients of functional diversity to test whether the higher species richness of productive, structurally diverse environments is due to a greater range of niches being supported by the abiotic conditions present (environmental filtering), greater availability of biotic resource and habitat niches (more niches) or increasing functional similarity of species (niche packing).LocationAustralia.TaxonBirds and mammals.MethodsWe used structural equation modelling to evaluate the relative contributions of climatic harshness (actual evapotranspiration, AET) and the availability of resource (gross primary productivity, GPP) and habitat (tree height) niches on taxonomic richness and functional richness, dispersion and evenness. We performed parallel analyses within 15 bioclimatic zones and continentally to evaluate the scaling of biodiversity gradients and the shifting balance between niche‐based mechanisms along environmental gradients.ResultsAll continental diversity gradients were primarily associated with energy variables, but while species richness of both taxa and all functional diversity measures of bird assemblages increased with AET, mammal functional diversity was more strongly associated with GPP gradients. Results were more variable at the regional scale, but species richness gradients along tree height (birds and mammals) and GPP (mammals) within bioclimatic zones tended not to be paralleled by increases in functional richness or dispersion.Main ConclusionsThe niche‐based explanations of biodiversity gradients varied in importance with scale, position on environmental gradients and taxonomic group. At the continental extent, bird biodiversity gradients were structured by environmental filtering by climatic harshness, while mammal biodiversity was related to the increasing availability of resource niches with increasing productivity. Niche packing was more prominent at the regional scale, especially in bioclimatic zones where productivity and vegetation height were less limiting, and in mammal assemblages, suggesting that biodiversity patterns scale differently for birds and mammals.