In the past decades, the structure of the heart, human as well as other species, has been explored in a detailed way, e.g., via histological studies or diffusion tensor magnetic resonance imaging. Nevertheless, the assignment of the characteristic orthotropic structure in a patient-specific finite element model remains a challenging task. Various types of rule-based models, which define the local fiber and sheet orientation depending on the transmural depth, have been developed. However, the correct assessment of the transmural depth is not trivial. Its accuracy has a substantial influence on the overall mechanical and electrical properties in rule-based models. The main purpose of this study is the development of a finite element-based approach to accurately determine the transmural depth on a general unstructured grid. Instead of directly using the solution of the Laplace problem as the transmural depth, we make use of a well-established model for the assessment of the transmural thickness. It is based on two hyperbolic first-order partial differential equations for the definition of a transmural path, whereby the transmural thickness is defined as the arc length of this path. Subsequently, the transmural depth is determined based on the position on the transmural path. Originally, the partial differential equations were solved via finite differences on structured grids. In order to circumvent the need of two grids and mapping between the structured (to determine the transmural depth) and unstructured (electromechanical heart simulation) grids, we solve the equations directly on the same unstructured tetrahedral mesh. We propose a finite-element-based discontinuous Galerkin approach. Based on the accurate transmural depth, we assign the local material orientation of the orthotropic tissue structure in a usual fashion. We show that this approach leads to a more accurate definition of the transmural depth. Furthermore, for the left ventricle, we propose functions for the transmural fiber and sheet orientation by fitting them to literature-based diffusion tensor magnetic resonance imaging data. The proposed functions provide a distinct improvement compared to existing rules from the literature.