Hey guys. I'm familiar with setting up landscapes in UDK with landscapes, and I realize the process isn't much different in UE4, but do any of you know of any tutorials specifically for UE4?
I swear, with an engine they rebuilt from the ground up, you'd think they would've readdressed this by now. The easiest way to paint was actually back in UE2 when the masks for materials was handled by the terrain tool, not a material.
A material for just one substance - grass, sand, rock, etc. can be pretty complex by itself. You start meshing all of those materials together just to get it rocking properly on a landscape, and that's crazy complicated. Do they really need to use materials to tell the landscape 'grass goes here, sand goes here' ?
I'm not sure exactly what changed between UDK landscapes and UE4 landscapes, but the same setups I used before aren't working now.
Replies
They released the landscape showcase in the latest 4.4 update that has quite a complex landscape. It has basically 3 types of material, snow rock and grass.
The material is made of 3 layers created with a material function and then blended with an other material function.
To me the way the system works is a step back in modularity as even by istancing a master material, the master itself has a hard cap on how many types of terrain you can blend.
Imho they should change it to something like the CE system, where you just add a layer and paint it on...it'd be much easier to work with but I don't know how hard it might be to code.
But instead looks like you can import maybe 3 or 4 layers only and then have to do an insane amount of material scripting to blend this in a halfway presentable fashion. It's not sufficient. I hope Epic comes up with something better. Even in the landscape demo with this nutty material it only looks good from from a distance. The blending on close up is pretty ugly for the most part.
Until then, if you can turn off static lighting, you should get back a couple texture samplers. If you use constants for specular/roughness, you get back another texture sampler per layer. If you have an engine programmer and can't wait for Epic, you have them modify the engine to address the 16 texture limit in DX11 mode.
The weightmaps for blending layers with the landscapeLayerBlend material node, also use RGBA. One weightmap texture (that the engine creates) supplies four blend masks. So if you assume that you have all the layers with opacity/weight > 0 across all the landscape components, having only 3 layers means you have one blend just sitting there unused. Along those lines, if you have 5 layers, your inserting an extra weightmap texture sampler just for one layer, you might as well add 3 more layer blends or use normal slope or other blending means instead of hitting that extra weightmap just for one channel.
Also note that the landscape material can have dozens of layers with many samplers, it's the layers actually painted per landscape component that must be under the texture sampler limit, under the hood the engine will make a separate instance for each landscape component with just the layers applied to that section. For example you could have 7, 8, 9, 20, whatever total layers with each having unique Diff, spec, Norm textures, but only apply/paint 4 per component. Even when they increase the cap, you really don't want 9 layers = 20 or so textures sampled in the same pixel space anyway, that would greatly hurt fill-rate performance, and probably affect your texture streaming.
On your layer name in the Landscape Paint mode, right click on it and select "Import Weight Map" - select your 16bit greyscale and poof.
I instead used a splatmap exported from WM and a height layer blend node.
Problem now is that when I try to edit visibility of the terrain, it creates black sections around whatever I edit. I've tried several workarounds to no effect. Looks like using a height blend is a culprit, but it's necessary for my splatmap.
Some world machine to UE4 tutorials would be awesome, preferably by Amir Abdaoui, I love his stuff.
There are a few WM to UE4 tutorials on youtube that have proved helpful