Add Gradient/Curve For ParticleSystem SpirteSheet (cellIndex over life)

Many Unity VFX Asset needs frame over life to controller the rate of spritesheet, I think this feature can make it easier to port unity vfx to babylon.
ParticleSystem always use gradient to control parameters non-Linearly. Maybe curve is easier and better? I think two control-handlers Bezier curve could be neeeded enough for most of web scenes.

This could be a cool addition and I would be totally up to help reviewing if you create a PR

I think I can have a try this week

1 Like

Hello~ I create a PR to add CellIndexOverlife, you can use this PG to test it in localDev/src

You can see a button in the last of ProperityExplorer:
This is not necessary, I think I will delete it next time:
This use AnimationCurveEditor to editor this curve:

If it is ok, I think I can add velocity/velocityLimit/size overlife like this way.

Before I ll go through the details of the PR lets see with @PatrickRyan what he thinks of the inspector and feature. If all ok, I ll go through the PR and if all good we could add it to the rest ?

After reviewing the PR, it sounds like it would be a pretty large feature and it should be done step by step. The requirements would be to support a curve setup for particle systems with a visual editor.

I have to warn you it is pretty large as a feature to build. It would require step by step:

  1. Adding support in particle system for curve based property
  2. Support serialization/parsing and such
  3. Converting those curves into textures for WebGPU Support
  4. Find a way to bridge those curves into ACE without bloating ACE which is fully animation based
  5. Modify the inspector to embed those setup into it
  6. Add visualization tests
  7. Upgrade Docs
  8. Ship to the world

Those PRs should be done separately and not to master as we can not release half of the feature only so I could create a special branch for your work on the repo where you PR into. At least it would help us review and test only some targeted chunks of work.

Another option for you is to support only gradients for the cellIndex like we do for other properties ?

Let me know what would best work for you.

I create a new branch to continue my work in my github, after I finish them step by step, I will PR again.
My target is make it easy to editor particle, I still think editting curve is more visualler than gradient step

1 Like

I convert curve int textures like Gradient, but I am not sure where it should to be used?
gpuParticleSystem and …?

yup gpuparticlesystem