Open jinwoo-li opened 2 years ago
it is a hardworking
float fxa = 0.0;
float fya = 0.0;
float fza = 0.0;
for (int t = 21451; t <= 22220; ++t)
{
fxa += tmpObj->VertexArray[t].X;
fya += tmpObj->VertexArray[t].Y;
fza += tmpObj->VertexArray[t].Z;
}
fxa = fxa / (22220 - 21451+1);
fya = fya / (22220 - 21451 + 1);
fza = fza / (22220 - 21451 + 1);
PosXYZ s1;
s1[0] = fxa;
s1[1] = fya;
s1[2] = fza;
PosXYZ p1 = R_active_x(xAngle, s1);
PosXYZ p2 = R_active_y(yAngle, p1);
PosXYZ p3 = R_active_z(zAngle, p2);
glLoadIdentity();
gluLookAt(0, 1.5f, 40, 0, 1.5f, 0, 0, 1, 0);
glTranslatef(p3[0], p3[1], p3[2]); // 正方体的中心从(0.5,0.5,0.5)移动到(0,0,0)
glRotated(fEyeRatio, 0,1, 0);//绕(1,0,0)
DoDrawObj(tObj1, 4, 21496, 22295, true,fxa,fya,fza);
DoDrawObj(tObj1, 4, 21496, 22295, true,fxa,fya,fza);
//DoDrawObj(tObj1, 5, 22296, 23093, true);
//glLoadIdentity();
//gluLookAt(0, 1.5f, 40, 0, 1.5f, 0, 0, 1, 0);
fxa = 0.0;
fya = 0.0;
fza = 0.0;
for (int t = 23021; t <= 23790; ++t)
{
fxa += tmpObj->VertexArray[t].X;
fya += tmpObj->VertexArray[t].Y;
fza += tmpObj->VertexArray[t].Z;
}
fxa = fxa / (23790 - 23021 + 1);
fya = fya / (23790 - 23021 + 1);
fza = fza / (23790 - 23021 + 1);
s1[0] = fxa;
s1[1] = fya;
s1[2] = fza;
p1 = R_active_x(xAngle, s1);
p2 = R_active_y(yAngle, p1);
p3 = R_active_z(zAngle, p2);
glLoadIdentity();
gluLookAt(0, 1.5f, 40, 0, 1.5f, 0, 0, 1, 0);
glTranslatef(p3[0], p3[1], p3[2]); // 正方体的中心从(0.5,0.5,0.5)移动到(0,0,0)
glRotated(fEyeRatio, 0, 1, 0);//绕(1,0,0)
//Sclera right Iris right DoDrawObj(tObj1,6, 23094, 23893, true,fxa,fya,fza);
//DoDrawObj(tObj1, 7, 23894, 24691, true);
//两个6 7
//lacrimal fluid
//DoDrawObj(tObj1, 8, 24692, 25017, true);
//blend
//DoDrawObj(tObj1,9, 25018, 25047, true);
//occlusion
//DoDrawObj(tObj1, 10, 25048, 25175, true);
//DoDrawObj(tObj1, 10, 25176, 25303, true);
//eyelash
//DoDrawObj(tObj1, 11, 25304, 26383,true);
glDisable(GL_BLEND);
bFrist = false;
hello. Thanks for your great work and sharing.
When I check the blendshapes associated with the eyeballs, the eyeballs don't move.
When I checked the shapes of eyeLookOut/In/Down/Up_R/L, the mesh around the eyes moved but the eyeballs did not. In the demo on the homepage, the pupil is moving, but is it correct that the pupil does not move in the light model?