I used a dice (cube) model and added an extra vertex to the center of each of the 6 faces.
Then (after the dice was thrown) I checked the extra vertix z-position.
The one with the highest position represents the upper face.

(-> vec_for_vertex)