Sunday, April 10, 2016

Houdini Procedural Content Generation - Racing Track

First Blog! 

I'm working on project Game to Garage. We are group of five, advised by Autodesk. We are building a car design game. The goal of the project is to integrate gaming as a tool into design process. We try to explore how things shape things, and through a playable game, let our audience understand the trade-offs in chassis design.We are using Autodesk's new game engine Stingray and their AI generative design software Dreamcatcher.

This blog is to record how I build a procedural racing track for this game as a technical artist. The software I use is Houdini.

In order to build a racing track. I need a track and terrain. The requirement I got from designer was track in flat desert. 

  • Draw half of the curve (NURBS curve).
  • Mirror and join two together.
  • Assign the UV to u direction. Convert Node is important. U Order works similar as sampling. 2 maintains points number, 3 will double, 4 will triple. Splines will preserve the shape of the geometry they are converted from. Otherwise, points in the geometry are used as points in the hull.

  • * Texture type: Arc Length Spline. A very useful method for NURBS surface uv unwrapping. 


Base_curve node network


  • Using a short line segment as the cross section for the later sweep node. Assign its UV to v direction. *Texture type: Arc Length Spline. Keep the cross_curve UV scale in U as 1. In order to keep the later uv map scale correct, change base_curve UV scale in U to [arclen("../resample1/",0,1,0)/arclen("../line1/",0,1,0)]. So the uv map is not stretched.



  • Sweep to get a basic track with correct uv map.



  • Now I get a track. 


  • Build a simple desert terrain, with mild noise.



  • Using node Ray to project the track onto the terrain. The Ray operator projects rays from each point of the first input geometry in the direction of its normal, and then moves the point to any geometry the ray hits from the second input. Ray Scale controls how much translation alone the ray. Lift controls y direction translation. Now the track have the same bumps as terrain.  
                                  



  • Merge the track and terrain together. Clean up the normal.

  • Organize the node network.
Entire node network
  • Create a digital assets. Promote some user defined parameters including user input curve, track width, smoothness, UV scale and so on.






No comments:

Post a Comment