Obi 3.4: What’s new
Obi 3.4 is close to release. It focuses on rendering particles and fluids, and we wanted to devote some time to writing about its most prominent features.
One of the most common complaints about particle-based fluid simulations is that they look jelly-like or blobby. And for a reason, since the underlying representation is a bunch of spheres. One way to alleviate this is to squash and stretch particles so that they adapt better to the shape of the fluid’s surface.
Let’s give a warm welcome to:
Anisotropic particles
For each particle in the fluid, Obi 3.4 calculates a covariance matrix and decomposes it into its three principal vectors (and their respective lengths). This information captures the size and orientation of the particle’s neighborhood, the new and much improved particle rendering system uses it to draw stretched ellipsoids instead of spheres.
- Obi 3.3: chubby fluids
- Obi 3.4: smooth fluids
The result is a smoother, more detailed fluid surface: thinner sheets and tendrils, smaller drops, without the need to use more particles. These additional calculations degrade performance by 5-10%, but allow you to obtain much better looking fluid with fewer particles. So the benefits usually outweight the drawbacks, both performance and visuals-wise.
If you still like the old blobby look or want a subtler effect, you can control the maximum amount of stretching a particle can undergo, all the way down to none. At this point the extra computation cost associated to anisotropic particles disappears and you’re back to the good old system.
In motion it looks way cooler:
Custom Fluid Rendering
In 3.4, we’ve paved the way so that advanced users can easily write their own completely custom fluid rendering pipelines. We now also include two default fluid renderers that make use of this new rendering architecture: ObiFluidRenderer (the traditional, high-quality one) and ObiSimpleFluidRenderer (meant for less powerful GPUs, like those in mobile devices).
Hope you enjoy it!
The VM Team
Having problems getting FluidShader.shader to compile: Unity 2017.3.1f1
SetupEyeSpaceFragment and GetWorldSpaceFragment are shown as undeclared identifiers
Solution: add the following line after the ObiParticles include statement:
#include “ObiFluids.cginc”
Please add a sample scene to the new mobile-friendly Simple fluid renderer