Easiest way to add yellow and white lines on a road

So I’m trying to turn the road in my level from this:

to this:

What is the easiest way to do this? Just create yellow/white meshes?

would a modular road set not be better?

Where can I find a modular road set? Like the one by Gametextures.com in the marketplace?

Unless one gets put on the Marketplace, you’ll probably have to create a modular road yourself. Fortunately, there are many tutorials on how to make modular systems. In this instance, you would need to create multiple models that represent each part of a road you would need; Straight, Left Turn, Right Turn, T Junction and 4-Way. Additional models would be needed for wider 3/4-lane roads, freeways, on/off-ramps and other various roads, but those could be modular systems by themselves.

The best way to create the lines would be to apply a texture on top of the road’s material that contains the lines. By using Material Layers for the basic asphalt of the road, then layering the painted lines on top of it, you can make the texture system more dynamic, or even create multiple Material Instances for each of your road models. By separating side lines from middle lines, you can reduce what needs to be created, and give yourself more flexibility, as you don’t need to add the white lines to the yellow line’s textures. This will be helpful as the yellow line changes based on the needs of the roads.

Alternatives: 1) You could add a single polygon on top of your road model with a material for just the lines. Placed mere millimeters (or less) off the road model, no one will really notice it’s a separate model. However, this will take more cycles to render than a material. 2) You could paint the roads using decals. However, this would be very tedious and majorly affect draw calls.

I would use Spline Mesh, the mesh being a single plane with the road lines painted on with transparency. Run the spline along the road where you want the lines and voila, they’re in.

The only problem is that right now spline mesh materials don’t show up in 4.7.2. This will be fixed in a future update. Epic staff TJ Ballard had this to say as a workaround:

“As a workaround, I did notice that if a ‘SplineMeshActor’ is also added to the level via the Modes panel, the material will then render properly on the ‘SplineMeshComponent’ in the blueprint. So you could temporarily add and hide the ‘SplineMeshActor’ in the level until the fix goes through.”

Thanks for your advices, I’ll look into the best solution

I’m pretty sure Grand Theft Auto 5 uses decals for almost all it’s road lines and markings. If you look closely in game, there is a tiny gap underneath all the markings (Like they are floating, but only noticeable if you look really hard).

1 Like