Matthew Leonard
Forum Replies Created
-
Matthew Leonard
July 31, 2014 at 11:20 pm in reply to: Trigger Expression at Certain Value and Loop/CycleDan, you truly are the man. Thanks a ton.
Creator of many visual effects since 2010.
-
Matthew Leonard
July 31, 2014 at 10:04 pm in reply to: Trigger Expression at Certain Value and Loop/CycleAlright, got it. The probability would be something simple like: there’s a 1/100 chance of it flickering, else it doesn’t flicker at all. So each time it hits 100, the probability would run.
Creator of many visual effects since 2010.
-
Matthew Leonard
July 31, 2014 at 8:12 pm in reply to: Trigger Expression at Certain Value and Loop/CycleThanks Dan, that works fantastically. I understand most of it, but would you mind explaining these for me if you have the time?
“n = Math.floor((time – inPoint)/10)” What exactly is this code doing? I understand that Math.floor kind of rounds in a sense, but what would it be “rounding”?
What part/s would I change if I wanted to change the amount of time(it’s at 10 seconds now, so maybe 5,15, or 30 seconds).
How would I include probability in that code? I’m not sure if you can encase an if statement around a bunch of if/else statements.
Creator of many visual effects since 2010.
-
Matthew Leonard
July 31, 2014 at 6:32 pm in reply to: Trigger Expression at Certain Value and Loop/CycleMany thanks for clarifying that. The main effect really is to have a value(opacity in this case) to go from 0 to 100, then to 0 again(gradually, as if I keyframed 3 keyframes over a span of 10 seconds using ease keyframes). When it hits 100, it would flicker between my two set values, and this will happen ONLY when the value is at 100(or between any other values). It will always hit 100 at the same place(starts at 5 seconds, so every 10 seconds since the next 100% keyframe would be on the 15th second), so I’m hoping it’s not too complicated to create just using expressions. It would go from 0 to 100 over a span of 5 seconds, then back to 0 at 10 seconds. The flicker duration would be about 1 or 2 seconds, then it would ease out continuing to 0.
I want to do the above, but with expressions that will loop it. Kind of in a pingpong type manner. I tried doing it with my code and the flickers only triggered at the 100% keyframe, but it only triggered when there was a keyframe there. When those 3 keyframes looped for a second time(using loopOut) and it hit 100% without a second set of those keyframes, it didn’t flicker according to my values set.
-
Matthew Leonard
July 31, 2014 at 7:12 am in reply to: Trigger Expression at Certain Value and Loop/CycleForgot to add one more thing. I’ve been looking over the internet trying to figure out how probability functions, but I cannot figure out how it works or how to make it affect a certain property. If I wanted the probability of it flickering at 100% opacity happening 1/100 times, how would that work? If anyone can, would you mind explaining it? Thank you.
-
Matthew Leonard
July 29, 2014 at 8:17 pm in reply to: Randomly Change Speed Throughout Animation/Video LoopSimply awesome and does exactly what I want, thanks Dan!
-
Matthew Leonard
July 29, 2014 at 7:12 pm in reply to: Randomly Change Speed Throughout Animation/Video LoopThanks for replying Dan. I’ve been looking at you’re website all last night(which is terrific by the way, very comfortable with expressions now) and I think I found what I’m looking for. I found a way around it by using the TimeWarp plugin, but I can’t seem to get the hold to work properly. Also, how would you get different statements into the hold command? So something like these(examples of how it is in my mind, it’s not exact but just the idea):
If (segDur > 5 || segDur < 5) (segDur = 2+holdDur = 1) else(segDur = 10)
If (effect(“Timewarp”)(“Speed”) > 130) (holdDur = 5) else( Continues with random speed )
I’m using the motion script from your website, and these are the only two things I need to get this to work. I hope that this makes sense, and should(hopefully) be a lot less complicated than using time remapping.
segDur = 10
minVal = [80]
maxVal = [150]
seed = Math.floor(time/segDur);
segStart = seed*segDur
seedRandom(seed,true);
startVal = random(minVal,maxVal);
seedRandom(seed+1,true);
endVal = random(minVal,maxVal);
ease(time,segStart,segStart + segDur, startVal, endVal)If (segDur > 5 || segDur < 5) (segDur = 2+holdDur = 1) else(segDur = 10) //Theory
If (effect("Timewarp")("Speed") > 130) (holdDur = 5) else( Continues with random speed ) //Theory