To create a target object, go to GameObject->3D Object->FLuXY->Target. To add a target component to an existing object, go to Component->Physics->FluXY->Target.
Adding a target component to an object will allow it to splat density & velocity onto FluidContainers. This is done by casting a ray from the container's "Project From" transform (usually a camera) to the target, and modifying fluid state wherever the ray hits the container. If no "Project From" transform is provided, the casted ray will be parallel to the container's surface normal.
Containers do not do much on their own other than contain fluid, so if you want any interesting behavior you will need to use some targets for the fluid to interact with. Which targets are splatted onto which containers is controlled by Target Providers.
The target 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.
Material used to splat density and velocity into containers. Most of the time, you should leave this at its default value. If you've written custom shaders to splat targets, you can change the material used.
These parameters affect when/how often the target is splatted onto containers.
Amount of splats performed per simulation step. These are interpolated over time, so very fast moving targets will benefit from more temporal samples.
Amount of splats performed per second. Use this instead of "Rate over steps" if you want a consistent amount of splats per second regardless of framerate.
Amount of splats performed per meter. Useful when you want a target to only splat into the container when moving.
These parameters control target position/rotation/scale.
If enabled, allows you to set the target splat position directly. Otherwise, position is determined by projecting the target onto the container.
Only available when "override position" is enabled. Splat position expressed in normalized coordinates, -0.5,-0.5 would be the container's bottom-left corner and 0.5,0.5 the upper-right corner.
Percentage of randomness applied to the splat position.
If enabled, allows you to set the target splat rotation directly. Otherwise, rotation is determined by the target's transform rotation.
Only available when "override rotation" is enabled. Rotation of the splat (in degrees).
If enabled, the target splat size will depend on the distance from the target transform to the container's surface. This should be enabled if you're going for a pseudo-3D look by projecting targets from the camera onto a flat container.
If enabled, the target splat size will be multiplied by the target's transform scale.
Scale of the splat. This is expressed as a percentage of the container's height, the target's aspect ratio is preserved.
Percentage of randomness applied to the splat scale.
These parameters control how the target's velocity is splatted onto the container.
Amount of velocity splatted onto containers. The velocity texture's blue channel, the velocity scale values and this value are multiplied together to determine the amount of velocity splatted.
Velocity texture splatted by the target. The R and G channels encode the X, Y components of a velocity vector, 0.5 (or 128, if ranged 0-255) corresponding to 0 velocity, just like a flowmap or a normalmap. The B channel is interpreted as a velocity magnitude multipler.
Caps the maximum linear speed of this target relative to a container. This is useful to limit how much fluid is displaced by fast moving targets.
Caps the maximum angular speed of this target relative to a container. This is useful to limit how much fluid is displaced by fast moving targets.
Scales the target's velocity in each axis, expressed in the container's local space. This means the Z axis is parallel to the container's surface normal, X runs along its width, and Y along its height.
Scales the target's angular velocity, expressed as rotation around the container's surface normal.
Constant force applied by the target to the fluid in the container.
Constant torque (rotational force) applied by the target to the fluid in the container.
These parameters control how the target's density is splatted onto the container.
Amount of density splatted onto containers. The density texture's alpha channel, the color's alpha value and this value are multiplied together to determine the amount of density splatted.
Density texture splatted by the target. You can think of this as the shape of the "brush" used to draw on the container. Both the amount of density and velocity splatted are modulated by the density texture's alpha channel.
Source blending mode used when splatting density.
Destination blending mode used when splatting density.
Blending operation used when splatting density.
Color tint applied when splatting density.
These parameters introduce random variations in velocity and density.
Texture to read random values from. R and G channels will be used to generate velocity noise, A channel used to generate density noise. B channel is reserved for future use.
Intensity of curl noise added to the velocity splatted by this target.
Speed at which the noise texture is displaced both horizontally and vertically. Introduces velocity noise variation.
Scales texture coordinates when sampling the noise texture, resulting in zoomed-in/out velocity noise.
Intensity of amplitude noise added to the density splatted by this target.
Speed at which the noise texture is displaced both horizontally and vertically. Introduces density noise variation.
Scales texture coordinates when sampling the noise texture, resulting in zoomed-in/out density noise.