Patent Document ID: 8456470
Application ID: 12690259
Patent Flag: 1

Claim One:
1. A lighting environment simulation method implemented in a data processing device, the method comprising: (a) triangulating a three-dimensional (3D) model of an object obtained from a storage device into a plurality of triangles; (b) simulating a lighting environment for the 3D model, comprising: (b1) determining a lighting range according to coordinates of a maximum bounding box of the 3D model, (b2) determining a light source position according to coordinates of a center point of an upper surface of the maximum bounding box, (b3) determining a lighting cone according to the light source position and the lighting range, taking a rotation axis of the lighting cone as a light ray S along a lighting direction, and taking a height of the rotation axis as a lighting depth; (b4) dividing the lighting depth into n sections to obtain a set of points on the lighting depth; (b5) calculating a distance between each point on the lighting depth and the light source position; and (b6) calculating an attenuation coefficient K of each point according to a corresponding distance; (c) determining an actual display color for each triangle of the 3D model according to an original color of the 3D model, an intersection angle between a light ray S along the lighting direction and a normal vector of the triangle, and a distance between the triangle and the light source position; and (d) projecting the 3D model onto a display device according to coordinates and the actual display color of each triangle of the 3D model.