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

Expression Cluster, Zero out 540 slider

Explorer ,
Mar 22, 2017 Mar 22, 2017

Copy link to clipboard

Copied

Like you can see, I have a null object where I have stored some sliders which is hooked/pickwhipped to some shape layers to be able to control the more easily. My problem is how to change the sliders value to 0 while keeping the actual (540) value. I want to make the position where they are now 0 and be able to drag it to make the shape layer go upwards.

Shape layer is connected to null slider and can only move on the y-axis with the expressions I have set up:

temp = thisComp.layer("Control").effect("Slider Control 2")("Slider");

[value[0], temp] 

If you were wondering.

Sorry if its confusing.

Capture.JPG

(Discussion successfully moved from The Lounge to After Effects)

Views

1.1K

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 , Mar 22, 2017 Mar 22, 2017

[@Dave, probably because After Effects has the ability to easily condense control of many layers into one place, with modifiers, making working with complex setups infinitely easier. This is a pretty common practice.]

If I'm understanding your question correctly, you might just need to add a simple offset to your y value.
[value[0], temp-540]

If that doesn't get you where you're going, check out the linear function. It allows you to do things like having 1-100 on a slider correspond to 0-360 in ro

...

Votes

Translate

Translate
LEGEND ,
Mar 22, 2017 Mar 22, 2017

Copy link to clipboard

Copied

You're right -- it IS confusing because it is a VERY strange way to work.  Why on Earth would you want to do that?

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
Explorer ,
Mar 22, 2017 Mar 22, 2017

Copy link to clipboard

Copied

I wanted it to be easier to change the different setting by having everything in one null. Changing 540 to 0 is to be able to see more clearly what the current value is.

It is meant to be a preset-ish kind of project.

Have any alteration proposes?

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 ,
Mar 22, 2017 Mar 22, 2017

Copy link to clipboard

Copied

[@Dave, probably because After Effects has the ability to easily condense control of many layers into one place, with modifiers, making working with complex setups infinitely easier. This is a pretty common practice.]

If I'm understanding your question correctly, you might just need to add a simple offset to your y value.
[value[0], temp-540]

If that doesn't get you where you're going, check out the linear function. It allows you to do things like having 1-100 on a slider correspond to 0-360 in rotation, for example, or... pretty much whatever else you might want. You can turn any number range into another number range, and they don't have to be the same type or "distance," as it were. It's kind of hard to explain in words; there's a good video tutorial here.

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
Explorer ,
Mar 23, 2017 Mar 23, 2017

Copy link to clipboard

Copied

Thanks! adding "+540" after the temp made it center with the slider at zero.

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
People's Champ ,
Mar 23, 2017 Mar 23, 2017

Copy link to clipboard

Copied

LATEST

Yes, for some reason AE maps space with '0' or 'origin' being the upper-most left-hand corner of the composition. So what intuitively seems it should be '0' is actually the halfway point of both total width and height of the composition.  

~Gutterfish

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