21-05-2021, 09:18 PM
Have been using the Obi tools for a few weeks now, it's a fantastic set of tools and the softbody particle simulation is kind of genius. I've been exploring various use cases for a game in development and have noticed a few bugs and issues and had some and some features that would be great to see implemented.
Bugs and issues:
Again, it's a fantastic tool set and I'm just beginning to experiment with how we can integrate it with our current game design so please let me know if any of these features can already be done in some way. The code is nice and clean and I'll be able to extend it further to add features like these, but other people would probably get use out of them too as they seem like common use cases for games.
Bugs and issues:
- Obi Emitter Min pool size doesn't work when set to 1. Fix is to swap the > on ObiEmitter.cs line 462 for a >=.
- Obi Emitter speed variable for flow rate doesn't work well for very low-resolution fluids (e.g. 0.1 resolution). I've found a few cases where decoupling emission force and emission rate was useful.
- Certain settings can make the solver lock up and you have to kill the Unity process. I know this isn't an easy one, but is it possible to have the solver stop and throw an error if the process is taking too long?
- Alternative phase system: The Phase system for filtering which particles interact with which colliders feels kind of reversed, we can only select one phase to NOT interact with so there's no way to limit specific particles to a specific collider. Is the current implementation necessary for a performance or stability reason?
- Random emission: Obi Emitter shapes generate a distribution of points to spawn particles at, and it emits particles at them sequentially, resulting in predictable patterns. Could we get an optional pseudorandom distribution order? Possibly do this at the distribution point generation time to minimise performance issues?
- Manual EmissionMethod: The current system is great for continuous or burst emission of fluid, but to integrate it with most games will require programmatic emission of a controlled number of particles. It'd be good to add a Manual emission type where it doesn't emit until a method is called to emit a specific number of particles.
- More particle kill methods: Right now all particles must have a life span set and are killed at the end of that. I'd love to get some alternative kill methods, like if I could emit 100 particles with no kill time and then manually kill them later, or maybe make particles killed by velocity or collision force or minimum connections (like individual disconnected particles self-destroy). Just feels like there's a lot of room for expansion here.
- Convert fluid to softbody blueprint: This is a bit of a crazy one, but could we get a way to solidify a set of fluid particles together in their current shape, or to make them transform into a shape provided by a softbody blueprint?
Again, it's a fantastic tool set and I'm just beginning to experiment with how we can integrate it with our current game design so please let me know if any of these features can already be done in some way. The code is nice and clean and I'll be able to extend it further to add features like these, but other people would probably get use out of them too as they seem like common use cases for games.