Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

JP Shep

Switch values within a range every second

Hey,

For a side project I'm working on I'm trying to create random/periodic lighting strikes.

I'm trying to get a line with animated noise on it to increase its length to a set max value, pause for a few frames, return to a length value of 0 then have it hit the max value again after holding its value again.

I have multiple [lines] with different length values (with a point VOP to create the noise)  feeding into a [switch]

I've tried using multiple expressions like floor($F/24) and $F % 2 and a fit range.

I've gotten the values to switch after 24 seconds but not switch back; and to switch back and forth but it does it every frame and it's too fast.  I've also gotten the switch to count up every X seconds (i.e. 1, pause, 2, pause, 3, pause) but not count back down.

Anyone have any ideas?

Edited by JP Shep
typo

Share this post


Link to post
Share on other sites

I thought about it but I wanted to control the switch with an expression rather than keyframe it or motion motion FX

I think I figured it out though.  I have 2 different lines feeding into my [switch] one with a length value of 10 and the other with a value of 0 and then I'm using a pulse expression in my [switch] node to switch between the two values every second.

This is what I'm using right now. pulse($F % 24, 0, 12)  

Right now it's working but I may still need to tweak the values.

Although I'm not sure I can get it to pulse between more than 2 values at the moment.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now