Home Unreal Engine

Making roads and paths - Have anyone found the ultimate solution?

Z0DI4C
polycounter lvl 3
Offline / Send Message
Z0DI4C polycounter lvl 3
Hi all,

I'm struggling to find any solution that would work the same as spline decals in Cryengine. In UE4 it has to be textured mesh (plane) which has it's obvious negatives and it requires a lot of manual tweaking and I found it impossible to integrate it to the landscape without visible seams. Have anyone alreday found a better solution to this or is this really the one way of working? Does anyone know how AAA developers are dealing with this? I already noticed runtime virtual texturing could solve this but people trying this technique say that there is a great quality loss when using on larger landscapes (cant test it on my own at this moment). Thank you.

Replies

  • zachagreg
    Options
    Offline / Send Message
    zachagreg ngon master
    You can either use a Landscape spline actor or just a normal spline mesh blueprint that has your plane on it with a tiling material. You would also probably set material applied to include Pixel Depth Offset so that any intersecting edges on the spline will dither blend the mesh into your ground or landscape. The seams avoidance is the Pixel Depth Offset dithering.

    Quixel recently just put out a huge 2 hr long talk about Wiktor's work on an Orgrimmar recreation where he uses this exact technique. It's fairly commonly used blending technique used for meshes, procedural roots, roads and the like. Wiktor goes over this here at 8:00 how his blending works. https://youtu.be/d08EdMcCS7s?t=480

    There are of course more complex blending methods that would increase fidelity the like of Star Wars Battlefront and that thread can be found here: https://forums.unrealengine.com/community/work-in-progress/104455-terrain-blending-tool-based-on-star-wars-battlefront and here:
  • CupMcCakers
    Options
    Offline / Send Message
    CupMcCakers polycounter lvl 4
    There are lots of ways to approach roads. And the links provided in the previous post are excellent places to begin. 

    RVT's are indeed a great option, which will only become more viable in the future as the resolution and functionality is improved. They solve blending and allow th fancy use of decals to create complex intersections and markings. 

    Another way, if you stick with a mesh based approach is by getting your road material to read from the same heightmap the terrain uses and offset it's position, this is cheap and effective for small-medium sized maps, but becomes unviable with giant maps. 

    Distance fields are an option, however this approach is prohibitively expensive in most cases. 



  • Z0DI4C
    Options
    Offline / Send Message
    Z0DI4C polycounter lvl 3
    Thanks a lot. Pixel depth offset method seems pretty nice, will give it a try.
    @CupMcCakers could you please share more info about how to get road material to read from terrain heightmap? Is it a terraing heightmap plugged in world position offset?
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    @Z0DI4C - If you use a heightmap that was created externally, its fully straight forward. Just import it into the content browser, and use the xy world coordinates to align it with your actual landscape. If you made the landscape inside Unreal, its a bit more tricky. You can use a render target, and draw the landscape to it from a top down orthographic view, using a scene depth post process effect, then sample that in your road material.
  • CupMcCakers
    Options
    Offline / Send Message
    CupMcCakers polycounter lvl 4
    If you make the terrain in unreal, you can actually just right click the height layer in the landscape panel and then export it and re-import as a texture. 

    Obscura's suggestion for using a render target would work if you had a massive world and the resolution of the required texture would be too large.

    virtual texturing makes simply using the heightmaps a good option in most cases though. 
Sign In or Register to comment.