Compaction bands play a key role in the deformation processes of porous rocks and explain different aspects of physical processes in geological formations. The state-of-the-art description of the localized strains that lead to compaction banding has limitations from the mechanical point of view. Thus, we describe the phenomenon using a consistent axiomatic formulation. We build a viscoplastic model using minimal assumptions; we base our model on six principles to study compaction band strain localization triggered by viscous effects. We analyze different stress states to determine the conditions that trigger compaction bands. Laboratory experiments show that a material undergoes different strain localizations depending on the confinement pressure; thus, we perform a series of numerical experiments that reproduce these phenomena under varying triaxial compression conditions. These simulations use a simple viscoplastic constitutive model for creep based on Perzyna’s viscoplasticity and show how confinement changes the strain localization type for different triaxial tests.