摘要 |
The present application discloses a 3D model rendering method and apparatus and a terminal device. The method includes calculating, in a diffuse reflection illumination situation simulated by hardware, dot product operation results of a light vector and a normal line vector of each vertex on a surface of a 3D model, converting the dot product operation results of each vertex to corresponding UV coordinate values, then drawing, according to a preset correspondence between UV coordinate values and a color value of a 3D model basic texture after receiving light, a gradient map having a color value corresponding to the UV coordinate values of the each vertex, and covering the surface of the 3D model with the gradient map. The rendering method according to the present application transfers a conventional process of coloration in a three-dimensional model to drawing a gradient map in a two-dimensional plane and then, further covering the 3D model with the drawn gradient map, has a simpler processing process, and also reduces a performance requirement on an electronic device in a process of performing 3D model rendering. |