I am new to materials in Unreal Engine 4 as well as the tools themselves. This is for a university project I’m working on regarding procedural generation of roads.
Is it possible to create a material such that when I apply it to road splines, it appears natural regardless of scaled meshes? If yes, how do I do so?
An example I have is this spline representing an upside down L.
The blueprint I have that builds this looks like this:
With the default material I’m using for these two plane meshes, the L doesn’t look right. I should see perfect squares from this checkerboard pattern, not distorted looks such as this one.
for gravel it’s noisy enough that you could probably get away with a world aligned texture if you want.
and/or, if you add a spline mesh based on distance along the spline rather than based on points that can help too.
See this post for that
you need to use a higher poly mesh for it to bend and keep the width constant.
there is a spline road example in the learn tab and there was a livestream on how it was built.
you can use decals for puddles, pothole, manhole covers.
alternatively you could use static meshes, and no spline or spline mesh.
you could make each piece modular and create them in a bp using hierarchical static mesh component.
Let me take a look into that later. From what I understand, there isn’t a type of material around where even upon having a high polygon mesh, the same natural texture can be applied multiple times without scaling.
using a higher poly mesh is the only way to get rid of the mesh scaling that is happening in your picture. that’s more like a scaling artifact from using a low poly mesh than actual scaling. (edit: maybe adjusting the tangents could also change the scaling in the pic, not sure)
if you were using a higher poly mesh so that type of artifact scaling doesn’t occur and were adjusting the actual scale of spline mesh you could create a material instance per spline mesh and adjust the texture scale based on the scale of the mesh. However, I spend half a day working on that a few months ago and couldn’t get it to work properly, maybe you’ll have better luck.