Unite 2015 - A coder's guide to spline-based procedural geometry

Unity · 184K views · 2015 · 59:38

Open on YouTube

Game programming & enginesComputer graphics & renderingtalk

Why Game Development Stack Exchange recommends it

Game Development Stack Exchange answerers point people to it for a clear, code-level explanation of splines and procedural geometry in questions about roads, rivers and terrain-conforming meshes.

Recommended by 2 people across 2 different months, 2015 to 2021.

What it is

A Unite 2015 conference talk from Unity on building procedural meshes from splines in code. It walks through how splines are created and modified, then shows code examples for generating spline-based geometry such as roads.

What people said

Strong rec Jon · 2021-01 · Game Development Stack Exchange · on “Building meshes conforming to terrain deformation”

As with many other obstacles of procedural geometry, this problem can be solved with splines! It’s only one of many ways to address this engineering challenge. Here is an excellent tutorial on how to play with splines for this exact purpose [this video] . Here’s another one demonstrating road placement [LINK] . Unity doesn’t have a purely mathematical code-based spline implementation, so i made one a while back for my own ease of use [LINK] . I suggest an implementation like mine if you prefer to implement this with more code than editor, as it makes more sense to me for real-time applications.

Recommends SanSolo · 2015-11 · Game Development Stack Exchange · on “How do splines work?”

A coder's guide to spline-based procedural geometry [this video] is a video from Unity event Unite 2015. In the video, the presenter gives visual explanation of how splines can be created and modified. Then, he goes on to give code examples for the same. Very informative. The video is for Unity3D, but the algorithms presented can be adapted to any platform.

Cites TheDavil · 2018-02 · Game Development Stack Exchange · on “High-level advice on procedural river (Unity3D)”

I'm working on some procedural content for Unity3D - in C# My main aim is to build a flat plane (or maybe later a terrain / mesh), with a single river running through it, based on a seed value. I will keep the river throughout, but I will have 2 versions of a settlement, one medieval, later one urban city-like. The over-arching function is basically: Input an integer X (scale of settlement) and a seed integer Y build a river, maybe roads next if I get the time drop x buildings onto the map in a reasonable layout once x reaches a pre-defined limit, switch to urban generation I will probably populate both with generic assets from the asset store or similar, and hopefully will layout the buildi

Cites Pheonix2105 · 2018-06 · Game Development Stack Exchange · on “How can I generate roads such as those in the game Twisty Road?”

I can't really offer you a full answer as it's not something I've done myself yet but what you want is Spline--based procedural geometry [this video] also [LINK]