3D printing provides access to complex multilevel architectures, though the capability to routinely print and integrate structures of controlled porosity is limited. Herein, grayscale digital light projection 3D printing of a polymerization-induced phase separation ink is introduced to directly 3D print functionally graded porous within a single layer from the same ink formulation. The structural properties of materials printed from a single ink are tuned from an effectively dense to a porous material with interconnected pores up to 250 nm. Heterostructures with the physically dense structure of porosity 0.8% and porous structures with up to 23% can be concurrently formed within a layer, with high spatial resolution inherent of this 3D printing technique. Materials with densities from 1.01 to 1.21 g cm−3 are 3D printed in a wicking device and show wicking rates (H2O) from complete diffusion blockage up to 4.5 mm h−1. Furthermore, a proof-of-concept membrane-integrated fluidic device is used for the elemental metal sensing of iron in soil. The presented single-step fabrication of functionally graded materials with pixel-based control within a single layer holds potential for manufacturing and integrating membranes or sorbents for environmental, biotechnology, and healthcare applications.