I decided to use today’s holiday on UE4
at first I tried working on my character stuff but (as every time I do) it wasn’t long till I hit a blocking halt (this time wanting to use the TPP animations on my character, till I found that different skeleton retargeting won’t come until 4.5)
so I moved to something also interesting, my attempt at making a semi-procedural landscape material.
I’ve seen quite a few threads with some nice landscapes, the WorldMachine seal is there so the quality is undeniably good most of the time.
however I believe the more the topology should change for gameplay purposes, the more ‘off’ those nice fullsize color/depo/etc maps will look. need to flatten a bit to put a house on top of that hill? sorry but all those nice details will look out of place then.
the more changes you might need to your landscape, the more hassle it will become to go back to WM, adjust, re-export everything, re-import, repeat. instead I believe using the in-editor would improve the workflow quite some.
The idea is to create a nice automatic blending of ground types vs. rock/snow based on slope, altitude, etc. these ground types will then come from the (manual) layer painting to have diversity areas like beach, grass, desert, etc.
so after spending a little time making a testcase landscape I imported it into Unreal with one diffuse texture. nothing fancy yet, just the coloring macro that comes in WM which is the looks that I’ll be trying to replicate and improve upon
next up will come the actual work on the material
for reference I’m also posting a view that shows how dense the landscape is in relation to my character (which is as tall as the UE4 character), as well as the full-scale size of the landscape (roughly 2.3x2.3km)
this goes out to people like Malkav!an and Ulrich Thümmler, I think you’re fond of this stuff
so the first move was to try some slope-based blending. the technique used in the Stylized Landscape showcase was a good start but the results were causing too much extremeness based on the height (because naturally there’s steeper slopes in the mountains)
by altering the Blend Bias based on the world height I was able to even out the extremes and bring some green to the mountain tops without flooding the low lands with greenness
to add a little variety to the green areas I added a coat of soil ground to surround it, and so the blending between grass and rock will look better
not much more can be done for the valley grass I’m afraid, as the topology is perfectly smooth in those areas. that’s where I expect the textures and different ground types to give a helping hand
and so concludes today’s adventure. I don’t know when I’ll have time to touch this again but at least I hope it insipires someone :o
A post of the material setup would be awesome. My way around the problem of using layer weights is to export the height map from UE4 after all changes have been made and bring it back into World Machine. Then I connect it up and re export my splats. Obviously this is time consuming and it would be much better to do it all in the material.
there’s plenty of room for improvement, but sadly I’ve hit some limitations already.
the first thing is that I realized that to have different Physical Materials in a landscape (so there can be different footstep sounds/particles where you step) the only way to do it is to have a different PhysMat per layer. with the current material setup this would result in the same sound/particle for snow, rock and grass.
I think I’ll post a request on the answerHub but I don’t have high hopes for it edit: made the AnswerHub question about physical materials]
the second thing is that from what I saw, I pretty much hit the limit of the things I can play with it to make procedural stuff in the material. namely I only have the slope values and nothing else to use.
I wanted to attempt the creation of something similar to the flow maps I’ve seen from some WM terrains, and for what I would need the heightmap or at least the geometry normalmap in a texture so that I can offset it and compare it with the non-offset one. I made an AnswerHub question about the Heightmap in the material] but went to second page in less than 2 hours. again I don’t have high hopes for it (answerhub is too crowded and it seems epic has their own kinda-rigid agenda of features)
and beside that I’m out of ideas on how to do stuff procedurally other than using slopes and pure height values.
at this point the only thing I think I could do would be to generate and update layer splatmaps from code at editing time dynamically, but I would need to grab the editor source and either try to make a plugin or modify the behavior directly. all of this is not nice and would take weeks to do and I’m not even confident I would be able to.
so I’m open for suggestions
also I haven’t decided on the public exposure on this yet. maybe I’ll sell it on the marketplace for $1
don’t expect many updates btw. like I said I barely have time to work on this (too focused on finishing my main project), but whenever I do something new I’ll post updates
You can paint different layers based on height and slopes. In my landscape material i set the different textures based on slopes to different layers instead of lerping them together. Little downgrade is you have to paint the layers on the landscape manuel (bit like cryengine). But it took me only 5-10 minutes with biggest brush on a 4k landscape.
thanks for the tip, but if I want to stick to my procedural approach it won’t really be useful
to explain it in different words, the idea is to be able to get a nice setup that contains different surface types (soft ground / rough ground / cliff ground / snow), different for every layer. so the paintable grass layer will have [soft grass / rough soil / cliff / snow] while the paintable desert layer will have [soft sand / rough sand / desert cliff / snow], and so for whatever other ground type group I come up with.
this way I only have to paint “areas” in my landscape (just 2 different layers to paint for the 8 textures I described, instead of 8 layers). and also this way I never have to care and waste time about where to paint cliffs vs ground or if it looks natural (cause it’s done procedurally).
what you’re suggesting would not allow me to have such variety of materials, or have nearly as much proceduralness as I want.
plus, using the results of using just the slope are not interesting, as you can see in the image of my second post (the one with the label ‘WorldAlignedBlend * Height’) - if I use purely the slope information I’d get a result like the left part, but (only) the stuff I do in the material allows me to have the result like the right part
sadly though, if at least my PhysicalMaterials answerHub request doesn’t go through I’ll probably have to change my approach
Hey, maybe you miss understood me. My material is procedural :). But keep in mind, if you do it with 8 layers you can use height blended layers like the pictures in the link. https://docs.unrealengine.com/latest/INT/Engine/Landscape/Materials/index.html#landscapelayerblendnode.
Do the same with a single layer for grass, rock, mud and so on is much more complicated i think.
You dont need much more time to apply the material. You have only paint 4 layers instead of one. With the biggest brush and maybe a 2k landscape it’s a minutes thing and you can apply your phys material to the different layer infos.
Sorry but dont understand “the left and the right part”. My material aplys to all sides if you meant this.
sorry but I fail to see how your material is procedural if you have to paint the layers by hand. procedural would mean you don’t paint anything at all.
and the HeightBlended textures from the link you provided is just a way to improve the blending between the existing painted layers, which at this point is irrelevant.
so let me try to rephrase it again: I want to have different textures without painting any layers at all (like my pictures already show - there are no layers painted), so that when I actually use painted layers later, every layer already contains multiple textures. in short, I only paint 2 layers to see 8 textures
maybe the part you don’t get is, that I am not importing the layers from anywhere. all I got from WM was the heightmap and the rest I’m generating in my shader, like in the Stylized Showcase
Ah sorry, now i get what you mean :).
Ok. maybe not 100% procedural but my layers acts like that when i brush them and i can use still the good things like placing foliage only on grass or like phys material.
Dont know much about shaders but have you tryed a layered aproche? What do we get if we use layerblends in a function and input this in a non layerblended material? Is this possible? Will there be a 100% procedural material + Layer enabled for linking phys mat?
okay glad that’s clear, wasn’t sure that was the source of the confusion
your layers blend nicely when you brush them thanks to the HeightBlend option. this is nice and all, but it’s nothing procedural (all it does is to “bias” the weight of the painting towards one layer or the other, based on the texture’s heightmap - so that the blending of the layers is more natural). this is the kind of stuff that can be described as “small, cool details” and something I’ll definately look into in the future, but at the moment I’m only worried about the grand scale of things (where the different ground types appear and why, procedurally)
I guess you mean this] ? I haven’t used this feature yet so I had forgotten about it (long time UE3 user, this is new from UE4). but if each of the layerblended materials can have a different PhysMat then it could very much benefit my material
I’ll definately play around with the LayeredMaterials feature for this, thanks for the tip
One place I’ve seen UE4 fall VERY short of Unity is the fact that you can’t do a height blend and “respect” the far normals of the terrain, so if you had a stylized line of snow, you’d see it shift and warp with the terrains LODing rather than using the far normals.