Download

World Browser - Auto texturing the Terrain via materials

With the Upcoming 4.3 Update I have been planning out my game world in preparation for World Browser to come out of experimental. With that said - I have a really large game world. I really cannot afford to hand paint or make a splat map for each terrain unless I want to spend the rest of my life doing so. So an Idea I have come up with is auto texturing the terrains via a few pre-set material parameters such as terrain height, Slope, etc. but at the same time allow for manual tweaking. All in real time to provide visual feedback to the artist working on the terrain.

Examples being
Basically when the terrain is raised or lowered, the material should update in real time and blend accordingly.

  1. If I raise the terrain to mountain level heights then I should have a blend between rock and snow for example.
  2. If I lower the terrain I should get grass and eventually a swamp.
    But most importantly textures should blend between certain transitions. Within reason of course.

I am mainly curious if this is possible :slight_smile:

Further more - Would this cause any major performance loss? Just curious :slight_smile:

Not to derail, but if you use World Machine you can generate splat maps for tileable sections. You don’t have to make them by hand.

Yes, you can do this. The material system allows you to get a pixel’s world position and normal, so you can use those to blend between materials based on slope or height.

Guess I Will have to purchase World Machine now.

Thank you for the heads up about this :slight_smile:

for one can wait for World Browser
plus I like having more control of my landscape, I used World Machine and yes it is neat but just don’t care for it.

Is there a way not to use splat maps?
In my level I just drop the material on my landscape, and the textures accords itself automatically. Is there any ways of doing that with WorldBrowser?

Take a look at this example by Epic: https://docs.unrealengine.com/latest/INT/Resources/Showcases/Stylized/Landscape/index.html

It shows how you can automatically blend layers depending on angle of faces in the landscape.
I’m not entirely sure how to go about blending in a layer depending on height but it’s a start, I think you’d probably want to use epic’s example and mix it with something that can change your layer to snow at the top of mountains and such.

Maybe someone else can assist with height blending of landscape?

Pretty much possible, I’ve done this a lot for quickly testing multiple terrains.
For slope based blends use the blue channel of the VertexNormalWS node, similar to epics example.
For a height based blend use the WorldPositions blue channel.

landscapeautotexture0v9snl.png

Perfect, never tried that. Thanks!