Ultimate tutorial on how to make realistic roads

Discussion in 'Content Creation' started by Barbent Servo GT, Mar 25, 2024.

  1. Barbent Servo GT

    Barbent Servo GT
    Expand Collapse

    Joined:
    Jun 4, 2023
    Messages:
    106
    Hey BNG enthusiasts :p

    I'm working on a big project with hundreds of kilometers of roads. If you like take a closer look on how I make these. I know there are several videos already but maybe I can enrich things a bit.

    Prerequisites are:
    • A map with some topology
    • Some ground materials like grass, rocky dirt and tarmac (no PBR! See below why)
    • Some decal road materials like damage and road markings
    • Finaly some assets like trees and road side stuff
    How to get these is not described here. There is a great tool AlexKidd71 made to import things and do more, which can help a lot for that.

    OK. Let's start to make things beautiful:

    1. Ride around a favorite place to get a feeling for the distances! Jump into the World Editor [F11] and select the Mesh Road tool. Make the Default Width wide enough - more than you would think! I prefer a value of 16 as a minimum for a european country road. Keep Default Depth at 4. Press [ALT]+Click to set the starting point of the new Mesh Road.
    2024-03-2510_59_02-BeamNGdrive-0313016018-RELEASE-Direct3D11-background.png 2024-03-2511_05_46-Window.png

    2. Hold [ALT] to place further Mesh Road nodes. Simply follow the terrain. Try to make even distances between the nodes that's because you give the road a frequency. Fast driven roads must have greater node distances (up to 1km) than slow curvy ones. Road engineers try to keep that frequency to ensure seamless driving and safety. Hint: You can [SHIFT]+Drag one of the ending nodes to extend them or [ALT]+Click to insert nodes.
    2024-03-2511_07_19-BeamNGdrive-0313016018-RELEASE-Direct3D11-background.png 2024-03-2511_11_05-BeamNGdrive-0313016018-RELEASE-Direct3D11-background.png

    3. Adjust every node so you have a moody curve. Adjust also the node's height. Try to make a curve's vertex a little lower. High curves are dangerous and harder to control. If you have crests place them on straight passages. Driving gets more fun even for those who don't know the curve (as most drivers do).

    4. If wanted now give the Mesh Road some curve banking. On a road like this example I decided to do so. This is a bit tricky because you need to be very smooth. A maximum of 5 degrees is suitable for a mountain road. You can use the angle snap function to make things a bit easier. Alternatively press [CTRL] while rotating to act more exactly. Use local pivot orientation. Unfortunately the BNG rotation logic is nasty so try to make it in one move per node. Remind: All cars on banked curves tend to understeer while the banking itself helps to push the car in the curve direction. If you like drifting don't use curve banking. Most curves in reality are banked.
    2024-03-2511_12_40-BeamNGdrive-0313016018-RELEASE-Direct3D11-background.png

    5. Only now set the break angle of the mesh road to zero for a maximum resolution! Only now because it was more handy on very long roads. DON'T forget this! Now select the Object Select Tool and lift the Mesh Road up off the ground and give it a first test drive. The more the better. Try several cars and check out if it's fun or anoying. For me this testing phase is essential. (The final road will be a lot more narrow)
    2024-03-2511_15_01-BeamNGdrive-0313016018-RELEASE-Direct3D11-background.png 2024-03-2511_17_53-BeamNGdrive-0313016018-RELEASE-Direct3D11-background.png

    6. Move the Mesh Road down again into the terrain so that you can see approximately half the width. Now select the Allign With Mesh (Up) tool to lift the terrain to the surface of the Mesh Road. Set the Pressure to 100 and the Softness to minimum. Edit so all along the Mesh Road. Make this task a careful one so you don't have to fix holes afterwards :oops:. You don't see them yet.
    2024-03-2511_20_58-BeamNGdrive-0313016018-RELEASE-Direct3D11-background.png

    7. Select the Allign With Mesh (Down) tool and go again all along the road. Made errors are more obvious to find here than the task before. Maximum Pressure / minimum Softness.
    2024-03-2511_22_45-BeamNGdrive-0313016018-RELEASE-Direct3D11-background.png

    EDIT:
    7b. You can now verify whether you have accurately constructed the topology of the route. Simply move the Mesh Road 2cm downwards for this purpose. TIP: Append the string "-0.02" to the Z-field of the Position. Depressions and holes inadvertently left behind will become clearly visible. Take note of these areas and don't forget to revert the Mesh Road to its original height using Undo. This will allow you to make targeted improvements, if necessary.
    2024-04-2308_57_19-Window.jpg 2024-04-2308_58_39-Window.jpg

    8. The basic topology of the road is done. Now select the Decal Road tool. Start a first node by holding [ALT] and go on with more nodes. Try to make as less nodes as possible while covering the well known "No Texture" letters of the Mesh Road. EDIT: There is a World Editor Plugin stuffi3000 made to automate this process: Mesh - Decal Road Convert
    2024-03-2511_24_19-BeamNGdrive-0313016018-RELEASE-Direct3D11-background.png

    9. Grab the Object Select tool, select your Mesh Road in the Sceene Tree and hide it. Don't ever delete the Mesh Road before distribution of your map. This is your ensurance for making futur corrections. Any handish editing of the topology may break the frequency and flow of the road. (The Mesh Road object uses Bézier maths, you don't :))
    2024-03-2511_28_25-BeamNGdrive-0313016018-RELEASE-Direct3D11-background.png

    10. Choose the Terrain Painter tool now and paint along your new made trail with something like gravel or dusty rocks. Don't be accurate ;)
    2024-03-2511_29_21-BeamNGdrive-0313016018-RELEASE-Direct3D11-background.png

    11. With the Decal Road tool active give the Decal Road some tarmarc damage texture. Duplicate the Decal Road with [CTRL]+[D]. (Here another BNG nasty mood! So: Select Object tool, Select the duplicated Decal Road in the Sceene Tree, Select the Decal Road tool back again). Give the duplicated Decal Road some road markings texture now.
    2024-03-2511_32_38-BeamNGdrive-0313016018-RELEASE-Direct3D11-background.png 2024-03-2511_34_07-BeamNGdrive-0313016018-RELEASE-Direct3D11-background.png

    12. Select all nodes of the second Decal Road with the markings vial [CTRL]+[A] and make them a bit less wide. You can scroll between several overlapping Decal Roads with the mouse wheel to select them. Shure you could have only one Decal Road with everything pictured on it but this is not that flexible though. There will bee crossings and so on. EDIT: There is another superb Road-edge Generator as a World Editor Plugin form stuffi3000 to make things much easier if you prefer single Decal Roads for a maximum flexibility.
    2024-03-2511_34_47-BeamNGdrive-0313016018-RELEASE-Direct3D11-background.png

    13. Now paint with tarmac setting the brush width a bit smaller than you had for the gravel painting task. Don't be careful...

    14. If you like now take the Paint Noise tool with lowest Pressure and max Softness to bring some bumps and dents on the roads. Do this in one stroke. This gives the road a realistic feeling. You won't see anything but feel it if you drive a bit faster. They are minimal and irregular so drifting is no problem. Backup your work before testing. I have destroyed some of my work and made things too bumpy while Undo gave up. The new Really Smooth tool can not help to recover the original unbumped trail even if it's much better now.
    2024-03-2511_53_55-BeamNGdrive-0313016018-RELEASE-Direct3D11-background.png

    15. Give one of the Decal Roads a drivability of 1. (You have to reload the map and then press [SHIFT]+[CTRL]+[T] to spawn some traffic)

    16. Here you go! Give the road some nice decoration. Avoid monotonicity. Think of walking along the road and telling it some kind of story. The impact is immense - believe me! You drive uncomparable better than on a boring road. Quantity in placing things is not necessary at all. Your brain needs orientation points. Try to make paralalx situations. If you like problematic roads it should be very easy to go from here, too.
    2024-03-2512_07_20-BeamNGdrive-0313016018-RELEASE-Direct3D11-background.png

    Note: Directly coloring the terrain with the use of PBR ground materials is not possible within the World Editor till now because of a common base color map. For this reason I don't use PBR for ground materials on my current project till this changes. It is a question of time that this will be implemented, I hope. Of course you can use PBR Materials for the Decal Roads and switch to PBR ground mats later.

    Shure there are other ways to achieve good roads but this is my favorite and gives me a maximum of freedom and creativity.

    If you like to admire some of the results I made take a look at this project art page...
    "A Homerange" and the peacefull island
    "Barbent's Gambling Zone"

    Happy designing and have a n o i c e day! :cool:
     
    #1 Barbent Servo GT, Mar 25, 2024
    Last edited: May 1, 2024 at 9:38 AM
    • Like Like x 5
  2. AlexKidd71

    AlexKidd71
    Expand Collapse

    Joined:
    Mar 16, 2022
    Messages:
    360
    Nr. 6: does it matter if you select smoothness to minimum or maximum? I use maximum all the time. Never tried minimum.
     
  3. Barbent Servo GT

    Barbent Servo GT
    Expand Collapse

    Joined:
    Jun 4, 2023
    Messages:
    106
    The borders of the brush get sharper. So you do less mistakes and leave less small holes. Same as e.g. in Photoshop - if you try to brush a complete area sharp brush edges are better, I think. But it works anyway.
    --- Post updated ---
    BTW: The "Barbent's Gambling Zone" map uses PBG ground materials. I was able to use the above technique because it is actualy a edit of "Small Island" and I didn't had to change the base color map that much except for the riverbed. So I painted the ground material base color map in ... Photoshop (Gimp does the job, too :)). The big problem on that is, that you do not have any visual feedback, where exactly you paint. DDS import/export can be done with the Nvidia dds tool.
     
    • Agree Agree x 1
  4. Barbent Servo GT

    Barbent Servo GT
    Expand Collapse

    Joined:
    Jun 4, 2023
    Messages:
    106
    Update: I have inserted step 7b above. A method to make inadvertent errors in the construction of the route topology visible.

    Have fun building maps! And don't ever forget: You also paid the "World Editor" as a part of the game not only nice walls to crash some cars in :D...
     
  5. AlexKidd71

    AlexKidd71
    Expand Collapse

    Joined:
    Mar 16, 2022
    Messages:
    360
    That’s a good one!
     
  6. Murokmakto

    Murokmakto
    Expand Collapse

    Joined:
    Dec 24, 2023
    Messages:
    78
    Excellent tutorial!
    Is there any shortcut when placing the white lines in the center and edge of the road? I place these by hand but it takes forever on longer roads.
     
  7. Barbent Servo GT

    Barbent Servo GT
    Expand Collapse

    Joined:
    Jun 4, 2023
    Messages:
    106
    Hey! Thanks for your praise :)!
    I had the same problem like you a lasting time. Unfortunately there is no way to shift decal roads by an offset away from their path (like a contour). I solved the problem by using own textures for the decal roads with all three lines on it. Only crossings or junktions are made of several single lines. One further advantage using a "baked" line set is that the spacing in between is absolutely fix - with effect on a better driving experience.

    TIP by the way: If you design own baked decal roads, convert them to dds by yourself not by the BNG's texture cooker. That's because you shouldn't use the generation of mipmaps. Mipmaps everywhere but not on combined road lines because they comletely blur in distance.

    Nice crafting to you :cool:
     
    #7 Barbent Servo GT, Apr 24, 2024
    Last edited: Apr 24, 2024
    • Like Like x 3
  8. AlexKidd71

    AlexKidd71
    Expand Collapse

    Joined:
    Mar 16, 2022
    Messages:
    360
    For the center line I just copy the main decal of the road which has the full width of the road. Then I select all nodes and change width to 0.15m and then select the line decal. It’s perfectly in the middle then. For the sidelines there is no cool way. If you do road edges you could copy them too and make side lines out of it and then move them. Because they are not so wide it could be almost exact.
     
  9. Barbent Servo GT

    Barbent Servo GT
    Expand Collapse

    Joined:
    Jun 4, 2023
    Messages:
    106
    Hey :)!
    You are right. If you size the width of any curve it will stay on the path.

    But unfortunately it can never be exact if you simply move the line sideways because it is a parallel offset what you are doing. Imagine a road like a O - then you will have simply two overlapping OO - only for an II this would be ok. An SS is even more complex. So it is the Bézier Contour algorithm what is missing here to do the job propperly. I had got to know that a fluctuating road width is annoing :(

    If you like to have an easy start to cooking some own combined road markings I provide my basic Photoshop document here for you all :cool:. You may derive some other needed maps like normal or roughness from this.

    I pushed mine a bit hard into bright white to make them better visible at night.
     

    Attached Files:

    #9 Barbent Servo GT, Apr 25, 2024
    Last edited: Apr 25, 2024
    • Like Like x 1
  10. AlexKidd71

    AlexKidd71
    Expand Collapse

    Joined:
    Mar 16, 2022
    Messages:
    360
    Baking is the best solution for simplicity. I have a lot of dirt roads junction with the main roads. There I want to have interrupted lines. This is hard to do with baked lines. So handcrafting to the rescue, haha.
     
  11. Barbent Servo GT

    Barbent Servo GT
    Expand Collapse

    Joined:
    Jun 4, 2023
    Messages:
    106
    I simply split the combined markings' Decal Road at (or near) the junction point. Build a little gap and select one of the Start/End Tangent checkers for both the two devided Decal Roads to recover the Decal Road's frequency flow. It has to be a handcrafting job, though.

    But usually, the edge lines are not interrupted at junction points at all to clarify the right of way. I even add an extra dotted stop line like the british way and just sprinkle some dirt over it to create a farm track exit. I also widen the end of the outgoing Decal Road to imply a little cornering of the dirt tracks.

    screenshot_2024-04-25_12-03-18.jpg screenshot_2024-04-25_12-17-21.jpg

    When you purposefully work a bit sloppily, it can create a charmingly neglected and theatrically dramatic image.... and saves memory because of less single Decal Roads :oops:

    If you like to show some of your beautiful road creations and share your experiences as a road construction worker you all are welcome here :cool:.
     
    #11 Barbent Servo GT, Apr 25, 2024
    Last edited: Apr 25, 2024
    • Like Like x 1
  12. AlexKidd71

    AlexKidd71
    Expand Collapse

    Joined:
    Mar 16, 2022
    Messages:
    360
    Just checked some satellite images and you are right, of course!
     
    • Like Like x 1
  13. Leo Zieger

    Leo Zieger
    Expand Collapse

    Joined:
    Jan 12, 2023
    Messages:
    657
    Did you know that in Europe even the length and gap of the middle lines are normed? On Highways (Autobahn) it is a stripe of 6 Meters followed by a gap of 12 meters. On normal roads (Landstraße) it is 6 meters followed by a gap of 9 meters. In towns (Ortsgebiet) it is 3 meters followed by a gap of 3 meters. Apparently this was made for the age before the radar speed measuring to allow officials (police) to guess the speed of vehicles.
    (Numbers from Austria).
     
    • Like Like x 1
  14. AlexKidd71

    AlexKidd71
    Expand Collapse

    Joined:
    Mar 16, 2022
    Messages:
    360
    Germany the country of DIN norms, haha! I read the Wikipedia article about it but I don’t overdo it.
     
    • Agree Agree x 1
  15. Barbent Servo GT

    Barbent Servo GT
    Expand Collapse

    Joined:
    Jun 4, 2023
    Messages:
    106
    Hey!
    Thanks for your input! Yes I knew that since in germany nearly everything is normed in the DIN :rolleyes:. The exact distances are not that neccessary for your own projects - noone might care. But to keep this distances even over a long road is a big driving aid because you can recognize and keep your speed without thinking and permanently glancing on the speedo. It actualy is the rhythm in you eyes what makes it easy. Noone will ask about but everyone drives better.
     
  16. Leo Zieger

    Leo Zieger
    Expand Collapse

    Joined:
    Jan 12, 2023
    Messages:
    657
    Maybe for modders also interesting: the width of the lines (§5/1): on Autobahn at least 15cm, all other roads at least 10 cm.
     
    • Agree Agree x 1
  17. Barbent Servo GT

    Barbent Servo GT
    Expand Collapse

    Joined:
    Jun 4, 2023
    Messages:
    106
    Well, there will always be some differences between reality and BNG. Differences in perception and visual limitations on many levels. That's why I recommend just making everything a little bigger, wider, and clearer. It's not about turning it into an arcade trip, just adjusting the conditions a bit. [IMO]
     
  18. AlexKidd71

    AlexKidd71
    Expand Collapse

    Joined:
    Mar 16, 2022
    Messages:
    360
  19. Barbent Servo GT

    Barbent Servo GT
    Expand Collapse

    Joined:
    Jun 4, 2023
    Messages:
    106
    • Like Like x 1
  20. Barbent Servo GT

    Barbent Servo GT
    Expand Collapse

    Joined:
    Jun 4, 2023
    Messages:
    106
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice