Change particle property over time

hi,

i was wondering if there is a way to modify an instanced object under certain conditions.
For instance, i would like to control particles colors / size etc… depending on their position taken from an image.

For now i have made 2 particles system : one using instancing, one using the particle SOP but i have no clue on how i would interact with those particles once they are created.

I imagine it can be done using GLSL but i am looking for node way if possible.

thanks

1 Like

Hi,
I would recommand you to go with instanced particles. In your geo under instance parameters you have a color and a scale parameter, drop there the operators you want to be on control of the scale and color.
Be sure those operators have the same resolution (if you instanced on Tops) than the one driving your particles.

1 Like

hi and thanks.

I don’t think this will work. I would like the particles to move on a canvas and be modified by a picture as they travel. For example have a greyscale texture and have a particle (or a sphere, box etc…) to grow or shrink according to the pixel value of that texture when the particle is at that pixel position.

Don’t know if i make myself clear…

Ok, i think i kind of understand what you want to do.
Is is something like in Instancing Geometry with Mouse interactive in Touchdesigner (터치디자이너 튜토리얼 자막) - YouTube but instead of the mouse a picture ?

hum…seems like. good starting point !
but my particles are not still. I would like them to change color / size as they move on the canvas according to the position / color of each pixels at their (particles) positions

I am not sure to see what’s the problem here.
If you want to share your tox so we can have a look that could help.

i don’t have any tox for now as i am unable to envision how to proceed.
Sorry if i am unable to make myself clear.

Let me try again : i have a texture of 100x100 pixels. I build a particle system on a canvas of that same resolution. I would like to emit or move particles (or instanced objects) on that area. When a particle (or an instanced object) is at (x, y) coordinates, i would like it to change its color to the pixel color at (x, y) on the texture and change its size according to that pixel’s brightness for instance.

Or maybe it is just me seeing problems where there aren’t any. So the answer is probably simple stupid…

Ok, i think i got what you want.
Here is a way to work with it

gallo.tox (2.0 KB)

To explain a bit the process : First you create an instanced canvas on top (with the uv), it’s only on xy (so red and green) and you instanced rectangle (size of the rectangle is 1/res)
You got your grid.
Then (here i apply a noise, but you replace it with your particle top, has to be the same res size as the uv one)
The base size is 1 (the math2 take care of that) but if you have movement then the size will change,
same goes for the color.

Not sure if i am clear here,
let me know how it goes from there.

hi,

thanks a lot for your time and help !

I not sure this is the way to go.
So please find attached a very rough example : it doesn’t have to look this way, this is just a rough example to explain what i am trying to achieve.

So in this example, there is a particle system that emits particles which are flying around. Then i have an image texture (the butterfly). Imagine you overlap the particle and the butterfly texture.

What i am trying to achieve is : when a particle flies over the butterfly, it changes its color taken from the pixel under it. Ideally i would like to change the particle size according to the pixel brightness and where there are no image (alpha) the particle fades (size = 0 or alpha = 0) or it dies.

hope this helps

thanks a lot.

gallo_particles.tox (190.5 KB)

I think i would go on a particle system made on top in order to do that.
In this example i mixed your tox with the one i send you, it’s not clean but maybe it will give you some idea to make it work.

gallo2.tox (192.2 KB)

thanks !

sorry but i don’t get the UV part… and :

  • why there is 2 separate GEOs ?
  • silly question, but where does the image background comes from ? I can’t find a way to get rid of it… :thinking:

For the 2 geos, one is from your particle system (not ideal, that’s why i would recommand to go on a top, or glsl particle system) and the other is for the last render.
The uv component is used to create a grid of rectangle ordered in a square, so the bottom left pixel will be the bottom left instanced rectangle (does it make sense ?)
The image in background is here because the scale of rectangle is determine by the butterfly.
If you want to get rid of it a way would be to multiply math3 with reorder1, and the connect it to null_scale. Then, in instanced2 page of geo1 you replace scalex,y,z by b.
And if you want a stronger scale effect you can connect a math before null_scale and rise the multiply factor.

If you want to learn a bit more about top instancing i made a tutorial (in french, but looks like you are from paris) to introduce the top instancing.

Let me know if i am clear :smiley: