Skip to content

Face Transformation #45

@tharuneshwar-s

Description

@tharuneshwar-s

@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions