Help Is Obi Fluid the right choice for this situation? - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html) +--- Thread: Help Is Obi Fluid the right choice for this situation? (/thread-3664.html) |
Is Obi Fluid the right choice for this situation? - Blitz54 - 22-11-2022 Hello! My current project uses Zibra Liquids, but recently they introduced a "Pro" version with a subscription fee. The asset itself worked great, but the ability to collide different fluids together is locked behind the Pro version. Which sucks really, as that was something I really needed, and after spending 100 USD it hurts not being able to use it for my project. So, I purchased Obi Fluids. I played around with it a bit, but I was hoping to get some quick questions answered before digging too deep into it. My project is 3D but locked in a 2D view. It involves 4 players, each with their own slime gun. Similar to Splatoon in ways. As for questions, again I only played a little bit with the assets so I don't need a "How to" just yet, I just want to know if it's possible. First question, am I able to "launch" fluid from an emitter, depending on the direction it's facing? I couldn't seem to find a way to send the liquid in any direction, other than straight down from where the emitter is. Other question, in Zibra Liquids they have voids, where if particles hit the void they are deleted. Is there a similar ability in Obi Fluids? The way my current setup with Zibra worked, was that the player had voids attached to them, and if an enemy slime particle hit that void, it would be deleted and added to the total deleted particles. Once the deleted particles hit the limit I had set, the player would be "dead". The downside to that way was I couldn't have particles stick to the players, so there was no visual effect unless I added something janky.\ Thanks! I may have more questions down the road, but I'll do my best to investigate it myself and read the docs. I just need a starting point. RE: Is Obi Fluid the right choice for this situation? - josemendez - 22-11-2022 (22-11-2022, 06:39 AM)Blitz54 Wrote: Hello! My current project uses Zibra Liquids, but recently they introduced a "Pro" version with a subscription fee. The asset itself worked great, but the ability to collide different fluids together is locked behind the Pro version. Which sucks really, as that was something I really needed, and after spending 100 USD it hurts not being able to use it for my project. Hi! Obi and Zibra use *very* different methods, so depending on the specific details of your project you won't be able to use them interchangeably. First and foremost, Obi is a CPU, fully lagrangian (particle-based) simulator. Zibra is a GPU, hybrid lagrangian-eulerian (grid and particle-based) simulator. The implications are: - Obi's simulations are unbounded, because it does not use grids: fluids can move anywhere in the scene, while in Zibra they are confined to a container area. - Obi cannot simulate very large amounts of particles, because fluid simulation does not happen on a grid: particles themselves are simulated. - For small simulations (around < 2000 particles), Obi will be faster than Zibra. For large simulations, Zibra will be much faster than Obi. - If your game is GPU bounded, or if your GPU isn't very good, placing more burden on the GPU by using Zibra might not be a good idea. Conversely, if your game is CPU bounded placing more burden on it by using Obi might not be a good idea. These general differences sorted, let's go with your specific questions: (22-11-2022, 06:39 AM)Blitz54 Wrote: First question, am I able to "launch" fluid from an emitter, depending on the direction it's facing? I couldn't seem to find a way to send the liquid in any direction, other than straight down from where the emitter is. Yes, just rotate the emitter . There's several emission shapes available, you can rotate all of them to change the direction the fluid is emitted: http://obi.virtualmethodstudio.com/manual/6.3/emitters.html (22-11-2022, 06:39 AM)Blitz54 Wrote: Other question, in Zibra Liquids they have voids, where if particles hit the void they are deleted. Is there a similar ability in Obi Fluids? The way my current setup with Zibra worked, was that the player had voids attached to them, and if an enemy slime particle hit that void, it would be deleted and added to the total deleted particles. Once the deleted particles hit the limit I had set, the player would be "dead". The downside to that way was I couldn't have particles stick to the players, so there was no visual effect unless I added something janky.\ There's no built-in "void" object, because they are trivial to implement using Obi's collision callbacks. Just have a trigger collider, subscribe to collision callbacks and kill any particle that comes into contact with it. The documentation contains a sample that reverses gravity for particles inside a collider, you just have to replace the "reverse gravity" part with "set particle lifetime to zero": Code: ObiSolver.ParticleInActor pa = solver.particleToActor[particleIndex]; Let me know if you need any help with the script. kind regards, RE: Is Obi Fluid the right choice for this situation? - Blitz54 - 22-11-2022 Thanks for the quick response josemendez. I appreciate the quick run down on the differences between the two assets. Thankfully my game is small enough that I think I can use Obi effectively, it'll just involve tweaking the resolution and scale of things, which I see there was a video on as well. I'll be sure to look at the links when I get stuck, the documentation looked very detailed when I checked it out, but I didn't dig deep yet of course. |