Unity 3D Terrain from Blender ANT Landscape Generator

Unity Blender ant landscape generator

Terrains in Unity may be generated using Blender's ANT Landscape Generator.

Launch website.

Install ANT Landscape Generator if not already in Blender.

In Blender, select File » User Preferences...:

Blender user preferences

Under the Addons group, select the Install Addon... button.

Blender addons

Navigate to the add_mesh_ant_landscape.py script, and with the script selected press the Install Addon... button.

Once installed, enable the add-on by placing a check in the Add Mesh: ANT Landscape group.

Blender enable addon

With a new scene ready in Blender, the default camera and lamp may be removed. Only the terrain is needed for import to Unity.

Blender new scene

Create a landscape in Blender by selecting Add » Mesh » Landscape.

Blender add landscape

Blender will generate a 3D mesh of a landscape.

Blender new landscape

Blender new landscape perspective

Landscape parameters may be tuned to different terrains.

Blender mesh options

Blender new landscape islands

With the landscacpe selected in Blender, export the mesh to a Wavefront OBJ file by selecting File » Export » Wavefront (.obj).

Blender export landscape obj

In unity, create a new terrain by selecting Terrain » Create Terrain

Unity create terrain

Unity new terrain

Import the landscape Wavefront OBJ file.

Unity terrain asset

Drag the default mesh from the terrain OBJ file, and drop it on the Unity terrain.

Unity terrain asset default mesh

Unity drop mesh on terrain

This will result in the mesh as a child of the Terrain hierarchy.

Unity terrain mesh hierarchy

To apply to the imported landscape mesh to the terrain object in Unity, use the Object2Terrain.js script.

Under the Unity project assets, create an Editor folder, and place the Object2Terrain.js script in the folder.

Unity object2terrain editor script

Now with the default mesh of the terrain selected in the hierarchy, select Terrain » Object to Terrain.

Unity terrain menu object to terrain

Unity terrain object now reflects the imported landscape mesh from Blender.

Unity terrain from mesh

Children of the Unity may now be deleted from the terrain object.

Scripts

Blender ANT Landscape Generator – addmeshant_landscape.py

Unity Object to Terrain – Object2Terrain.js

comments powered by Disqus