Hi everyone,
procedural roads just got an interactive editor and the ability to auto-generate AI waypoints: https://github.com/RigsOfRods/rigs-of-rods/pull/2976 - when finished, this editor script will be able to edit all current parameters of roads. To learn what roads can do, read our docs: https://docs.rigsofrods.org/terrain-creation/old-terrn-subsystem/#procedural-roads. Quick recap:
The road system is still very limited, let's discuss how it could be improved. These are the limitations I see, and how I'd improve the system:
procedural roads just got an interactive editor and the ability to auto-generate AI waypoints: https://github.com/RigsOfRods/rigs-of-rods/pull/2976 - when finished, this editor script will be able to edit all current parameters of roads. To learn what roads can do, read our docs: https://docs.rigsofrods.org/terrain-creation/old-terrn-subsystem/#procedural-roads. Quick recap:
Code:
; Syntax of procedural roads in .tobj file
; ----------------------------------------
; begin a road strip
begin_procedural_roads
; define a series of procedural points
; Arguments:
;posX, posY, posZ, rotX, rotY, rotZ, width, borderWidth, borderHeight, type
; end a road strip
end_procedural_roads
The road system is still very limited, let's discuss how it could be improved. These are the limitations I see, and how I'd improve the system:
- Hill roads are bumpy, there is no autosmoothing and it's near impossible to create smooth hill road by hand/tool.
- You can't create road crossings
- You can't define custom material
- You can't define custom groundmodel
- The mesh generator creates disjoint geometry, so lighting shows sharp edges everywhere. This must be improved in code.
- You cannot provide custom mesh to generate road from. This will require a whole new mesh generator code. ETA: next summer.
Code:
; Suggested .tobj extensions for procedural roads, with example
; -------------------------------------------------------------
begin_procedural_roads
; road name (for display in game)
road_name "Scenic Route 43"
; road ID for internal referencing
road_id scenic43
; custom material name
road_material Scenic43Mat
; custom groundmodel name
road_groundmodel customAsphalt
; auto-smoothing by dividing roads to smaller segments of maximum length (in meters)
road_smoothing 0.5
; procedural points...
end_procedural_roads
begin_road_crossing
; crossing name (for display in game)
crossing_name "The T-crossing with country road"
; crossing ID
crossing_id CountryT
; custom mmaterial name
crossing_material CountryTMat
; custom groundmodel name
crossing_groundmodel customAsphalt
; a list of roads to cross, specifying point number (first=0, last='last')
; Syntax:
; crossing_road roadID, roadPointNumber
crossing_road mainroad, 25
crossing_road countryroad, 0
end_road_crossing
Last edited: