Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Face Transformation #45

Open
THARUNESHWAR-369 opened this issue Jun 20, 2024 · 0 comments
Open

Face Transformation #45

THARUNESHWAR-369 opened this issue Jun 20, 2024 · 0 comments

Comments

@THARUNESHWAR-369
Copy link

@burnmyletters @KupynOrest @t-martyniuk @NeelayS
Is there any way to replace smplx head with DAD-3DHeads.

SMPLX Head:
image

DAD-3DHead:
Screenshot 2024-06-20 194745

I tried by using DAD-3DHeads Flame Parameters (scale, translation, rotation) and using blender got lips, eyes, nose, ears vertices. And Then applying translation.

Here is the part of the code.

    neck_avg_pos = smplx_body_mesh.vertices[neck_vertices].mean(axis=0)

    # Assuming you have vertex indices for nose, left eye, and right eye in the DAD3d head:
    nose_vertices = dad3d_head_params["dad_nose"]
    neck_vertices = dad3d_head_params["dad_neck"]
    left_eye_vertices = dad3d_head_params["dad_left_eye"]
    right_eye_vertices = dad3d_head_params["dad_right_eye"]

    nose_avg_pos = dad3d_head_mesh.vertices[nose_vertices].mean(axis=0)
    left_eye_avg_pos = dad3d_head_mesh.vertices[left_eye_vertices].mean(axis=0)
    right_eye_avg_pos = dad3d_head_mesh.vertices[right_eye_vertices].mean(axis=0)
    dad_neck_avg_pos = dad3d_head_mesh.vertices[neck_vertices].mean(axis=0)

    dad3d_head_mesh.apply_translation(neck_avg_pos - dad_neck_avg_pos)

    # 4. Combine the meshes:
    combined_mesh = smplx_body_mesh + dad3d_head_mesh

And the combined_mesh output
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant