yfeng95 / face3d

Python tools for 3D face: 3DMM, Mesh processing(transform, camera, light, render), 3D face representations.
2.64k stars 609 forks source link

confused about z_axis #84

Open YunYang1994 opened 2 years ago

YunYang1994 commented 2 years ago

confused about z_axis https://github.com/YadiraF/face3d/blob/2fc26906d159a11398cd3e7a9b3f16b6f8937da3/face3d/mesh/transform.py#L142

# at: a position along the center of the camera's gaze.
# eye: the XYZ world space position of the camera.
z_aixs = -normalize(at - eye)   # look forward

why do you need - ? Maybe z_aixs = normalize(at - eye) is better ?

lyyiangang commented 2 years ago

@YunYang1994 In OpenGL, the camera direction is in the reversed direction it looking at. image

more detail in this link

YunYang1994 commented 2 years ago

thanks