[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 on a floor

・How to unfold a UV mesh using 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 Grid node


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

A square mesh created with Grid node

 

Split the Plate (Voronoi Fracture)

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 tessellation

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 for 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 side 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

Wires can be displayed by pressing the Shift + W keys while selecting in Scene view.

By pressing it once more, they will turn invisible.

Rounding the Stones (Resample Node)

これから作成する丸石

Rounding the stones

 

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

This completes the process to make a cobblestone floor.

 

OBJ File Export (ROP Geometry Node)

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

Enter the obj file path for the 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 into a Unity scene, it will look like the image shown below.

Unity上での丸石の表示

Cobblestone floor in Unity

Organize Materials

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

We can prevent this by setting up 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 file 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 circular 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 seen 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 with smaller vertices.

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

Creating a star-shaped node

 

Circle Node Settings (Create a Regular Decagon)

Change the Division of the Circle node to 10, and the shape will be transformed 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 appear.

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

Turn the Display flag on


結果

Result