The intermediate effective principal stress has a considerable influence on rock strength as shown by true-triaxial data on intact rock. Therefore, a failure criterion that incorporates all three principal stresses may provide an improved prediction of failure than one that considers only the major and minor effective principal stresses. This study introduces a generalisation method, which converts two-dimensional failure criteria (i.e., Mohr-Coulomb and Hoek-Brown failure criteria) to three-dimensional failure criteria, for the prediction of this true-triaxial data. This method is based on a physical mechanism, and it assumes that the potential failure surface of a material has roughness, which provides additional frictional resistance when the intermediate effective principal stress is greater than the minor effective principal stress. This roughness is introduced theoretically by assuming a repeating diamond-shaped element over the failure surface. These roughness elements have the same dip as predicted by the Mohr-Coulomb and Hoek-Brown failure criteria but are offset by the dip direction angle which is assumed similar to that calculated traditionally from the major effective principal stress direction to the failure surface. With this roughness, it is shown that the major effective principal stress at failure can be predicted using an explicit solution that uses the intermediate and minor effective principal stresses and the Mohr-Coulomb or Hoek-Brown parameters as inputs. This generalisation predicts the same strength as the Mohr-Coulomb or Hoek-Brown failure criteria under conventional triaxial loading conditions, when the intermediate and minor effective principal stresses are equal. Under general stress conditions, this generalisation produces results that are aligned closely with the true-triaxial data as well as other previous theoretical predictions. This method importantly gives a possible physical mechanism for the strengthening influence of the intermediate effective principal stress. This may lead to a more accurate prediction of the rock strength under general stress conditions.