8. Let the complex number $z=\cos \theta+\mathrm{i} \sin \theta\left(0^{\circ} \leqslant \theta \leqslant 180^{\circ}\right)$, and the complex numbers $z 、(1+\mathrm{i}) z 、 2 \bar{z}$ correspond to three points $P 、 Q 、 R$ on the complex plane. When $P 、 Q 、 R$ are not collinear, the fourth vertex of the parallelogram formed by line segments $P Q 、 P R$ is $S$. Then the maximum distance from point $S$ to the origin is $\qquad$ .
$$
\begin{array}{l}
(1+\mathrm{i}) z=(\cos \theta-\sin \theta)+(\cos \theta+\sin \theta) \mathrm{i}, 2 \bar{z}=2 \cos \theta-2 \mathrm{i} \sin \theta, \\
\Rightarrow P(\cos \theta, \sin \theta), Q(\cos \theta-\sin \theta, \cos \theta+\sin \theta), R(2 \cos \theta,-2 \sin \theta) . \\
\text { Thus } \overrightarrow{P S}=\overrightarrow{P Q}+\overrightarrow{P R}=(-\sin \theta, \cos \theta)+(\cos \theta,-3 \sin \theta) \\
=(\cos \theta-\sin \theta, \cos \theta-3 \sin \theta) \Rightarrow \overrightarrow{O S}=(2 \cos \theta-\sin \theta, \cos \theta-2 \sin \theta) .
\end{array}
$$

Therefore, $|\overrightarrow{O S}|=\sqrt{(2 \cos \theta-\sin \theta)^{2}+(\cos \theta-2 \sin \theta)^{2}}=\sqrt{5-4 \sin 2 \theta} \leqslant 3$, equality holds when $\theta=k \pi-\frac{\pi}{4}, k \in \mathbf{Z}$. Thus, the maximum distance from point $S$ to the origin is 3.