- 1 Introduction
- 2 What you can learn from this article
- 3 Directions to create a cobblestone floor
- 3.1 Prepare a plate polygon(Grid node)
- 3.2 Split the plate(VoronoiFracture)
- 3.3 Rounding the stones (Resample node)
- 3.4 Thicken the stone (PolyExtrude node)
- 3.5 Unfold UV mesh (UV Texture node)
- 3.6 OBJ file export (ROP Geometry node)
- 4 マテリアルを整理する
- 5 How to upload a prefab from Unity to STYLY
- 6 Extra:Create a round floor
- 7 Extra 2:Create a star-shaped floor
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.
If you use a star shaped plate polygon, it will become a star shaped cobblestone floor like this.
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.
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.
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.
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.
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)
Attach a Resample node to the Voronoi Fracture, and resample the divided parts.
Apply the resample result again to round up the stones.
Thicken the stone (PolyExtrude node)
Attach the PolyExtrude node to the Resample node in order to thicken the stones.
Unfold UV mesh (UV Texture node)
Lastly, unfold the UV mesh.
Attach the UV Quick Shade node and display the UV mesh as in the image below.
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.
If you import the OBJ file to an Unity scene, it will look as in the image below.
When imported to Unity, the material of the OBJ file is divided into two.
We can prevent this by setting a Group within Houdini.
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.
If you export as an OBJ with these options, only one default material will exist.
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.
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.
Extra 2:Create a star-shaped floor
I will explain how to create a star-shaped floor as in the image below.
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.
Circle node settings (Create a regular decagon)
Change the Division of the Circle node to 10, and it will transform into a regular decagon.
Group by Range node settings (Select even vertices)
Apply group1 to the even vertices.
Transform node settings (Making the selected even vertices smaller)
Use the Transform node and change the even vertices to a 0.5 scale.
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.