Engineering porosity in polymer-derived ceramics