Improve world aligned blend transitions?

Hi, I’m trying to get some more natural and varied blending for my world aligned blend based automatic landscape material.
Currently it’s just a gradient based on the angle of the surface.

But I want it to blend into crevices and dips, a bit like this:

I’ve gotten alpha masks working fine with manually painted layers, but I can’t quite seem to figure out a nice way to do this with the auto layer and also keep world aligned blending.
All my attempts so far either yield no visual difference, or I only get transition based on the mask, and not the world alignment.
I can probably mathematically merge the alpha mask and the world aligned alpha in some manner that I’m not aware of, but I haven’t had any success so far.

Does anybody have any suggestions on how to get both or other ways of doing this entirely?

I think that what you are asking is for the Height blend.
you can definitely fake it your self, but at that point you’ll be better off using the landscpae layer blend node and feeding it an appropriate heightmap to get the blend going.

At the same time though, the image you provided wouldn’t be something you make with the landscape at all.
Thats usually done with a mesh that sticks out of the landscape - for multiple reasons I won’t get into.

To get the heightblend done manually, you can use a heightmap as the alpha of the blend.
Assuming you have a painted layer with good falloff, you add that to the heightmap and clamp.
add because 1 +0 is still 1, so whatever got to 1 will remain the full material.

Try looking into curvature node in material. Hope this helps.

That looks very much like the sort of effect I’m looking for. Does it work with normal maps, or would I need displacement for it to find the crevices?
I would test but… I can’t seem to find that node or any information about it?

I think you could drive a color ID map (or pure alpha) based on the curvature to use other normals or to drive displacement. I couldnt find the info on curvature either, it was purely on inspiration from the 3d painting software like 3d coat that i am using.

Alternatively, you could also use curvature map from 3d painting software if you are able to bake from them. That would be the easier option instead of fiddling with unreal materials which can be pretty daunting.

see this link:…rvature-shader

Thanks for the tips! I finally got something working, obviously it’s not very pretty, but it’s a start and the idea is there.

Currently I have two masks that I merge, one gradient that’s the general fading between the dirt and the cliff, and one that’s the mask for the crevices in the cliff to blend the dirt into it.

My main issue right now is that I can’t quite see the math in my head for how to merge them properly. As you can see right now, everything blends into the grass instead of being seperated like in the picture on the original post, due to the mask being added. How should merge the two masks together so that I get the proper results from both combined?

I’m not sure how to explain it, so I hope it’s understandable.

Basically, I like the gradient as a base. But I wish to subtract the mask from the edges where it’s weaker, without subtracting much from the parts where it’s solid. How can I do that? Basically apply the gradient to the mask.

Edit: I kind of got something going by multiplying them together, then subtracting the one of them as inverted.
It made the custom mask I have for the crevices only apply to the edges. but it keeps going into the grass instead of gradually merging into dirt.

Sweet stuff. Awesome!

edit : my simple brain is telling me the easier way is to “layer it like snow”. But that is totally situational and might not suit your purpose. Another way is to “cut off” any numbers that are too low which is causing the muddied blending and add some sort of noise as alpha for transition.

Was this the question you had in rendering?

Like I said there.
ADD then Clamp is your friend when working with single channels.

The add will mix the 2 textures similarly to multiply but differently.
Think about partial values. .25, .5, .75

​​​​.25 + .25 is .5
.25 × .25 is .06

So, if you want to mix 2 textures to get an alpha value the results you illustrated are best obtained with Add instead of Multiply.

The clamp is used to get rid of any data above or below 1 and 0 respectively.

Also, if you need to remove or darken the already dark side you can subsequently (after the clamp) subtract the 1-x of the gradient.