How to make particles blink in and out at random?

   1774   4   3
User Avatar
Member
2 posts
Joined: Feb. 2020
Offline
I'm currently working on a very basic particle system with particles that are meant to glow like embers. Does anyone know how to make them fade in and out at random like fireflies?

Attachments:
Skull.PNG (437.4 KB)

User Avatar
Member
415 posts
Joined: March 2014
Offline
Maybe use an animated Cd attribute noise for the particles, and pipe that with a color correction to increase the contrast into the emission channel of the shader to drive the glow ?

R.
User Avatar
Member
2 posts
Joined: Feb. 2020
Offline
Awesome idea I'll give it a try!
User Avatar
Member
11 posts
Joined: June 2021
Offline
I'm trying to do this same thing, did this work? If so, can I see a screenshot of the nodes you used and some settings? I'm trying to do a similar thing but using Octane.
User Avatar
Member
60 posts
Joined: Nov. 2021
Offline
here's a solution using vex

i@id = @ptnum;
float speed = chf('speed');
float rand = rand(@id) * PI;
float randintensity = chf('randintensity');

rand = lerp(1, rand, randintensity);
rand = sin(@Time * speed + rand);
rand = fit11(rand, 0, 1);
rand = chramp('falloff', rand);

vector colorramp = chramp('colorramp', rand);

@Cd = colorramp;

if your particles are coming from POP, just use the existing id attribute. instead of the random function, you could also use a noised attribute that you created with an attribute noise sop (float)

i like this setup because you can gradually introduce randomness and using the falloff ramp create even more complex blinking patterns. make sure to change the colorramp from float to rgb in the "edit parameter interface" menu
Edited by eaniix - Aug. 14, 2023 19:44:43
  • Quick Links