I’m having a problem figuring out how particles evaluate in the graph, and I’ve distilled the issue down to a simple scene. I have a locator moving across a field of black particles. Using an if node, when the locator is within a certain distance of a particle, it turns from black to red. My problem is that I don’t see how to keep them red once they’ve turned so the locator leaves a trail as opposed to a moving red circle; the evaluation runs fresh with every frame, and I see no way to maintain a variable state. I know there's something simple I'm missing here.
How do you save a variable in a particle so it can be used in the subsequent frame?
Solved! Go to Solution.
Solved by ken.ootani. Go to Solution.
You probably want to use the feedback port to save the new state of your particles.
example1 : use the feedback port .
example2 : use influence
example3 : edit simulate_particles
That's awesome! Thanks so much.
One followup question: as I was working on this, I was looking into using feedback connections as a way to send data back upstream, but I don't see how to create them. I've seen feedback connections in compounds for things like velocity calculation, but see no documentation for how to create them.
You need a matching pair of input and output ports on a compound. Then on the inside of the compound, you can right-click on one of them, set it as a feedback port and specify its match.
There is some documentation in Create custom simulations.
I hope that helps,gray
Can't find what you're looking for? Ask the community or share your knowledge.