The Blog of Ryan Foss

It's a start!

Automatic Road Geometry Generation in Unity

I’ve had an awesome project at work developing a simulation in Unity3D that builds a test track, a road essentially, right before your eyes. ¬†Technically, we’re using some pretty hefty data, including OpenCRG and Power Spectral Density data as inputs, but I also added a lower weight random algorithm that can make for some roads more appropriate for game play.

In the image above you can see a long length of track that I generated with a few inputs.  Additionally, it creates road rails to help keep the vehicle on the road.  It also creates a simple ditch on each side of the road from a simple profile. Additional options include material selection, which changes the road appearance.

It’s not often that I get to share stuff from work, but this is only a taste of what it can do. The project will eventually be released to the public. Hopefully some day I can share a video of everything it does.

The vehicles are from the Car Tutorial project provided by Unity.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>