I’m currently working on texturing a map that is about 400,000 x 200,000 km in size, as such, it would make sense to build a dynamic texturing system that blends textures based on pre-defined heights and angles (snow textures applied at certain elevations, etc.) I’ve been trying many different methods and none of them seem to work.
I already know how to align textures to angles (rocks on cliffs, grass/dirt on flat land), I plan on merging that with this.
I know there is a way to do this, but UE4 does not seem to have a node for it anymore…
World_Aligned_Blend only calculates direction, not actual world-space values. Which is good for blending textures based on slope (rock on cliffs, grass on flat land) but not at all what I’m looking for.
I’ve already managed a partial solution to this myself. The only problem is that currently I have a bounding-box uvw node, where each landscape is composed of many bounding boxes, meaning I’m getting uneven results.
As you can see in the second pic, this configuration stops working at the gridlines, when I plugged world-aligned blend in place of {bounding box based 0-1 uvw} the entire terrain becomes the snow overlay I have plugged into this. Which is by no means what I intended.
What I really need is a node that references either world-space vectors or object-space. Large terrains are composed of multiple bounding boxes, which is why my “solution” is not adequate.
We’ve both already looked at that page. It only show how to blend based on terrain angles. Ill repeat my comment and that it probably lies within the mf terrain height lerp
That node doesnt determine where the textures can be located based on the elevation of the landscape. Im about to get off work and play with some texture functions like the mf terrain height lerp. And im not sure how to use that with the world align blend node. It jacks up when i try to paint on it
Finally after enough poking around and mental hardship, I’ve come to a solution for blending textures based on elevation.
The “divide” node controls where the blending starts along Z (also -Z, this will duplicate results on both positive and negative values, so make sure you’ve the lowest part of your terrain above 0 if you want to use this for oceans and lakes) For me, I had to set it to divide by 140 to get reasonable results.
Note: my example is not entirely finished, as this elevation blend will later be combined with an angle blend, to more realistically show how snow sits on a mountain. Still wont be perfect, but may be believable.
And here’s how it currently looks with my angle-calculations added to the blend. Hopefully this isn’t just beneficial to me, but to everybody having the same problem.
Note: this can also be made into entire biome “Layers” For example, I want a temperate layer, and a desert layer, and painting them dynamically textures the terrain according to pre-defined parameters.
I’ll post the material setup once I’m done cleaning it up, haha.
And yes, additional textures can be painted using a [layer blend] node. This setup should be on your first layer, addition textures (or alternative elevation setups like mine) can simply be painted like any other layer. This is necessary, in fact. As this landscape setup only creates a massive, generalized environment, it cannot do much fine detail work, for obvious reasons.
Ive figured something out but i have to divide by 4mil for some reason lol. And im not sure where that Absolute world position node is located? And i dont see any changes by deleting all those multiplyers
The multipliers sharpen the results, which I wanted for my map, you don’t necessarily need them, and there may be a way to replace them with something else.
Simply type WorldPosition, it’s under coordinates. Yours will look a little different than mine.
you did the dot function first, yes? I’m not sure why you need to divide that high. My test map’s landscape was aligned at 0 on Z, btw. If your landscape is below there, you’ll get different results. As they’re present across both the negative and positive values of the Z axis. Also, my test map stretches to the heighest point UE4 will support, which may be why my results don’t need such a large divisor.
You can use Power under math. And plug a vector 3 into the main material nodes World Position Offset input and raise the z value to lower the center of ur material. I have mine now set up where the ocean is at the very bottom of what unreal can do and the snow at the very top. And if u haven’t figured it out already just invert the snow function to create an ocean layer at the bottom. Oh and in order to paint i assume u have to run this through a landscape layer blend? Are you able to do that?
Yes, it’s simple. Instead of plugging a texture into the layer function, just plug this whole setup into the first layer. You can use it the same as you would a single texture, except this already plans out the bulk of the painting. I believe I already mentioned this though?
and yes, I was going to replace the multiply nodes with an exponent function.
Sorry about that, I’ve not had much time to work on things until recently. Here is a general overview of what my current material setup looks like, I’ll try to post a more detailed view as well…