# A High-Resolution Texture Mapping Technique for 3D Textured Model
## The Proposed Texture Mapping Method
### Mesh Parameterization and Packing  
After mesh partitioning, the 3D model can be separated into several disk-type mesh groups. This series of mesh groups is flattened onto the 2D domain based on an angle-preserving and conformal mesh parameterization. The main idea of this parameterization method is to make the difference between angles in the 3D and 2D domains as small as possible. Several topological constraints are also applied during the optimization of the angles to ensure the topological correctness on the 2D domain. The proposed angle-based flattening method sets three kinds of mesh-topology constraints, namely, triangle, vertex and wheel consistencies, as shown in Figure 3a-c. This series of topological constraints can be formulated as the following objective function in a linear system:  
\[\left[ \begin{array}{cccc}10101&&\cdots&0\\ \vdots&&\\ 10110&&\ddots&\vdots\\ \vdots&&\\ cot(\varphi)Oct(\omega)&0&\cdots&0\end{array} \right]\left[ \begin{array}{c} \varepsilon_{1}\\ \varepsilon_{2}\\ \varepsilon_{3}\\ \vdots\\ \varepsilon_{n\times 3}\end{array} \right]=\left[ \begin{array}{c}180-(\alpha+ \beta+\gamma)\\ \vdots\\ 360-(\theta_{1}+\ldots\theta_{d})\\ \vdots\\ (log(sin(\varphi))-log(sin(\omega)))+\ldots\end{array} \right], \tag{3}\]  
where \(n\) is the number of meshes; \(\varepsilon_{i}\) is the error of the angle on the \(i\)th mesh; \(\alpha\), \(\beta\), and \(\gamma\) are the angles on each mesh; \(\theta_{d}\) is the angle around the inner vertex; \(d\) is the number of angles around the inner vertex; and \(\varphi\) and \(\omega\) are the angles on two adjacent meshes, respectively, corresponding to the common edge. Equation (3) is essentially \(Ax=b\), where the errors \(\varepsilon_{i}\), \(i=1\ldots\ n\times 3\) can be minimized. The optimized angles on the 2D domain can then be obtained by adding the errors and the original angles together. The new vertices on the 2D domain must be calculated in accordance with the optimized angles. Let three vertices of a triangle be \(\mathbf{e}_{1}\), \(\mathbf{e}_{2}\) and \(\mathbf{e}_{3}\), and the corresponding angles be \(\alpha_{1}\), \(\alpha_{2}\), and \(\alpha_{3}\), respectively. The calculation of the new vertices on the 2D domain uses the following least-squares approximation:  
\[Q_{obj}=min\sum_{j}\left[\left(e_{3}^{j}-e_{1}^{j}\right)-\frac{sina_{2}^{j} }{sina_{3}^{j}}\mathbf{R}_{a_{1}^{j}}\left(e_{2}^{j}-e_{1}^{j}\right)\right]^{2}, \tag{4}\]  
where \(\mathbf{R}\) is a rotation matrix with angle \(\alpha_{1}\), and \(j\) is the \(j\)th iteration. Assume that the two vertices \(e_{1}\) and \(e_{2}\) of a triangle are known. Equation (4) employs the known vertices \(e_{1}\) and \(e_{2}\) to optimize the unknown vertex \(e_{3}\), where \(Q_{obj}\) is the objective function for the optimization. For all 2D meshes, if the first two vertices on a mesh can be determined, the remaining vertices can be evaluated by using the least-squares approximation [11], which is formulated as a set of linear equations. The topology of all vertices on the UV domain can be maintained correctly. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Object**} & **Number of** & **No. of Initial** & **No. of Final** & \multirow{2}{*}{**Total Time (s)**} \\  & **Meshes** & **Seeds** & **Charts** & \\ \hline \multirow{5}{*}{Shoe 1} & 4500 \({}^{\star}\) & 10 & 10 & 0.246 \\  & 10,000 & 10 & 30 & 1.812 \\ \cline{1-1}  & 20,000 & 10 & 66 & 7.075 \\ \cline{1-1}  & 30,000 & 10 & 111 & 18.431 \\ \cline{1-1}  & 40,000 & 10 & 148 & 31.603 \\ \cline{1-1}  & 50,000 & 10 & 202 & 44.574 \\ \hline \hline \end{tabular} \({}^{\star}\) used in the case study herein.  
\end{table} 
Table 1: Time consuming for mesh partitioning. The parameterized mesh islands are all independent. This series of mesh islands needs to be packed together onto the UV map. The UV map is essentially a kind of image that records all 2D meshes and is of the same image size as the texture map. The process of collecting all mesh-islands and converting them into the UV map is called packing.