Skip to main content
ryanf72001922
Participant
July 27, 2021
Question

Need help writing an Opacity Expression that is 0 or 100 not 0 to 100

  • July 27, 2021
  • 1 reply
  • 167 views

I'm using a song and converting the audio to keyframes.

 

I have images of a stop motion that I linked to react to the audio keyframes at certain unit levels. 

 

Everything works great, however my expression "linear(value,20,30,0,100)" is fading up the images via opacity from 0-100. And as you would imagine when you go frame by frame you can clearly see the fading from 0 to 100. 

 

Is there a way to write the same expression but instead of fading 0 to 100 the expression is either 0 or 100? Essentially the image is turned off at 0 or on at 100 no in between fades.

 

 

 

This topic has been closed for replies.

1 reply

Mylenium
Legend
July 27, 2021

Math.round(linear(value,20,30,0,100)%0.5)

 

Mylenium

ryanf72001922
Participant
July 27, 2021

Mylenium,

 

Thank you so much for the quick reply!

 

I've been playing with your expression and the ending "%0.5" was not working. But I changed it to "*100" and it works great now.

 

Thank you again!