Tweaking The Waterfall Visuals¶
Waterfall Body Properties¶
We can set the waterfall body color to either a Solid Color or a Gradient Color. If we choose to use a Gradient Color, the Gradient Offset property controls how much to shift the gradient-line midpoint position (where the middle of the color transition should be).
The Gradient Offset property range: -0.5 → 0.5
We could apply up to 2 textures (main and secondary) across the waterfall body.
The texture should have its wrap-mode set to Repeat or Mirror in the texture import settings.
Body Texture Sheet Properties¶
The main or the secondary texture could be a regular texture, or a texture-sheet (a texture consisting of many frames) by toggling the Is A Texture Sheet property on, and then specifying the number of columns and rows and also setting how many frames to play per second.
Body Texture Opacity¶
The Opacity property controls the visibility of the texture.
Body Texture Scrolling Speed¶
We can make the texture scroll vertically by tweaking the Scrolling Speed property.
Body Texture Tiling Mode¶
Regarding the texture tiling properties, there are two tiling modes:
Stretch: The texture stretches when the waterfall object size changes, always keeping the same number of tiles we specify for the X and Y directions.
Repeat: The texture repeats when the waterfall object size changes. In this mode, we specify the scale in units of a single tile.
Body Texture Offset¶
We can provide a texture offset regardless of the selected texture Tiling Mode.
Body Texture Distortion Effect¶
Distortion Scale - Offset¶
The Mathf.PerlinNoise(x,y) function is used to sample the Perlin noise texture values. The Scale and Offset properties controls the sampled area size and origin, respectively.
The Scale And Offset properties are used to generate the noise texture (which actually happens only in the editor), and as such they are not animatable.
The Strength property, as the name suggests, controls how strong the distortion effect is.
The Speed property controls the noise texture scrolling speed.
The Tiling property controls the scale of a texture noise texture tile relative to a waterfall body texture tile.
A value of 0.5, for both the X and Y axis, will apply the noise texture across 4 waterfall body texture tiles.
We can use the Tiling property to lower the distortion strength across one axis, and keep the full strength across the other.
Waterfall Left-Right Edges Properties¶
Left-Right Edges Thickness¶
We first specify how thick the left and the right edges are.
Left-Right Edges Texture(s)¶
We can use two different textures for the left and right edges, or we can simply use the same texture for both edges by toggling the Use Same Texture property on.
In case we decided to use the same texture, the Flip Texture property controls whether or not we want to flip the texture when it gets applied across the specified edge horizontally.
By toggling the Alpha Cutoff property on and tweaking the cutoff value, any pixels with the alpha value below the cutoff threshold will be considered invisible. This might be useful if we would like to add some irregularities to the left and the right edges.
The description of the left-right edges texture(s) properties is the same as the waterfall body texture properties, as discussed here.
Waterfall Top-Bottom Edges Properties¶
Top-Bottom Edges Thickness¶
We first specify how thick the top and the bottom edges are.
Top-Bottom Edges Texture(s)¶
We can use two different textures for the top and bottom edges, or we can simply use the same texture for both edges by toggling the Use Same Texture property on.
In case we decided to use the same texture, the Flip Texture property controls whether or not we want to flip the texture when it gets applied across the specified edge vertically.
The description of the top-bottom edges texture(s) properties is the same as the waterfall body texture properties, as discussed here.
Waterfall Refraction Effect¶
Under the Refraction Properties in the waterfall material inspector, we set the refraction effect distortion properties.
The refraction distortion properties description is the same as the waterfall body distortion effect properties, discussed here.
Waterfall Refraction Layers¶
Under the Refraction Properties* in the waterfall component inspector, we use the Objects To Render*** property to select which layers to include in the refraction rendering.
Waterfall Refraction Render-Texture Properties¶
If the Use Fixed Size property is toggled on, the Size property sets the refraction render-texture width and height.
But, if the Use Fixed Size property is toggled off, the refraction render-texture will have a dynamic size, and the render-texture width and height are in this case equal to the the waterfall object visible area on screen width and height. We can even downscale this computed size by lowering the Resizing Factor property value.
Lastly, We can set the refraction render-texture Filter Mode property to either Bilinear or Point.