Forum

Flickering particle colors

Hi all, first post here! Still very new at v4, so apologies if this is a silly question, but here’s what I’m running into: I’m trying to apply a simple color spread to a particle grid, but I’m seeing odd behavior. Some gridlines get the correct gradient, but others have a mysterious offset. Also, during the particles life the colors keep changing. Can anybody explain what is going on here?

I’m not sure how to add a patch (or if I even can as a new user) so here’s the v4p contents on a pastebin:
https://pastebin.com/SNuBskqK

Here’s a screenshot, the arrow points to the few lines that are correct:

Well you are not addressing the color correctly…
Guess you can upload your patch to some fileshare…

You can solve that yourself, you have 1200 particles, i’m pretty sure you have less color count then that, you need to apply select somewhere to repeat colors according to particles…

Thank you for your reply. If I understand correctly, a Select node can be used to stretch or shrink a spread, kind of like Map does for values. In my case I just want it to repeat this single line every row in the particle grid.

My final goal is actually to convert an image into a particle grid (using the Pipet node), but I though it would be simpler if I used a basic color gradient to clarify my question. I’ve uploaded the patch here:
https://gofile.io/d/NtrDAI

So far the only solution I’ve found is to create a grid of selection boxes, so I can apply the correct color to each of the 20x20 particle spawn areas. But this is very heavy and will crash v4 unless I keep the amount of selection boxes below around 10x10. Is there a better way to do this?

Patch: https://gofile.io/d/zNVVf1

maybe @tmp can have a look at this?

the modifier you use will be run every frame.
however, you should give each particle the color only once, at the beginning of its life cycle. that will prevent any flickering.

you can do this either by setting it right at the start with your Emitter, or by using a Selection of all particles that have just been created and setting the color for only those.

Have a look at the help patch of the “Emitter (DX11.Particles.Emitter Layer)” node.
That’s the easiest way to convert an image to a pointcloud.

Sorry for the late reply, work got in the way. The “Emitter (DX11.Particles.Emitter Layer)" method turned out to be the easiest method to get the effect I was looking for. Thanks @tmp!

I’m still curious about what caused the flickering in my original attempt. I’ve tried both solutions @velcrome suggested, but I didn’t find a way to set the color in the emitter itself and a Selection based on Age (set the color in all particles less than .2 seconds old) still gave me the flickering effect. I guess it has something to do with the Dynamic Buffer, which is still a bit of a mystery to me.

For now I have what I was looking for, thank you all!