Making water: Step 01 figuring out what I'm about to do
Before anything else, I first want to understand what I have to do to create this very challenging material. I have yet to see a perfect water material created in unreal 4, and in attempting to make one, I need to make sure I know what I'm doing. to begin, I'm going to look over some tutorials. Here are some links, to sites and blogs i will use to begin understanding the material:
Material Properties:blend mode must be set to Translucent to give the water the ability to have its opacity effected. It must be set to two sided. Screen Space Reflection should also be turned on. This effects the way the material reflects materials on its surface. The lighting mode should be turned to Surface Translucency Volume, which I assume effects the way light hits this material so that it looks translucent, but not fully clear, but am still unsure. It also seems I want to turn off separate translucency, and turn on responsive AA. I 'm not sure why. Tessellation seems as though it may be important, and some seem to turn the tessellation mode to flat tessellation. This should be helpful with creating larger waves.
Diffuse:I'm going to have to create a lerp between two colors of water (light and dark), and I'll need to create a depth fade node. The depth fade has an opacity and fade distance depth, which determines what depth in the object it will fade from, nodes. This allows for a blend between how transparent an object is and the fade distance creates a feathering effect on an intersection. https://youtu.be/2BxrGjPcirk
Metallic:Some Claim that the best thing to do here is to maximize this to get a reflective surface.
Roughness:Seems to be set to an arbitrary, some what high value (0.8). I assume this will stop the material from becoming shiny.
Emissive: Some seem to use Emissive to create a fake shimmering effect. this could be useful or it could not be. the setup for this seems to use the coordinate set up of the normal ripples and use a noise like texture to create a sparkle.
Opacity and Refraction Parameters: What I can assume to be one of the most important elements of water, This also includes a depth fade node and a Fresnel. These seem to be multiplied together, then they are plugged into opacity and refraction, being multiplied by scalar parameters useful for adjusting the effects on the material in real time.
Normal Maps: to create a water ripple effect, the goal here will be to pan two normal to create a wave effect. this will require two normal textures, where their RG textures are masked with a component mask node. An absolute world position node will be needed to, I assume, create some consistency in the rippling effect. this allows the water materials to blend seamlessly if they are butting together, or no matter how you scale the material. Both panners should be set to the speed at which the normal should pan. The absolute word position seems to be used as the main coordinate setting system, divided by a scalar parameter, I assume to sort of clamp the values in this material, so they don't exceed vertex space. this divided value is plugged into the coordinate space of the panners which calculate the speed that the normals pan.
Wave Speed and height: now onto the more advanced areas of the material, here I seem to be attempting to give the material a dynamic surge, imitating the rush of a wave. this will use another absolute world position node, sine nodes, a time node, and a ConstantBiasScale node. The ConstantBiasScale allows you to adjust things on a scale; so it lets you add and multiply consistently. this is useful for changing values, such as sine waves. these node values will be brought together and then plugged into the word position offset of the material to create a waving effect in the full material, while the normals continue to pan on another "beat".
Ways To make Water Dynamic/ Change: Change wave types if ocean like, with possible sea foam effect. need some tessellation to create some bigger waves. when creating translucent water, a shore line, and a water depth could be very important, as well as the ability to build it in a blue print so that it can be placed and changed dynamically in the level. without it set as a blue print, there is a possibility, it's height values may make it project badly.
Important Nodes: Distance node: two inputs, a or b input and output must be the same. vector 3 and vector 3, or float and float. object position and camera position >> divide by 512 >> should give you a 0, 1. This can create a LOD kind of thing.