Particles : how to control opacity with intanced geo?

Hi,

I’'m trying to control particles opacity overlife, not just like :
life(0)—> math —> alpha (in geo instance)

I would like an opacity curve like that :
opacity.jpg

But I don’t know
1- how to create a free curve CHOP (like the attachment picture)
2- how to apply this curve over particle’s life

Thanks :wink:

If you’re using GLSL…

in float life;
float opacity = smoothstep(0.0, 0.2, life) - smoothstep(0.2, 1.0, life);

When life=0, you have 0-0=0
When life=0.2, you have 1-0=1
When life=1.0, you have 1-1=0

You can do this with Math CHOPs (see en.wikipedia.org/wiki/Smoothstep) but it will be expensive. You’re better off using GLSL for sure.

Hi Julien,
Custom curves can be created a number of ways. The easiest way is to create the curve is with an animation COMP. Set the animation COMP’s playmode parameter to Output Full Range to use the entire curve non time-sliced. To edit the curve right-click the animation COMP and select Edit Animation.

We can also create a custom curves by turning off the trigger CHOP’s time-slice parameter. This is much harder to shape though.

There may be a more elegant solution for controlling alpha over the life of a particle but this was the first thing that came to mind. We could probably turn the image to a curve but I’ll leave that for another day.


Brian
customCurve.tox (2.79 KB)

Thank you!
I don’t use glsl actualy i use particules sop and convert it to chop and instance it in a geometry comp.

Brian, I now have my curve but the opacity is not animated.
How can i do that ?

You can create a custom curve with the animation COMP, and then output its full range to use a s a look up table.

Here’s an example:
particleAlphaLife.tox (3.87 KB)

Thank you Matthew, that’s perfect :wink:
Didn’t know how to use a lookup chop!