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

is it possible to use two expressions at once?

Community Beginner ,
Feb 11, 2022 Feb 11, 2022

Copy link to clipboard

Copied

dear community, i would like to use multiple expressions in the function menu. as seen in the picture, rightt now the data from mocha iiss fillinf up the expression space. i would like to add smooth and clamp functions too. how can i do that?

thanks in advance

TOPICS
Scripting

Views

218

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Feb 13, 2022 Feb 13, 2022

Generally, when you combine two expressions, you assign the result of the first expression to a variable and then incorporate that variable into the calculation for the second expression. In your case though, smooth() only works on the pre-expression value of the property, so you can't do clamp, then smooth, only smooth, then clamp, which would be like this (but probably isn't what you want):

s = smooth(.5,11);
min=[97.0,97.0];
max = [103.0,103.0]
clamp(s,min,max);

 

Votes

Translate

Translate
LEGEND ,
Feb 12, 2022 Feb 12, 2022

Copy link to clipboard

Copied

Of course you can expand and modify any expression as you see fit:

 

mCorner=effect("Corner Pin")(1);


min=0;
max=500;


X=clamp(min,max,mCorner[0]);
Y=clamp(min,max,mCorner[1]);


[X,Y]

 

smooth(0.2,5,time)

 

Naturally, you'll have to fill in some real values as needed for your project here.

 

Mylenium

Votes

Translate

Translate

Report

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 Beginner ,
Feb 13, 2022 Feb 13, 2022

Copy link to clipboard

Copied

thanks a lot!

Votes

Translate

Translate

Report

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 Beginner ,
Feb 13, 2022 Feb 13, 2022

Copy link to clipboard

Copied

hi Mylenium,

now that  i realized that both expressions are not active. only the last expression works. as in this case, only smooth expression is active. any suggestions?

thanks again for your help, i appreciate it a lot

 

mylenium.png

Votes

Translate

Translate

Report

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 ,
Feb 13, 2022 Feb 13, 2022

Copy link to clipboard

Copied

Generally, when you combine two expressions, you assign the result of the first expression to a variable and then incorporate that variable into the calculation for the second expression. In your case though, smooth() only works on the pre-expression value of the property, so you can't do clamp, then smooth, only smooth, then clamp, which would be like this (but probably isn't what you want):

s = smooth(.5,11);
min=[97.0,97.0];
max = [103.0,103.0]
clamp(s,min,max);

 

Votes

Translate

Translate

Report

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 Beginner ,
Feb 13, 2022 Feb 13, 2022

Copy link to clipboard

Copied

LATEST

hi dan, thanks a lot for your quick response. a pleasure to see you in e-person! yes, it is not exactly what i wanted but i am a beginner in expressions and i am very much satisfied. thanks a lot again

dan_image.png

Votes

Translate

Translate

Report

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