Copy link to clipboard
Copied
Can anyone help with this script
// Talking Head Expression
aa=thisComp.layer("Talking Head Controls")("ADBE Effect Parade")("Audio Amplitude")(1);
t=thisComp.layer("Talking Head Controls")("ADBE Effect Parade")("Mouth Open Threshold")(1);
mShape = thisComp.layer("Talking Head Controls")("ADBE Effect Parade")("Mouth Shape Open")(1);
thisShape = parseInt(name.substring(name.lastIndexOf(" ")+1, name.length));
count = thisComp.layer("Talking Head Controls").effect("Mouth Open Count")(1);
v_min = t * (thisShape);
v_max = t * (thisShape+1);
linkShapeAudio = thisComp.layer("Talking Head Controls").effect("Link Mouth Shape to Volume")(1);
linkShapeAudio?(aa>=t && mShape == thisShape)?100:0:((thisShape != count && aa >= v_min && aa < v_max) || (thisShape == count && aa >= v_min))?100:0;
This project contains expression errors: errors 1 of 2
Error at line 10 in property 'Opacity' of layer 14 ('Mouth Open 11') in comp 'Ghazi_Front_02'. Expected:., an expression was disabled as a result of an error
Copy link to clipboard
Copied
Check if the expression engine is set to JavaScript (you'll find it in project settings).
If this is the official, unedited Talking Head Expression, check the manual to make sure you applied everything in the correct way.
*Martin
Copy link to clipboard
Copied
@Mrtn Ritter - when you say official talking head, is it the project on AEscripts you're referring to? I only ask because without the whole project its quite hard to see how to tweak the expression to correct the issue.
@CAPTAIN22182291y6s0 if you can post a larger screenshot or indicate where you've got this expression from, it might help.
This : looks like a compressed way of writing an ease or linear, but it's really difficult to tell.
An alternative you cvould look at is Adobe Character Animator. You can bring the characters into AE, use that software to generate lip syncs from audio and copy these values for After Effects, which if you have a mouth shapes comp set up, you can use these copied values with time remapping.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
@ShiveringCactusTalking Head is a plugin from aescripts. You can be for sure that the code works. What I wanted to say was: "Don't fool around with the code, or something will most likely break. If it doesn't work, make sure that you use the plugin correctly."
From the screenshots, we can see that there is no expression error, so the issue lies somewhere else. A cropped screenshot isn't very helpful, therefore I guess:
1. make sure that the mouth layers are in place and visible before applying the code/plugin
2. apply the plugin and have a look at opacity and scale of your mouth layers
3. check that the mouth layers are sill in place and opacity is 100% when a certain mouth should show up
*Martin
Copy link to clipboard
Copied
It probably helps to write code cleanly and separate the lines, at least if I'm reading the ternary expressions correctly:
linkShapeAudio?(aa>=t && mShape == thisShape)?100:0;
((thisShape != count && aa >= v_min && aa < v_max) || (thisShape == count && aa >= v_min))?100:0;
Mylenium