The Brooks-Corey capillary pressure model has been accepted widely in the petroleum and other industries. However the Brooks-Corey model cannot represent capillary pressure curves of some rock samples such as those from The Geysers geothermal field. In fact, few existing capillary pressure models work for these rock samples. To this end, a more general capillary pressure model was derived theoretically from fractal modeling of a porous medium. It was found that the more general capillary pressure model could be reduced to the frequently-used Brooks-Corey capillary pressure model and the Li-Horne imbibition model when the fractal dimension of a porous medium takes a limiting value. This also demonstrates that the Brooks-Corey model and the Li-Horne model, which have been proposed empirically, have a solid theoretical basis. The results demonstrated that the new capillary pressure model could represent the capillary pressure curves of The Geysers rock while the Brooks-Corey model cannot. A relative permeability model was also developed from the new capillary pressure model. Fractal dimension, a parameter associated with the heterogeneity of the rock, determines the shape of relative permeability curves according to the new relative permeability model. The model can also be reduced to the Brooks-Corey relative permeability model.