I’ve just released a new version with the following improvements:
Support passing a JobHandle to the Particle System Schedule function, in case the particle job has prior dependencies
Fix job scheduling to ensure jobs are kicked off immediately, rather than not being processed until their results are needed (gives much better performance)
Still waiting for the Burst fix… it sounds like it’s going to be a fix in the Burst package.
There is another new version out, with a fix for errors when trying to pass custom containers (eg NativeArray) to a particle job. Plus we added support for the safety system, which provides you with errors when you (for example) try to write to invalid indices from a ParallelFor job.
Hey all, this feature has been released in the forthcoming 2019.3.0a9 build! You are welcome to continue posting feedback in this forum, and also in the 2019.3 alpha/beta forum if you prefer.
Forgive my ignorance here. So is the basic idea to get the best performance use the api to set custom particle data, manipulate it via jobs, and disable all of the associated particle system component options?
The idea is to be able to modify all particle data in a much faster way than with the old ParticleSystem.GetParticles and ParticleSystem.SetParticles APIs.
You can modify any of the data (position, velocity etc), or, as you say, you can also setup and manipulate custom particle data.
You might be able to get faster performance than the built-in components by re-writing them in jobs (eg Velocity over Lifetime, etc) but we haven’t tested this, and it’s probably not a good use of your time - I would expect the differences to be quite small. The real power of this feature is to write custom code for your particle systems that is not possible via the built-in components.
This is great, I am just finishing up my engine code and I can actually give performance numbers from before and after as well, can’t wait to try this in my framework.
If you have more than one particle system to update, they should run in parallel (unless it’s a sub-emitter) Indeed for the singular case it’s sub-optimal.
It’s shipping in 2019.3 can use the final version in any recent beta version.
An experimental version exists in 2019.1 and 2019.2 but we made breaking changes for 2019.3, so best to start there if possible. Who knows, maybe it’ll make it out of beta soon…
Found your similar answer in some PS-Jobs thread (^ thank you for clarifications! Unfortunatly, I’d can not use PS-Jobs in production, 'cause 2019.3 would realy non-production ready and migration would be painful, but we’re shipping in march 2020 Would experiment with it. Planning to replicate Legacy Lens Flare System with it
sorry if my Question looks stupid :p, but what’s the benefits of using the IJobParticleSystem knowing that sadly there is no way to complement it with ECS ?
is it only for Complexe Particale systems and used to free the main thread by running everything in worker threads ?
is it worth using it even for simple particle systems ?
IJobParticleSystemParallelFor is not IJobParallelFor ? This mean, that I can’t combinate it with other IJobParallelFor?
Somewhere you’ve write that PS-Jobs should be Scheduled int MonoBehaviour callback
OnParticleUpdateJobScheduled. But where it can be created,in MonoBehaviour.Update? FixedUpdate, [UpdateBefore(typeof(Update)]ComponentSystem.OnUpdate?