Fix a smooth sextic curve curve $C = \{f_6(x,y,z) = 0\}$ in $\mathbb{P}^2$, and consider the double cover $X_{f_6}$ defined by $z^2 = f_6$ in the appropriate weighted projective space. This is known to be a K3 surface, and the rank of $Pic(X)$ is known to be generically $1$ (with respect to the choice of $f_6$).
It is known that the rank of $Pic(X)$ may jump for particular choices of $f_6$. For example, there might be a tangent conic or a tritangent line to the curve $C$. The existence of such algebraic cycles follows from the Lefschetz (1,1) theorem, though the beautiful underlying geometry seems specific to the situation.
Now for my question, and I apologize for the lack of specificity, but I would dearly love to see similar examples to this phenomenon. Any and all references would be appreciated. Examples where one has family of polynomials ${f}$ and a family of varieties $X_{f}$, such that one can explicitly (if partially) predict the rank jumping of the transcendental invariants of $X_{f}$ by means of imposing reasonably geometric conditions on the polynomials $f$.