How to make particles flicker?
736
3
1
Hey, I've been trying to make my particles flicker in VEX.
I tried to make it transparent every 5 frames.
This is the code I wrote inside the VEX code window of POPcolor's Alpha:
And this is the result:
As you can see, the particles don't flicker. It goes straight to the "else" statement and never enters the "if".
I am quite new to Houdini.
-
- jsmack
- Member
- 8034 posts
- Joined: Sept. 2011
- Offline
the stratified ages will mean that frameAge%5 will almost never equal 0. Maybe you meant to round it to the nearest frame first?
-
- Tanto
- Member
- 453 posts
- Joined: Nov. 2016
- Offline
I suspect what you're looking for is something like this:
ramp = fit((@age * 24) % 5, 0, 5, 0, 1);
jsmack
the stratified ages will mean that frameAge%5 will almost never equal 0. Maybe you meant to round it to the nearest frame first?
Thanks so much! That is correct, I forgot to round the result.
Tanto
I suspect what you're looking for is something like this:
ramp = fit((@age * 24) % 5, 0, 5, 0, 1);
Thanks that works too.