Particles #756
Replies: 6 comments
-
I was assuming that every engine had their own particle system for VFX. Usually there's a lot of smoke and mirrors involved in them, so I'm not sure if there's much value in adding something like that to a physics engine. That said, technically Jolt already has a particle system in the form of soft body physics. A soft body is a set of particles with constraints, but if you leave out the constraints you have a particle system. The particles are point masses though and not spheres or boxes. |
Beta Was this translation helpful? Give feedback.
-
Use raycasts and a simple bounce behavior. It's what I do in (see here) and it works really well for short lived debris. It also allows you to do performance optimizations, like only enabling the raycasts for objects close by etc, and there is no overhead for creating and managing rigid bodies. And if you were to do GPU particles, what you would get with depth buffer collisions would be worse in quality, you just get more of them. Those effects have to be extremely short lived, otherwise the illusion falls apart. |
Beta Was this translation helpful? Give feedback.
-
Thanks for replies guys. |
Beta Was this translation helpful? Give feedback.
-
Am trying the raycasting particle approach, seems to work quite well, if a little slowly, probably due to raycasting being expensive. Haven't profiled yet tho. |
Beta Was this translation helpful? Give feedback.
-
What you can try is to calculate the bounding box of all particles from a single source and do |
Beta Was this translation helpful? Give feedback.
-
Thanks Jorrit. |
Beta Was this translation helpful? Give feedback.
-
Hi Jorrit,
As part of adding some vehicle effects to Substrata, I want to add some particles. For example, pieces of dirt and dust flung up from tire contact with the ground from a motorbike, or water spray from a boat.
Do you have any suggestions for how to do that in Jolt? Are you planning any kind of particle support?
One possibility is that I do all particles on the GPU, bypassing Jolt, but I thought I would start with CPU-based physics particles and see how the performance is.
I'll probably just start with using low mass bodies with simple shapes (sphere / capsule/ box?) for particles. However this still may be too heavyweight in terms of performance.
One of the defining properties of particles, I think, is that they have negligible momentum, so we don't need to run a full collision and momentum transfer computation when they hit something.
The other defining property would be their small size (point-like). Maybe this can be used for some efficiency gain.
An additional property would be their similarity with each other. This would lend them to being allocated or computed in some kind of batched way.
Anyway what do you think? Custom particle support in Jolt?
Will try with existing capabilities in the mean time anyway.
Beta Was this translation helpful? Give feedback.
All reactions