Materials blended by vertex using height on non-landscape

I have two base materials into a master shader that I want blend with vertex paint. I use the BreakMaterialAttributes to blend then convert back to MakeMaterialsAttribute. I blend between the two using a BlendMaterialAttributes.

So far it is working but the transition is unrealistic. I want the height to drive the transition.

How could I do this?

Thank you for your time!

Hey there, what you are looking for is a “HeightLerp.” If you take your vertex color and multiply it by your heightmap, you can create the smooth blending transition you are looking for. Here is an example:

In my example here, I have added several variables to help adjust the transition to my liking. Hope this helps!

Thank you very much, it worked!