[RELEASE][World Editor Extension] Road terrain/material painter

Discussion in 'World Editor' started by stuffi3000, Sep 21, 2025 at 4:13 PM.

  1. stuffi3000

    stuffi3000
    Expand Collapse

    Joined:
    Feb 6, 2022
    Messages:
    56
    Introduction

    Dear Community,
    I am pleased to present you my next (and third) lua extension for the World Editor: Road terrain/material painter. This extension offers World Editor users the possibility to one-click paint the terrain underneath one or more selected DecalRoads with the terrain material of their choice.

    As usual, I created this extension because of how tedious it can be to paint very long sections of the terrain with your mouse. The idea for this was long in the makeing, but I finally got it working.

    Presentation

    upload_2025-9-21_16-2-10.png
    This is the extension's window. It comes with a small amount of parameters and a built-in tutorial. There is additional info in the tooltips.

    Here are two images showing the effect of the tool:
    Before:
    upload_2025-9-21_16-3-39.png
    After:
    upload_2025-9-21_16-4-9.png

    Features:

    • Paint any available terrain material under a DecalRoad
    • Chose the available materials in a convenient drop-down menu
    • Chose the margin/width of the painted material
    • Fallback calculation in case of issues with the DecalRoad (this is what the "Resample Step" is for)
    Disclaimer: the tool does not work in 100% of all cases. Due to how terrains are handled in the World Editor, the different possible terrain sizes, as well as different meters per pixel settings, it could be that the experience varies.
    The tool also, at this stage (1.0), does not come with an undo function.

    Installation

    To install this extension, follow these steps:
    1. Download the .zip file attached to this thread
    2.1. Open up the file and place it's content into your userfolder.
    2.2. Alternatively, open up the file and place its content into your BeamNG Drive Root directory (can be easily found by right-clicking on BeamNG Drive in Steam -> Manage -> Browse local files): Place the lua folder where the lua folder is.
    2.3. Alternatively, navigate through all folders in the .zip attached and place the "roadMaterialPainter.lua" file in BeamNG.drive\lua\ge\extensions\editor.

    Once done, it should automatically show up in your editor under Window -> Road material painter.
    If it doesn't show up:
    - Make sure you placed the .lua file in the right directory and no other software is blocking its execution
    - In your editor, go to Window -> Extensions Editor and check whenever roadMaterialPainter is enabled
    - Restart BeamNG drive
    - As a last resort: post a message here.

    Changelog

    The following changes were made since release:
    • 1.0: Initial release

    Final Words & Notes

    Please don't hestitate to post suggestions on how to improve the tool. Bug reports are also very much welcome.

    Don't hesitate to check out my other work!

    This extension is licenced under bCDDL v1.1.
     

    Attached Files:

    • Like Like x 2
  2. AlexKidd71

    AlexKidd71
    Expand Collapse

    Joined:
    Mar 16, 2022
    Messages:
    590
    That’s very cool and needed! The new road spline editor has something similar now but you can only use it in the actual session. I very often have the problem after BeamNG updates that the grass besides my roads are somehow painted partly my road. Surely a rounding problem or something like that. Your tool will help me a lot!
    --- Post updated ---
    I go and turn on my pc. Have to test it :)
    --- Post updated ---
    Works perfect! Even with my quiky terrain scale of 1.2. And as undo you can use the decal road with the previous material and then redo it with a corrected margin. Works in most cases I guess.
     
    • Like Like x 1
  3. MegaKnight

    MegaKnight
    Expand Collapse

    Joined:
    Sep 12, 2024
    Messages:
    248
    Thank you for creating this! I really like it :)

    Using your work as a starting point and by doing some further research, I was able to create an extension that paints below the car. So you can use it to paint terrain while driving :p
    Maybe that's useful for somebody.

    You have to manually load the extension in the console and can change material, margin etc using commands.
     

    Attached Files:

  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