Road Architect from BeamNg.tech

Discussion in 'World Editor' started by AlexKidd71, May 27, 2024.

  1. stegosaurus04

    stegosaurus04
    Expand Collapse

    Joined:
    Dec 8, 2022
    Messages:
    82
    Thanks for the explanation. So at the moment it's not possible to make for example a curved section sloped with a superelevation, right? ezgif-7-f93e422256.gif
    because the gimbal doesn't affect rotation
    (ot: Also Dave, could I wrote you in private for a mod question?)
     
  2. el_ferrito

    el_ferrito
    Expand Collapse

    Joined:
    Sep 30, 2020
    Messages:
    484
    I bet that is what I'm doing. There is a default thickness to the lanes... I'll try it with no thickness.
     
  3. Dave_

    Dave_
    Expand Collapse
    Research
    BeamNG Team

    Joined:
    Sep 21, 2023
    Messages:
    32
    You can have linear superelevation - go into the Nodes List, click on the pencil icon. You will see a rotation box at the bottom. Or check the documentation: this page: https://documentation.beamng.com/world_editor/tools/road_architect/road_editing/

    Once you do that, you can try terraforming the road to it and see how it fits. With a lot of superelevation, it might be a little bumpy. This is because the maps are usually 1-meter-per-pixel resolution and/or slight bugs in the terraforming algorithms (which are tricky and heavily-optimised so hard to debug).

    Another thing you can do is use the auto-banking feature. See the same page of the documentation under 'Auto Banking'. This gives a more natural camber on the road.

    You can't have non-linear superelevation - ie where each lane has a different banking angle. This would put sharp corners along the road.

    You can write your mod question here (I am probably not the best person to answer it. I don't know that much about mods, generally. I just make these tools.)

    Best,
    Dave
     
    #43 Dave_, Sep 20, 2024
    Last edited: Sep 21, 2024
    • Like Like x 2
  4. Dave_

    Dave_
    Expand Collapse
    Research
    BeamNG Team

    Joined:
    Sep 21, 2023
    Messages:
    32
    Originally, the thickness/depth made sense because we had the option to use either decalroads or mesh roads (procedural meshes), but I took that out because:
    1. procedural meshes use a lot of triangles and we want to minimise those - decalroads are far 'cheaper'.
    2. you can terraform to the decal roads instead.

    The fact that it is still there in the tool is more of an oversight, but it IS still useful for setting the height of the sidewalks/kerbs. We can maybe see about changing it later.

    There is a default thickness. I think it is 0.01m. However, this is not really used any more (I used to draw the top and bottom surfaces of the roads in the edit visualisation, where mesh roads were about 0.4m, but since they are no longer used, it isn't needed).

    Best,
    Dave
     
    #44 Dave_, Sep 20, 2024
    Last edited: Sep 21, 2024
    • Like Like x 1
  5. el_ferrito

    el_ferrito
    Expand Collapse

    Joined:
    Sep 30, 2020
    Messages:
    484
    I'm just wondering if that is why the sidewalk is floating. I still think I must be doing something wrong. For me, I can't make a sidewalk that doesn't burst the tyres when I drive onto it from the road. I set everything up correctly as far as I can see. I'll try setting the road lane heights to 0. Thanks for all the replies by the way, it's really helpful. Great job with the tool too.
    --- Post updated ---
    Additional question: is there a preferred process order?

    Terraforming is high up in the list, but something I do last. I just wondered if there is a standard workflow, or something that works well for you. May have missed that somewhere in the documentation.

    Cheers.
     
  6. Dave_

    Dave_
    Expand Collapse
    Research
    BeamNG Team

    Joined:
    Sep 21, 2023
    Messages:
    32
    Can you show some pictures of these floating sidewalks? I am not sure I fully understand, and I haven't seen it. If bursting the tyres is the problem, I wonder if its the sharp corner.

    There isn't any must-follow order. If I wanted to make a small road network with the tool, on a fairly blank canvas, I would probably to do something like this:
    1. first shape the terrain (either with standard world editor tools or using roads in this tool - moving them around, clicking terraform at different heights etc).
    2. Then I would lay some junctions down at different places.
    3. Then I would connect the roads up by joining the junctions.
    4. Then I would go into the road detailing (eg see the 'layers' and 'road condition' parts of the documentation) and detail the roads with lamp posts, crash barriers, signs, etc. Whatever I was looking for.

    However, if I was starting with some already made landscape, this might change a bit, and I wouldn't want to terraform it too hard.

    Alternatively, if you have long and winding country, you might be more interested in smaller, longer roads winding through the hills etc, with only occasional junctions.

    Roads on their own are okay, but it will come in to its own once buildings, foliage, rivers etc are added to the map. Then you have a completely different choice of order.

    You can terraform either single roads, all roads, or groups. Grouping is important in the tool, since it allows you to treat lots of roads as one 'thing'. If you group a section (eg a couple of junctions and a couple of roads joining them), then you can raise the whole group vertically (together) with the gimbal, then terraform to the group. You might have to play about with it a bit to get it right. The tool isn't perfect.

    The main trouble with terraforming single roads is that if there are neighbouring roads, the terrain will get messed up there. You need to be careful - either terraform all the roads together, or do it in groups. If you are careful, and your roads are far apart, you can still terraform them individually - just use the range visualisation to make sure you don't overlap other roads, etc.

    Dave
     
    #46 Dave_, Sep 21, 2024
    Last edited: Sep 21, 2024
    • Like Like x 2
  7. stuffi3000

    stuffi3000
    Expand Collapse

    Joined:
    Feb 6, 2022
    Messages:
    42
    Wow, this tool is absolutely amazing! I think the dev team really outdid themselves on this one.
    If there's one thing that would make this great tool even better, it would indeed be the possibility to paint the terrain underneath the road, as it was already mentioned.

    I'm still exploring my way through the tool, but is there a possibility to convert existing roads to the new tool?

    PS: I find it funny to see the similarities with my road edge generator tool in the layers section haha, feels great to see a native tool that does it even better.

    EDIT: I found the decal road convert button (you have to right click and existing decal road in the scene tree)
     
    #47 stuffi3000, Sep 21, 2024
    Last edited: Sep 21, 2024
    • Like Like x 4
  8. Dave_

    Dave_
    Expand Collapse
    Research
    BeamNG Team

    Joined:
    Sep 21, 2023
    Messages:
    32
    Yes, it will convert decalroads to 'road architect' roads. In the scene tree right-click over the road (or selection of roads), and you will see 'convert to road architect'. then switch to the road architect mode at the top.

    RE the painting of textures: it can't be done right now because of the base colour. we will figure something out.

    Dave
     
    • Like Like x 1
  9. stuffi3000

    stuffi3000
    Expand Collapse

    Joined:
    Feb 6, 2022
    Messages:
    42
    Thank you for that Dave.

    I have a follow-up question: My offset layers (grass), in render mode, are currently always set to "over objects" in the decal road settings. Is there a way to change that setting? In almost all my use cases, I would prefer "over objects" to be disabled.
     
  10. Dave_

    Dave_
    Expand Collapse
    Research
    BeamNG Team

    Joined:
    Sep 21, 2023
    Messages:
    32
    RE the painting of textures: it can't be done right now because of the base colour. we will figure something out.
    It sets all the decalroads it produces with the overObjects flag set to true. This is so you can lay the roads over meshes like eg bridges. There isn't any way for the tool to change it - you will have to go into the Inspector and change it manually unfortunately. What problems is having this flag set causing? Is it placing them in the wrong place?

    Dave
     
  11. el_ferrito

    el_ferrito
    Expand Collapse

    Joined:
    Sep 30, 2020
    Messages:
    484
    Could you apply a different base colour to the material used for that area? I sometimes use a generic grey base colour for my asphalt, so I can paint roads anywhere without having to edit my base colour map. I'm sure you've thought of all this already.

    Personally, it isn't an issue for me, as I set up where I want my roads to be in advance and bake the grey into the base map and use the alphas to set the right terrain textures. But I see the benefit of you can get it to work.
     
  12. Dave_

    Dave_
    Expand Collapse
    Research
    BeamNG Team

    Joined:
    Sep 21, 2023
    Messages:
    32
    Maybe you already know this, but: the trouble with painting textures - other than the fact it is time consuming - is that it's blocky; you typically have a one meter-per-pixel resolution of the map, and every 1m x 1m grid square can only be one thing (eg asphalt, rock, mud, grass, etc). This means it appears jaggy. Thats fine if all your roads are perfectly axis-aligned, but not in the general case. We get around this by using 'edge blending' layers (thats what I call them in the tool anyway). Placed at the sides of a road with a width of about 2 meters or so, they will cover up the jaggy area. We can't really see this working automatically until we get the automatic painting of the asphalt in, however. But the edge blending layers are already there on most of the preset roads. The artists might then add some ground cover or static meshes.

    Dave
     
  13. stuffi3000

    stuffi3000
    Expand Collapse

    Joined:
    Feb 6, 2022
    Messages:
    42
    The problem for me is not that they are placed in the wrong location, but that they go over static objects or other mesh roads which I placed along my track. My traffic signs, for example, are right on top of the grass road edge, so the decal tries to layer on top of them. The same goes for fencing, buildings, etc., everything placed close to the road and on top of the road edge.
    And I can of course go and deselect it manually, but everytime I open edit mode in the tool, the flag seems to reset again...
    --- Post updated ---
    Right, I now have a completly different problem: I tried loading my road architect session from this afternoon, and as soon as it loads it, my terrain just becomes completly flat... I'm forced to reload the level without saving changes, but this means I basically lost all the work I did with the new tool this afternoon...
     
  14. Dave_

    Dave_
    Expand Collapse
    Research
    BeamNG Team

    Joined:
    Sep 21, 2023
    Messages:
    32
    Every time you switch between edit and render modes, the roads are all re-created. This is why the flag will be on. In future, we can maybe have this as an option on each road. Never thought about it, to be honest.

    On the second problem: this is strange. Are there any errors in the logs? You might want to try deleting the 'temp' folder, which sometimes fixes strange things which happen with terrains, but that is a long shot. The map which you are using: What is the scale and resolution? It is strange that it is completely flat, rather than just 'wrong' ie mountains in the wrong place etc. That's the usual bug with this kind of thing. When you say flat, do you mean exactly z = 0 everywhere?

    The session saves a .png file to the save location. You can try looking at that in paint or gimp or something, and see if it is flat. Not sure if its a load or save problem.

    Dave
     
  15. el_ferrito

    el_ferrito
    Expand Collapse

    Joined:
    Sep 30, 2020
    Messages:
    484
    I completely understand. My preference is to set a dirt texture with Asphalt physics and place that under a road decal which looks like asphalt. That means the jagged edges blends a bit better into surrounding dirt (if you follow what I mean), but I know that's a bit of a lazy approach. I still don't really see the issue with the edging, as your tool adds the edge blend decals, but perhaps I misunderstood your point.

    Personally, I would make all the roads in the tool, then use the JSON to plot an image of where they all are, use that as an alpha on the terrain import tool, and Bob's your uncle, new textures all in place. I'd use the same alpha to apply a grey colour to the base colour map, and then you're laughing. Just the edge blends to cover the jagged parts and the rest is more or less good to go.
     
  16. stuffi3000

    stuffi3000
    Expand Collapse

    Joined:
    Feb 6, 2022
    Messages:
    42
    Right, I now have a completly different problem: I tried loading my road architect session from this afternoon, and as soon as it loads it, my terrain just becomes completly flat... I'm forced to reload the level without saving changes,
    The option to set that flag for every road would indeed be great. Others might be in the same situation.

    There's nothing in the error log, but I noticed that my road architect.png file is indeed white... Which explains why the terrain gets flat when I load it. Would it be possible to load the JSON without the PNG?
    Concerning my map, it's an 8x8km map, with 1m resolution. It gets completly flat when I load, meaning there's just a flat plane left at the bottom.
     
  17. Dave_

    Dave_
    Expand Collapse
    Research
    BeamNG Team

    Joined:
    Sep 21, 2023
    Messages:
    32
    Its a saving problem then. We will need to look into it. I am not sure what is special about your specific map - we tried it on a few, including 8km x 8km, 1mpp maps. I can't explain it. We will need to be able to recreate the problem somehow to see what goes wrong in this specific case.

    There isn't any way right now to not load the .png. But it would be easy to add. We can put a checkbox at the top, or similar. If you know Lua, you could disable it in the code (look for the roadArchitect.lua file and inside that, the function loadSession(). Theres a comment: '--Read the .png file containing the heightmap data, and set the terrain.' -- just silence the 4 or 5 lines below that part).

    Dave
     
    • Like Like x 3
  18. stuffi3000

    stuffi3000
    Expand Collapse

    Joined:
    Feb 6, 2022
    Messages:
    42
    Alright. Thank you very much for your help Dave. Don't hesitate to send me a message if you want my map for testing.

    I could indeed do that. I know my way around, yeah. I'm currently experiencing a more serious problem with map saving as a whole though, so we'll see if that can get fixed or not (https://www.beamng.com/threads/world-editor-level-cant-be-saved-after-a-few-minutes.100508/)...
     
  19. Dave_

    Dave_
    Expand Collapse
    Research
    BeamNG Team

    Joined:
    Sep 21, 2023
    Messages:
    32
    If that works, it sounds fine.
    It might be related. See if it improves once that problem is fixed. If not, we can take a closer look.

    Dave
     
  20. el_ferrito

    el_ferrito
    Expand Collapse

    Joined:
    Sep 30, 2020
    Messages:
    484
    upload_2024-9-23_15-51-21.png
    Sorry, they're not great, it is tricky to show as the gap is not huge.

    upload_2024-9-23_15-51-37.png

    upload_2024-9-23_15-51-44.png

    So far, on any map, I can't add sidewalks that don't eat my tyres when I drive onto them. I'm sure I'm doing something wrong, but I don't see what.
     
  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