Heron
Back to Work

PCG: Road, Forest and Vehicle

A terrain-based procedural road generation toolchain: Houdini cost-field pathfinding + UE5 spline editing tools + automatic terrain materials, showcased with UE's native racing system.

PCGTechnical ArtHoudiniUE5Tool Development

Role

Technical Designer (Tools)

Engine

Houdini + UE5

Team

Solo project

Duration

Oct 2024

Background & Goals

Procedural generation is widely used in both large open-world games and indie titles, so I set out to make it part of my portfolio and a key area of future research. This project focuses on terrain-based procedural road generation. To enhance the visuals, it uses terrain-driven material assignment and node editing inspired by Electric Dream, with Unreal Engine's native racing system integrated to showcase the final result.

Road design reference from Far Cry
Reference: Far Cry
Open-world road reference from Ghost Recon Wildlands
Reference: Ghost Recon Wildlands
Style and mood reference
Style & mood reference

Pathfinding in Houdini

Cost field design — every terrain point is weighted by multiple factors, and paths generate along low-cost regions:

  • Slope cost: using each mesh point's normal unit vector, the dot product (negatively correlated with slope) yields higher cost for steeper areas
  • Ascend / Descend cost: surface slope at each point is computed from lines to adjacent points (a calculus-based approach); steeper points cost more
  • Convexity / Concavity cost: the measure_curvature node separates convex from concave regions — rivers form where concavity is high, animal trails where slopes are gentle
  • User attribute / Slump cost: heightfield_maskbyfeature classifies points above a slope threshold as cliffs
Curvature cost visualization
Curvature cost: red = convex, green = concave
Cliff mask visualization
Cliff mask: points above the slope threshold marked in red

Remesh optimization: Houdini's built-in Remesh node caused excessive overhead when the heightmap was finely divided. A Custom Mesh node triangulating the heightfield gave more controlled density and significantly reduced computation time.

Built-in Remesh node result
Built-in Remesh: overly dense mesh, high overhead
Custom Mesh triangulation result
Custom Mesh triangulation: controlled density, much faster

Spline serialization: supports multiple start points and destinations, allowing several disconnected paths.

Generated paths, result one
Paths generated from the cost field
Generated paths, result two
A path network with multiple starts and destinations

Spline Editing Tools in Unreal

Via the Public API, the tool instantiates a Houdini actor in Unreal, retrieves parameters and triggers a recook — a full "delete original path, recook new path" editing loop:

  • Left click creates a new spline point or inserts one into a segment; Ctrl + left click deletes the selected point
  • A Gizmo is created for each spline for direct in-editor adjustment
  • Worldtrace (custom function): keeps points anchored to the ground while dragging
  • Snap to Ground (custom function): snaps spline points to the terrain on recook
Creating and inserting spline points
Left click to create / insert spline points
Spline Gizmo editing
Gizmo: white = user spline, green = generated path
Recooking the path
After adjusting, a recook regenerates the path along the new spline
Spline points snapping to terrain
Snap to Ground keeps spline points anchored to the terrain

Automatic Landscape Material

Terrain mask data from Houdini drives a landscape layer array in Unreal, assigning materials in order and staying compatible with the path tool (paint layer parameters for man-made roads, animal paths, rivers, etc. are exposed in Houdini). Visual optimization: tile density decreases as the camera approaches the ground and texture density increases in the distance to reduce repetition (fade distance 1000 vs 5000).

Automatic terrain material blending
Automatic material assignment and blending by landscape layer
Path material layer
Path areas automatically written into the matching paint layer

Electric Dream PCG Node Editing

I integrated the Electric Dream PCG asset pack and manually adjusted its nodes to match the project's terrain and road generation rules:

  • Restricted foliage generation height to a specific range
  • Adjusted point placement logic to avoid spawning trees and large rocks on slopes
  • Filtered road areas via landscape layers to prevent vegetation on roads
Electric Dream asset pack
The Electric Dream PCG asset pack
Foliage generation overview
Foliage after node editing: road areas automatically avoided

Final Outcome

A complete "Houdini algorithm + UE editing tool" path generation pipeline that artists can adjust directly in-editor, demonstrated with UE's native racing system.

Vehicle driving on a generated road
Final demo with UE's native racing system
Final outcome screenshot two
Final outcome screenshot three
Final outcome screenshot four
Final outcome screenshot five

© 2026 Heron