Procedural Ground – HDA

Last Updated by

Preview of Custom Procedural Ground HDA in Unity.

I have a fascination with procedural everything. Be it procedural animations, models, shaders, game mechanics, environment designs or simple procedural noise. I have self taught myself game design and development, hence couldn’t really get chance to try new technologies and softwares. So the first chance I got, I installed Houdini Indie and thought of giving a try to procedural 3D asset creation pipeline.

I had to start somewhere, hence I started with Procedural Ground creation using various modules of Houdini and Unity. Firstly I created a node graph for the asset in unity.

Houdini Asset Creation

grid node – Creates planar geometry.

mountain node – a SOP Displaces points along their normals based on fractal noise.

anti-aliased noise vop node – Generates anti-aliased noise by using the derivative information of the incoming position to compute band-limited noise.

uv-flatten node – Creates flattened pieces in texture space from 3D geometry.

uv-transform node – Transforms UV texture coordinates on the source geometry.

unity material attribute
Adds or edits user defined attributes, like for unity material relative path here.

Inside VEX Builder for the Anti-Aliased Noise Point VOP Node used above.

Type Parameters inside Nodes Exposed to UI Interface

Unity HDA Pipeline

The procedural model created from Houdini is saved as a HDA (Houdini Digital Asset) and imported into Unity. On adding it to the scene, in inspector window Houdini’s custom editor is displayed with the type parameters used in Houdini asset pipeline.

To use the vertex color settings and procedural material linking, I decided to create a custom shader of my own. Its created via Shader Graph but is very simple. It has two variations for normal, metallic, AO and Base Color to lerp from and Vertex Color red channel powered with “Mix Power” attribute and clamped between 0 to 1. You can find the shader graph, here. Then we create a material using this shader and assign the respective textures and properties, then assign it to the procedural ground asset in the scene. Also add this material’s relative path in the asset’s “Unity Material Relative Path” property, so that even after “Rebuild Asset” or “Recook Asset” the material linking remains the same.