【Houdini】Introduction to Procedural Modeling – Voronoi Fracture and UV mesh unfold

Introduction

In this article, I will explain how to place cobblestones on a plate polygon using Houdini.

If you use a square plate polygon, it will become a square cobblestone floor like this.

正方形の板ポリゴンから作成した丸石の床

A cobblestone floor created from a square plate polygon

 

If you use a star shaped plate polygon, it will become a star shaped cobblestone floor like this.

星形の板ポリゴンから作成した丸石の床

A cobblestone floor created from a star shaped plate polygon

What you can learn from this article

・How to use Houdini to place cobblestones in the floor

・How to unfold a UV mesh with Houdini

The previous article

Directions to create a cobblestone floor

Prepare a plate polygon(Grid node)

First, we need to prepare a plate polygon which we want to add cobblestones to.

I will use a Grid node (square plate polygon) for this tutorial.

Gridノードを作成

Create a Gride node

Gridノードで作成した正方形メッシュ

A square mesh created with Grid node

 

Split the plate(VoronoiFracture)

Next, we will split the plate using an algorithm called Voronoi tessellation.

I will not explain the details of Voronoi tessellation in this article, but dividing a plate as in the image below is called Voronoi tessellation.

ボロノイ分割した板

Plate divided by Voronoi tesselation

Prepare a center point for the split (Scatter node)

In order to divide a plate, we need to use a point cloud as a center point of the split.

We will use Scatter node to create a point cloud.

ScatterをGridに接続

Attach Scatter to Grid

Scatterノードで作成した点群

Point cloud created with the Scatter node

 

Using a point cloud for voronoi fracture (Voronoi Fracture node)

Next, we will use a Voronoi Fracture node to split the plate.

Attach the plate polygon (Grid node) to the left of the Voronoi Fracture node, and the point cloud (Scatter node) to the right of the Voronoi Fracture node.

Voronoi Fractureノードの作成

Create a Voronoi Fracture node

ボロノイ分割した板

Voronoi fracture and the plate

 

The plate has been divided, but it does not represent cobblestones yet.

Additional Info: Display wires

By pressing the Shift key + W key while selecting the Scene view, the wires will become displayed.

By pressing it once more, they will turn invisible again.

Rounding the stones (Resample node)

これから作成する丸石

The round stones we will create

 

Attach a Resample node to the Voronoi Fracture, and resample the divided parts.

Resampleノードを接続

Attach Resample node

Resampleの結果

Resample Result

Apply the resample result again to round up the stones.

Resampleノードを接続

Attach Resample node

Resampleの適用結果

Resample Apply Result

 

Thicken the stone (PolyExtrude node)

Attach the PolyExtrude node to the Resample node in order to thicken the stones.

PolyExtrudeノードを接続

Attach PolyExtrude node

PolyExtrudeの適用結果

PolyExtrude apply result

 

Unfold UV mesh (UV Texture node)

Lastly, unfold the UV mesh.

UV Textureノードを接続

Attach UV Texture node

Attach the UV Quick Shade node and display the UV mesh as in the image below.

UV Quick ShadeでUVを確認

Check the UV with the UV Quick Shade

The cobblestone floor is complete with this process.

 

OBJ file export (ROP Geometry node)

Use the ROP Geometry node to export as an OBJ file.

Enter the obj file path for Output File, and click the Save to Disk button to export as an obj file.

ROP Geometryノードを利用してOBJファイルをエクスポート

Use the ROP Geometry node and export as an OBJ file

If you import the OBJ file to an Unity scene, it will look as in the image below.

Unity上での丸石の表示

Cobblestone floor in Unity

マテリアルを整理する

When imported to Unity, the material of the OBJ file is divided into two.

We can prevent this by setting a Group within Houdini.

マテリアルが複数存在している

Multi materials exist

 

If you check the Voronoi Fracture node from previous steps, the group settings are active so we need to deactivate them.

Uncheck the Interior Group and Exterior Group option.

Voronoi Fractureノードの設定を変更

Change the Voronoi Fracture node settings

 

If you export as an OBJ with these options, only one default material will exist.

マテリアルが1つになっていることが確認できる

Only one material exists

How to upload a prefab from Unity to STYLY

In order to learn how to upload your created prefab to STYLY, refer to the article below.

Extra:Create a round floor

We used a Grid node to create a square cobblestone floor, but if you replace the Grid node with a Circle node, the result will be a circle cobblestone floor.

円形の丸石の床

Round cobblestone floor

The normal direction of the Circle node is opposite of that of the Grid node, so I used the Reverse node to flip the direction.

CircleノードにReverseノードを接続

Attach the Reverse node to the Circle node

 

Extra 2:Create a star-shaped floor

I will explain how to create a star-shaped floor as in the image below.

星形の床

Star-shaped floor

How to create a star-shaped floor

You can create a star shape by using the Circle node to create a regular decagon and making the even vertices smaller.

星形の床を作るノード全体

Creating a star-shaped node

 

Circle node settings (Create a regular decagon)

Change the Division of the Circle node to 10, and it will transform into a regular decagon.

Circleノードの設定を変更

Change Circle node settings

 

結果

Result

 

Group by Range node settings (Select even vertices)

Apply group1 to the even vertices.

CircleノードにGroup by Rangeノードを接続

Attach Group by Range node to the Circle node

結果

Result

 

Transform node settings (Making the selected even vertices smaller)

Use the Transform node and change the even vertices to a 0.5 scale.

Transformノードを利用して拡大・縮小を行う

Use the Transform node to change the scale

結果

Result

 

Completed star-shaped floor

By turning the UV Texture node Display flag on, a star-shaped cobblestone floor as in the image below will show up.

DisplayフラグをONにすると結果を表示できる

Turn the Display flag on

結果

Result