To create a container object, go to GameObject->3D Object->FLuXY->Container. To add a container component to an existing object, go to Component->Physics->FluXY->Container.
Containers simply contain fluid. Each container exposes physical properties of the fluid in them, such as viscosity or turbulence. Containers are always rectangular in shape, you can't have circular or star-shaped containers, but you can specify their width and height. You can also specify what happens when fluid gets close to the container's edges, and what the initial contents of the container are.
The container inspector is organized into multiple foldable panels. Each one contains parameters pertaining to a specific aspect of the container. Now we will go over all parameters in each panel.
Reference to the solver in charge of managing this fluid container.
All parameters in this panel affect the size and chape of the container. Usually, containers are flat rectangles. You can specify their size and the amount of subdivisons in each axis. However, you can also use a completely custom mesh.
Shape type used for the container. There's 3 options available:
Mesh used as container. Only available when shape is set to "Custom".
Local-space size of this container (in meters). Behaves slightly differently depending on the shape selected:
Amount of horizontal and vertical subdivisions in the container's plane mesh. Only available when container shape is set to "Plane". This is often used together with shaders that implement vertex displacement.
These paremeters control how targets are projected into the container, and whether the container should be facing any specific transform.
Whether the container should just look towards the Look At transform, or copy its orientation.
If not null, the container will orient itself to look at this transform. Typically, a camera transform would be used here.
Transform used as the origin point to project targets onto this container. If null, targets will be projected along the container's normal vector. Typically, a camera transform would be used here.
These parameters let you specify the surface of the container: whether it should be cleared to some specific color/density pattern, and perturb its surface normals.
Texture used to clear the contents of this container.
Color used to clear the contents of this container. Will tint the Clear Texture, if any.
Normal map used to perturb the container's normal. This will affect the fluid's flow direction.
How many times to tile the surface normal map in each axis.
Intensity of the surface normal map.
You can specify what happens at the container's boundaries: fluid can flow trough boundaries, collide against them, or vanish when close to them.
Density and velocity falloff at the edges of the container. You can specify both the width of the falloff region (expressed in normalized coordinates), and the falloff rate. This can be used to fade out fluid as it approaches the limits of the container, hiding the fact that simulation only takes place within the container's area.
Boundary conditions at the container's edges. This determines what happens when fluid reaches the edge of the container. You can specify the condition for the horizontal and vertical edges independently, and there's 3 different conditions to choose from:
The parameters in this panel control how world-space external forces affect the fluid in this container.
Percentage of the container's world-space velocity that gets applied to the fluid.
Set both velocity scale and acceleration scale to 0 if you want the fluid to ignore any world-space movement of the container. If you then constrain the container to an object (using Unity's PositionConstraint component, for instance), the results will mimic an infinite simulation domain: fluid will look as if simulated in world-space, the container being just a "window" into the fluid. You can see an example of this in the included InfinitePool sample scene.
Percentage of the container's world-space acceleration that gets applied to the fluid.
The container's density and velocity contents will be offsetted by this amount (in UV units per second), similar to a regular material's texture offset. You can use this to achieve scrolling effects.
World-space gravitational acceleration applied to the fluid.
World-space external force applied to the fluid. You can use this to simulate wind, for instance.
This light source's information (position, direction, color, etc) will be passed to the material used to render this container. Directional and point lights are supported. This is convenient for shaders that implement some lighting integration, such as the included volumetric shader.
List of target components that should interact with this container. Note the targets listed here will always be considered, in addition to the ones provided by any target provider component (such as FluxyTargetDetector).
The parameters in this panel affect fluid dynamics.
Percentage of internal pressure applied to the fluid simulation. A value of 1 will strive to remove any divergence from the fluid's velocity field, yielding incompressible fluid. A value of 0 will allow the fluid to freely expand and compress.
Viscosity of the fluid. Viscous fluids will flow slower and come to a rest faster.
Amount of fluid that sticks to the surface of the container. A value of 0 means fluid is allowed to flow regardless of density. A value of 1 will not allow fluid to flow at all.
Tendency of the fluid to form smooth, round shapes.
Fluid "swirlyness". This determines the amount of curls and vortices in the fluid.
Density of the fluid relative to the surrounding air. More buoyant fluids will rise up, less buoyant fluids will fall down.
Speed at which fluid density vanishes. You can specify dissipation independently for each of the 4 density channels.