In the second life, the most important realization is the realization of personas, it is not based on the first perspective, but the third perspective of the way to achieve, so each inhabitant in the second Life is a virtual Persona representative. This structure of the society is colorful, first take a look at the following characters image:
Cai Junsheng 2008/01/14 qq:9073204 Shenzhen
Cai Junsheng 2008/01/14 qq:9073204 Shenzhen
From the above, see all kinds of characters, wearing different clothes, posing different posture, various forms. To achieve such a persona display, more code is needed to achieve this. First of all, its grid is more complex, there are many triangles to construct such a complex figure, just the head of the triangle grid size, there are 1.6M size. Second, its skeleton animation is also more complex, these require a large number of transformation matrix composition. Again, is to achieve a lot of characters at the same time the calculation of a large amount. The process of implementing personas is to load the hair, eyes, head, upper limb, and lower extremities before pasting the corresponding texture picture.
In the second Life, in order to speed up the display of characters, and did not put the figures of the grid data on the server, but with the client to download together. Now let's analyze how to load the grid data from the file. As follows:
1. Llvoavatar::llvoavatar () constructor
Initialize personas.
2, Buildcharacter ();
Constructs a persona.
3, Loadavatar ();
Loads the persona.
4, Loadmeshnodes ()
Load the character's grid node.
5, Llpolymesh::getmesh (Info->mmeshfilename);
Loads the role's data by name.
6, Mesh_data->loadmesh (Full_path)
Reads the grid data from the file path name.