To solve the problem, we start by establishing the direct variation relationship between \( x \) and \( y \). This means we can express the relationship as:
\[ y = kx \]
where \( k \) is the constant of variation.
From the problem, we know that \( y = 8 \) when \( x = 12 \). We can use this information to find the value of \( k \):
\[ 8 = k(12) \]
To find \( k \), we divide both sides by 12:
\[ k = \frac{8}{12} = \frac{2}{3} \]
Now that we have the constant \( k \), we can use it to find \( y \) when \( x = 6 \):
\[ y = kx = \frac{2}{3}(6) \]
Calculating this gives:
\[ y = \frac{2 \cdot 6}{3} = \frac{12}{3} = 4 \]
Therefore, when \( x = 6 \), \( y \) is \( \boxed{4} \).