Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Expression error in script

New Here ,
Dec 10, 2021 Dec 10, 2021

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

TOPICS
Error or problem , Expressions , Scripting
505
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 11, 2021 Dec 11, 2021

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 11, 2021 Dec 11, 2021

@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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 12, 2021 Dec 12, 2021

I am having trouble when it was supposed to show the mouth open layer but i just dont show up

i tried contacting the devs but they are not responding

 

the close mouth layer is working properly

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 12, 2021 Dec 12, 2021
LATEST

@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

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 12, 2021 Dec 12, 2021

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines