Building node
road
Sweep a road cross-section along a curve (input 0: the first polyline/polygon; without input a default S-curve is used): asphalt slab, raised sidewalks with curbs on both sides, and painted lane markings. If input 1 carries a heightfield the road follows the (smoothed) terrain height - combine with hf_project mode=flatten on the same curve to cut the road into the terrain. Output prim attribs material (road, sidewalk, marking), name, Cd.
Inputs
- 0curve
- 1heightfield (optional)
Parameters 11
lanesintNumber of traffic lanes.
lane_widthfloatLane width (m).
sidewalk_widthfloatSidewalk width on each side (0 = no sidewalks).
curb_heightfloatSidewalk height above the road surface.
thicknessfloatRoad slab thickness (visible on embankments).
stepfloatResampling distance along the curve (m); smaller = smoother curves.
markingstogglePaint lane markings: dashed lane separators, solid edge lines.
dash_lengthfloatDash length (m); gap is twice this.
height_offsetfloatWith a heightfield on input 1: road surface height above the smoothed terrain.
translatevector 3Position of the generated asset
rotate_yfloatRotation around Y in degrees
Use it
Add it from the node menu (right-click empty graph space or Tab, then type road), ask the AI for it by name, or add it with a graph op from the API or MCP:
{"op":"add","type":"road","name":"my_road","params":{},"inputs":["src"]}Any parameter can also be an expression such as "=sin(F*0.1)". See Parameters & expressions.