Rocks deformed at low confining pressure are brittle, meaning that after peak stress the strength decreases to a residual value determined by frictional sliding. The difference between the peak and residual value is the stress drop. At high confining pressure, however, no stress drop occurs. The transition pressure at which no loss in strength occurs is a possible definition of the brittle-ductile transition. Here we show, using numerical rock deformation, how this type of brittle-ductile transition emerges from a simple model in which rock is idealized as an assemblage of cemented spherical unbreakable grains. Three-dimensional failure and residual strength envelopes determined for this model material illustrate that the brittle-ductile transition is a smoothly-varying, mean stress dependent function in principal stress space. Neither the Mohr-Coulomb nor the Drucker-Prager failure criterion, which are the most commonly used empirical laws in rock and soil mechanics, respectively, adequately describe the dependence of peak strength and the brittle-ductile transition on the intermediate stress (or Lode angle). A semi-quantitative comparison between the modeled peak strength envelope with a selection of existing polyaxial rock data shows that the emergent intermediate stress dependence of strength in bonded particle models is comparable to that observed in rock. Deformation of particle models in which bond shear failure is inhibited illustrate that the non-linear pressure dependence of strength (concave failure envelopes) is, at high mean stress, the result of microscopic shear failure, a result consistent with earlier two-dimensional numerical multiple-crack simulations.