Skip to main content
Inspiring
November 4, 2025
Answered

Expression Selectors and blend modes

  • November 4, 2025
  • 2 replies
  • 171 views

Hi

 

The Range selectors have an Amount and a Mode (blend Mode) property. The Expression Selector does not.
I have an expression that is already working, but I want to add blend modes to it, so it can blend with previous selectors, just like two range selectors can. I have made a very to the bone example, so I can focus on the blend mode funtionality only. I have this expression:

var thisSelectorValue = 100; // (-100..100)
var amount = 50; // (0..100), like Range Selector's Amount

var thisMultiplier = amount/100*thisSelectorValue/100;
selectorValue*thisMultiplier;

The above makes sense. It multiplies the previous selection value for every character with .5. So if they where 100 % selected from the previous selector, they are now 50 % selected. This behavior will be the same as the "Intersect" blend mode.
I'm struggling making an "Add" blend mode. If I multiply the selectorValue with something it works, but if I use addition or subtraction it doesn't. This will do nothing:

var thisSelectorValue = 100; // (-100..100)
var amount = 50; // (0..100), like Range Selector's Amount

var thisMultiplier = amount/100*thisSelectorValue/100;
selectorValue+thisMultiplier;

All I did was to change the * with a +. I would expect characters that where 0 % selected to now be 50 % selected. But that doesn't happen. I also tried adding 50 instead of .5, but that didn't work either.

Does anybody have the clarity to shine some light on this for me?

Thanks,

Jakob

Correct answer Jakob Wagner 2048

The selectorValue is an array [x, y, z] which is why multiplication works and not addition. This will work:

var thisSelectorValue = 100; // (-100..100)
var amount = 50; // (0..100), like Range Selector's Amount

var thisMultiplier = amount/100*thisSelectorValue;
selectorValue+[thisMultiplier, thisMultiplier, thisMultiplier];

// Jakob

2 replies

Jakob Wagner 2048AuthorCorrect answer
Inspiring
November 5, 2025

The selectorValue is an array [x, y, z] which is why multiplication works and not addition. This will work:

var thisSelectorValue = 100; // (-100..100)
var amount = 50; // (0..100), like Range Selector's Amount

var thisMultiplier = amount/100*thisSelectorValue;
selectorValue+[thisMultiplier, thisMultiplier, thisMultiplier];

// Jakob

Roland Kahlenberg
Legend
November 5, 2025

Hi Jakob, thanks for sharing the solution. Unforutunately, there are only a few Expression Selector tutorials to refer to but this one from Luis Martinez is quite interesting - 
https://youtu.be/wgiaNEQit3g


BTW

Very Advanced After Effects Training | Adaptive & Responsive Toolkits | Intelligent Design Assets (IDAs) | MoGraph Design System DEV
Inspiring
November 5, 2025

Yeah, not a whole lot of documentation either but I'm starting to understand how it works.
The video: What!? I had no idea you could do that. Thanks!

Roland Kahlenberg
Legend
November 4, 2025

My brain's a bit fried - can't visualize what you want and the Shape parameter plays a part too ... what I do for intricate set ups involving the Expression Selector is to combine it with one or more Range Selectors and then adjust its Range Parameters, Shape and Mode options and Ease High/Low too can have an effect.

 

Very Advanced After Effects Training | Adaptive & Responsive Toolkits | Intelligent Design Assets (IDAs) | MoGraph Design System DEV
Inspiring
November 5, 2025

Thank you for answering. I don't want any range selectors. I want two different expression selectors and then the ability to blend them together, just like you can with a range selector.
I actually found the solution last night. The selectorValue is an array [x, y, z] which is why multiplication works and not addition. This will work: selectorValue + [50, 50, 50];

// Jakob