Three-dimensional (3D) habitat complexity is a primary driver of organism distribution and community structure across ecosystems. Identifying the specific metrics and spatial scales at which complexity is functionally important for communities is therefore a critical component in forecasting ecosystem function. Here we pair fish species traits with multiple metrics from habitat photogrammetry to evaluate the most important measures and scales of 3D complexity driving ecological functions within one of the most structurally diverse ecosystems on the planet: coral reefs. From May to July 2019, we collected high-resolution (1 cm) large- and small-scale intra-habitat (25 m2) structural complexity data across eight reefscapes (∼2500 m2) and conducted co-located fish functional group surveys in the Florida Keys, FL, USA. We used a hierarchical clustering analysis to group 80 observed fish species by four traits related to habitat use (social level, body size, crypsis, activity period) and feeding guild to generate mechanistic predictions about fish-habitat relationships. Evaluating relationships between the resulting trait-based functional groups (k = 9) and four metrics of intra-habitat complexity (large-scale vertical relief, and small-scale vector ruggedness [VRM], VRM deviation, and profile curvature) revealed that trait groups respond independently to the various measures and scales of reef complexity. While large-scale complexity (relief) is strongly related to the presence of solitary, cryptic, nocturnal carnivores, likely due to prey availability as well as day-time refuge opportunities, herbivore abundance is unaffected by increasing vertical relief, potentially due to predator avoidance. Instead, gregarious (i.e., schooling) herbivores increase with small-scale complexity measured by VRM and VRM deviation across reefscapes, while less gregarious herbivores only respond to small-scale complexity when these same measures occur in low-relief habitat, possibly due to a tradeoff between grazing resource availability and predator visibility. Our results reveal how unique elements of complexity provided by both biotic benthic communities as well as large-scale habitat features like vertical relief are differentially important to fish functional groups. The general relationships we identified using traits provide a framework for predicting fish community responses to changes in specific measures of structural complexity on coral reefs globally. Our work illustrates how preserving 3D habitat complexity by protecting or augmenting (e.g., via restoration) structure-forming organisms can support diverse organismal communities and overall ecosystem productivity.