  Porous media are often modelled as systems of overlapping obstacles, which
leads to the problem of two percolation thresholds in such systems, one for the
porous matrix and the other one for the void space. Here we investigate these
percolation thresholds in the model of overlapping squares or cubes of linear
size $k>1$ randomly distributed on a regular lattice. We find that the
percolation threshold of obstacles is a nonmonotonic function of $k$, whereas
the percolation threshold of the void space is well approximated by a function
linear in $1/k$. We propose a generalization of the excluded volume
approximation to discrete systems and use it to investigate the transition
between continuous and discrete percolation, finding a remarkable agreement
between the theory and numerical results. We argue that the continuous
percolation threshold of aligned squares on a plane is the same for the solid
and void phases and estimate the continuous percolation threshold of the void
space around aligned cubes in a 3D space as 0.036(1). We also discuss the
connection of the model to the standard site percolation with complex
neighborhood.
