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 scale on Football demo #8

Closed
andrewdeutsch opened this issue May 17, 2018 · 6 comments
Closed

Face scale on Football demo #8

andrewdeutsch opened this issue May 17, 2018 · 6 comments
Assignees

Comments

@andrewdeutsch
Copy link

Hey Jeeliz,
I've been using the Football Fan effect as a foundation for a project (it's very very good) and would love to be able to add some elements to the chin. When the mouth is opening, though, the texture image doesn't scale. Can you recommend the most efficient way of making the y scale of the 'mask' respond to the mouth movement?
Thanks so much!

@xavierjs
Copy link
Member

Hi Andrew,

In the function callbackTrack, executed for each frame, the argument is detectState.
You can get the opening of the mouth with detectState.expressions[0] (expressions is an array because maybe in the futur we will add other expressions). This is a coefficient between 0 (mouth closed) and 1 (mouth open).

However, to amplify the movement, you should apply a smoothstep function to this value for example : var correctedSmoothStep(0.3, 0.6, detectState.expressions[0]).

Currently the makeup is applied on a transparent face mesh, rendered above the face.
I think the best way to scale the mask with mouth mouvement would be to have 2 face meshes, one with mouth closed (like the current one) and the other with the mouth opened and to mix them using the mouth opening coefficient as keyframe coefficients.

@andrewdeutsch
Copy link
Author

Thanks, Xavier, that makes sense. I didn't see the blend file for the mesh in the project demo assets. Ideally I'd start with that for the open mouth mesh. For many other projects you have blend assets available. Am I missing it's location?
Thanks.

@xavierjs
Copy link
Member

This is true this is an error we would add it by tomorrow (the developer who had done this demo is in France)

@xavierjs xavierjs assigned xavierjs and bjlaa and unassigned xavierjs May 17, 2018
@andrewdeutsch
Copy link
Author

thanks!

@bjlaa
Copy link
Contributor

bjlaa commented May 18, 2018

Hi Andrew,

The football_makeup demo is pushed in the threejs jeelizFaceFilter demos. You'll find the .blend file for the face mesh here.

I'm currently updating the other available demos with the missing Blender assets.

@andrewdeutsch
Copy link
Author

andrewdeutsch commented May 18, 2018 via email

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

3 participants