The phase inversion process is the most important preparation process of porous polymer membranes. Recently, a numerical model based on first principles to predict pore structures has been proposed (Hopp-Hirschler and Nieken in J Membr Sci 564:820–831, 2018). This model enables a detailed investigation of the mechanism of pore formation in porous polymer membranes. This follow-up presents investigations of the mechanism of nucleation of pores during the phase inversion process in 1D. Pores originate due to accumulation of over-saturated mixtures inside a diffuse interface between homogeneous and demixed polymer solutions behind the precipitation front. This is caused by an expansion of the width of the diffuse interface and time-dependent concentration profiles which finally lead to a change of sign of total diffusive mass flux inside of the diffuse interface. As a result, oscillating compositions behind the precipitation front lead to formation of pores. It is concluded that large surface tension leads to initially small pore sizes. In the second part, a detailed discussion of directional diffusion behind the precipitation front is presented in 2D, which is responsible for different pore structures, e.g., finger or sponge pores. Depending on the dominant direction of diffusion finger pores, lamella structures or sponge pores are formed. This picture can straightforwardly be extended to 3D structures.