Prototyping Development Log
Creating a customizable water/puddle shader.
Overview of Project
For this project I am challenging myself to create a water/puddle shader/material where you can customize the hue, amount of water, opacity, and height. For this project, I'll be using any tutorials on water materials in UE4. This is a vertex painted shader, so you can paint water on any surface!
Water Amount
Water Amount
Water Clearness
Water Clearness
Water Dampness
Dampness
Water Color
Color
Shader Details
Shader is comprised of 6 sections.
1. Base - This is where the material/shader is getting it's color and opacity information!
2. Roughness - This is controlling how reflective/clear the water looks. As well as the brick material roughness.
3. Normal - Provides normal information for the brick surface and works with vertex painting.
4. VerPaint - This section is what allows you to vertex paint.
5. AO - Controls the AO and Height information for the water.
6. Coordinates - Uniformly scales the textures.
1. Base - This is where the material/shader is getting it's color and opacity information!
2. Roughness - This is controlling how reflective/clear the water looks. As well as the brick material roughness.
3. Normal - Provides normal information for the brick surface and works with vertex painting.
4. VerPaint - This section is what allows you to vertex paint.
5. AO - Controls the AO and Height information for the water.
6. Coordinates - Uniformly scales the textures.
In-Depth Look
The first thing when creating anything for vertex painting, you need a tessellated plane. Otherwise your vertex painting would look too blocky, as there aren't enough verts to paint on!
To make realistic looking liquid and vertex painting, what you need to do is use a heightmap, or "wet map" to provide information on where more water would settle. For example on this brick floor, we used a AO map as a heightmap, the darker areas (cracks) collect more water, and the lighter areas are more dry. You can control the height of this, the amount of water, or dampness, by creating a parameter to set how much the AO map affects this.
For the opacity of the water, we use a fresnel, this basically creates a lens over the water, the higher the paramater the more of an effect it has, therefore, it will show blue (or whatever color) to clear as the color fullness is then controlled by the fresnel, you could have completely clear or completely colored liquid.
To make realistic looking liquid and vertex painting, what you need to do is use a heightmap, or "wet map" to provide information on where more water would settle. For example on this brick floor, we used a AO map as a heightmap, the darker areas (cracks) collect more water, and the lighter areas are more dry. You can control the height of this, the amount of water, or dampness, by creating a parameter to set how much the AO map affects this.
For the opacity of the water, we use a fresnel, this basically creates a lens over the water, the higher the paramater the more of an effect it has, therefore, it will show blue (or whatever color) to clear as the color fullness is then controlled by the fresnel, you could have completely clear or completely colored liquid.
All water features are controllable through a material instance, and scalar parameters.
Painting Water