HELP: Mesh Painting Randomized Details on Landscape Spline Generated Road

I am using the Landscape Spline Tool to create a road.

Here’s what I created for the material using vertex painting directly on the road which has a Megascan Blend Material applied to it.

The problem is I need to create this look on the entire road and it’s quite long. I can’t think of any way to do this but manually.

I’m guessing this Mesh Painted material will be quite large too as it is but it’s also going to take a long time to do this way.

Other options I’m thinking of using with the help of Substance Painter are to :

1- Have the 3 materials I’ve blended all in one material and somehow create a procedural mask for the 3 upper layers that make up the dirt, snow and ice/water with the mask creating that random blend automatically along the length of the road.

I’m not quite sure how I’d set this up in Unreal with this menu

2- Create separate copies of the same piece of road model and have a different versions of the materials with the details and then randomize the models?

With this method I am seeing this problem when I used some test Static Meshes with different colors to try and see how the Landscape Spline tool is placing them. It looks like its randomly stretching out each Static Mesh too.

I would also have to somehow randomly place the models but also have it so they all are interchangeable and tileable with each other.

It’s not random at all, it’s exactly what you are directing the spline to do segment by segment.

Anyway, instead of wasting time messing with that.

Change the material to work based on world position instead of mesh UVs.

This way you can:

  1. ignore the fact the mesh stretches.
  2. push a randomized texture to create similar details to those done with vertex paint without using vertex paint.
  3. avoid having more meshes to make stuff random…

You can literally use a few cloud layers at a small 256x256 texture size to have the road look different.

And you can also have vertex paint on top of it if you work at the material a bit.
I would just negate the cloud masks when any vertex paint us present on the vertex…

To be clear, you have to mix/match between world uv and Mesh uv to preserve the base details of the road (the lines)

You can think of it as layers.
The lines are the base.
You subtract those in a black and white mask off of anything that you wish to lay on top.

The more i think about it, the more I realized I should probably make a quick material for myself too…



Ok so I tried out what you suggested.

Using the Absolute World Position worked really well for the UVS and applying the masking for more irregular patterns of detail. But I don’t think it’s going to work in this case where the patterns need to match more with the direction parallel to the road itself to give the eroded effect you would see on a snow covered road that’s been driven over.

Absolute World Position Snow Layer

Absolute World Position Dirty Snow Layer

Absolute World Position Both Snow Layers Combined

Here’s what I used to figure out a multiple texture blending set up.

It does work but something is off as each texture layers is faded and it doesn’t work as I was expecting where the top most layer would cover those below it as layers work in Photoshop.

This is my modification for the set up. I had to add a Multiplier to each mask to get it to show up.

For now my black & white masks were creating quickly just for testing. But they give the basic idea of how I want the mask to flow.

The other issue is the masks and texture layers when applied are just creating a mess. There must be something wrong with how I’ve set it up.

You can see how I’m getting the blue and red areas in the images below.

This gets even worse when I try to apply the Roughness set up.

I haven’t even begun to figure out the top water layer.

Makes sense. WPO doesn’t offset or alter rotation. It’s literally “global”.
Use the mask with UV0 so it’s aligned to the road - as a mask.
single channel into the Lerp alpha - and use 2 different materials with WPO to create the visible layer.

If you are worried that the alpha mask becomes too predictible - then distort it by mixing in another world positioned texture to “lessen” the blended effect.

Additional option 1: render target.
You bake it in like it’s done for everything, using vector fields.
This allows for trails to be left, and it also allows you to manually paint flow maps and such.
It’s complex, and costly. afterall it relays on rendering meshes or “something” to produce the underlying effect.

Additional option 2: decals.
Really powerful option would be to sprinkle them where needed.
This can possibly also be “automated” in editor via bluetility script.
And it’s by far the best option for a “finished” product.

You are on the right (snow) track. keep at it :wink:

This. Unless the texture is mesh-specific like a rock, something continuous/contiguous would better benefit from worldposition; which tends to be many/most meshes. This also allows you to set scaling against a constant (world-scale) so your texel-rate/level is also consistant.

Ok I’m back. I had to take a break from this for a bit to work on some other things.

Anyhow here’s what I’m thinking now…

1- Using a noise filter for the snow and dirty snow layers could potentially work provided I can fix the strange discoloration I’m still getting. See previous posted images.

For the actual ice layer I could use decals if I could just figure out how to procedurally add an array of a few different ice decal varieties on the road. I would also need to figure out some way to have the decals not display where the parts of them come off the road model.

I don’t know though. I’m still not happy with how the material blend is looking even if I ignore the discoloration.

2- The 1st version of the material where I just manually painted the vertex colors on the Megascan Blend Material really still looks so amazing! Much better than what I’ve been able to come up with so far. I’m wondering if maybe there’s a way to generate and plug in a procedurally generated color map for vertex color channels to auto apply vertex painting from a sampled section done by hand.

Even with vertex paint the curves and other bends wouldn’t necessarily work.
And the main problem is stretching when your spline mesh parts are really long if you use UV only…