first your going to need a texture mask, you can use this one if you like.
next, the material will look like this. for the easiest workflow, right click on the two colors you are using, and convert them to parameters. the ‘normal height’ parameters i use here are scalar parameters. after you set this up, right click on the material in the content browser and choose “Create Material Instance” then you can modify each of the different parameters to be whatever you want.
For the Best result for the second colors height, use bump mapping instead of multiplying the normal values. Im too lazy to set it up right now but you can read more about it here Using Bump Offset | Unreal Engine Documentation
You can use simple TextureCoordinates node, mask green channel from it, this will give you vertical gradient with values 0 - 1. Then you can control its values with simple math. For example
Ceil(Clamp((gradient - height), 0, 1))
0 - 1 gradient minus 0.5 will give you gradient -0.5 to 0.5. clamp it from 0 to 1 will be 0 to 0.5. and ceil will make all positive values 1.
Also there is material function ValueStep, that do the same thing.
That is working good thank you! Could I use a world position node trough that same setup to move the gradient in world so everything is equal regardless of mesh position?