4. Among all the triangles formed by any three of the 8 vertices of a parallelepiped, the maximum number of acute triangles is ( ).
(A) 28
(B) 32
(C) 34
(D) 36
4.B.

Let the parallelepiped be $A B C D-A_{1} B_{1} C_{1} D_{1}$. The number of triangles formed by any three vertices is $\mathrm{C}_{8}^{3}=56$.

In quadrilateral $ABCD$, $\angle B A D$ and $\angle A B C$ are supplementary, so one of them must be a right angle or an obtuse angle. Therefore, among the four triangles formed by any three of the points $A, B, C, D$, at least two are not acute triangles. The same applies to quadrilateral $A A_{1} C_{1} C$.

Since there are $6 \times 2=12$ parallelograms in the parallelepiped, at least $12 \times 2=24$ triangles are not acute triangles. Therefore, the number of acute triangles does not exceed $56-24=32$.

On the other hand, if each edge is $1$, and $\angle B A D=\angle B A A_{1}=\angle D A A_{1}=\alpha\left(\arccos \frac{1}{3}<\alpha<\frac{\pi}{2}\right)$, then $\triangle B D A_{1}$ and 31 other triangles are all acute triangles.