Blender Terrain Generation

I found this neat method of creating terrain inside Blender and then exporting the file(.FBX). The .FBX file can then be easily dragged into your Playcanvas editor and then used for your scene. The version of Blender I am using is 3.1.0 and this free tool can be downloaded from the open source Blender site. Just search for it on the web and install. I should make a Youtube video showing the process live however, it’s hard to find editing time so written instructions were a bit faster. Let me know if you have any comments.

Start New File

Open the Blender software and create a new file by File->New->General. Once created you should see something like this.

Select the cube in the center of the screen and delete. Once deleted go ahead and add a new mesh and make it a plane. So Add->Mesh->Plane as shown below.

Once the plane has been added we will want to change the scale to fit a normal scene. I just decided that setting the scale of X, Y, and Z to 50 worked for me. Remember that the larger you make it the more memory will be used. Change the scale on the right hand pane like shown below.

You should have a 50 by 50 plane with a possible Z height of 50. Now we will switch to Edit Mode and subdivide the plane into 50 parts. To switch to Edit Mode use this dropdown and select Edit Mode as shown.

Now right click on the plane and select Subdivide. Open the menu item at the bottom left and change the number of cuts to 50 as shown.

Sculpting Terrain

Enter the sculpting mode by selecting it from the list like we did before for Edit Mode. Example is shown below.

Once in Sculpt Mode you can begin drawing the surface upward by holding the left mouse down and dragging it across the surface. This method will add height. If you don’t like what you have created you can hold down on the CTRL key and drag which will lower the surface. I found it best to use the Blob tool with the settings shown below. I have not experimented with the other tool selections but feel free to give them a try.

Export FBX

Once you have sculpted your terrain to your liking exit Sculpt Mode and change back to Object Mode. Make sure the object on the page is selected. If it is selected there should be an orange outline around it.

Now select File->Export->FBX(.fbx) and use the following settings. Most important is the selected folders next to copy.

And that’s it. Now you can drag your NewTerrain.fbx file into your editor and start working with it. Since this is your ground plane you are going to want to give it a collision of mesh and use the render in your FBX folder as your collision mesh. Also, don’t forget to add the rigid body as well. You can also add a nice ground material to it by creating one and dragging it on. Enjoy!

3 Likes

Nice tutorial, many thanks for sharing @Tirk182!

As an added tip, if you’d like a smoother terrain, you can go to edit mode, select all vertices/faces and smooth out normals:

3 Likes

very good addition to a helpful post!

1 Like