To create a solver object, go to GameObject->3D Object->FLuXY->Solver. To add a solver component to an existing object, go to Component->Physics->FluXY->Solver.
A solver updates the fluid within multiple (up to 16) containers in parallel. This means it is more efficient to have 16 containers assigned to the same solver, compared to having one solver per container.
Another reason for decoupling containers and solvers is LOD. LOD (level of detail) is an important aspect when creating large worlds: simulations that are far away in the distance do not need to be performed at the same level of detail as the ones right in front of the camera.
You can add Unity's built-in LOD group component to a solver, it will automatically adjust the resolution of all containers managed by it depending on distance to the camera. Note that LOD is calculated on a per-solver basis, so it is a good idea to group spatially close containers together and add them to the same solver. The solver's position in the scene will be used to determine distance to camera and hence, LOD level.
Let's go over the solver's inspector parameters:
Storage asset used by this solver to allocate and manage texture buffers.
Desired resolution (in texels) for this solver's textures. This may or may not be granted, the storage asset might provide lower-resolution buffers if that's the only way to keep memory usage below the specified threshold.
Multiplier for this solver's density texture resolution (the velocity texture is unaffected). Using a higher-resolution density texture will result in better defined vortices and crisper looking fluid, without increasing the cost of simulation too much.
If enabled, the texture buffers in use by this solver will be deallocated when the solver gets culled by LOD.
If enabled, the velocity buffers in use by this solver will be read back to the CPU at the end of every frame, allowing you to write C# code that uses the simulation data of all containers managed by this solver.
To read fluid velocity at a point, you must use the container's GetVelocityAt(Vector3 worldPosition) method. Given a world-space position, this method returns the container's world-space velocity at that position.
Material used to update the simulation. Most of the time, you should leave this at its default value. If you've written custom shaders to update the simulation, you can change the material used.
Fluxy uses a semi-fixed timestepping scheme: every frame, the fluid simulation will be updated in increments of "max timestep" seconds. The amount of updates per frame is guaranteed to not be greater than "max steps".
Fluxy uses a semi-fixed timestepping scheme: every frame, the fluid simulation will be updated in increments of "max timestep" seconds. The amount of updates per frame is guaranteed to not be greater than "max steps".
Fluxy has two different solvers available for the pressure projection step:
Only available when using the iterative pressure solver: the more iterations you use, the higher quality and higher performance hit.