1 | Introduction

In this next section we are going to dive into our level building process and begin with developing the top network to generate terrains.  This will walk us through a workflow that allows us to completely design our terrains within the Unity Editor.  We will walk through how to design an HDA to enable level designers to layout a terrain and then how to process the layout into a final Unity terrain complete with erosion and split into tiles. 

2 | Creating a Terrain Layout Tool

To start our terrain building process we should let level designers provide some sort of input to the system rather than let the system procedurally generate a landscape for us.  In this lecture we are going to build an HDA from the ground up to allow level artists to do just that.  We will look at how we can use the Houdini Engine painter to give designers control over where mountains should be placed and how big they should be.  We will then close out the section by learning how we can export from an HDA, directly inside of the Unity engine.

3 | Testing the Terrain Layout Tool

With that HDA built, let’s take some time and make sure everything is working the way we want inside of the Unity editor.

4 | Creating the Main TOP network

Now that we have a rough level layout for our terrain, let’s now focus our attention on building the main TOP network that will be responsible for building our entire level.  This will introduce you to building larger TOP networks specifically for the Unity Game Engine.

5 | Projecting the Terrain

In this lecture we are going to convert our layout geometry into a usable Heightfield, so we can leverage all the Heightfield functionality inside of Houdini.  This will set us up to erode, split, texture and scatter our terrain.

6 | Eroding the Terrain

Just about every large game terrain uses erosion to add more realism to the look and feel.  So let’s go and add some erosion to our TOP network and provide some controls for users to tweak the look.  

7 | Testing our TOP Network in Unity

In this lecture we are going to test out our TOP network inside of Unity.  This will also get us more comfortable with the development process when using TOPs with the Houdini Engine.

8 | Texturing Terrains with TOPs

One of the core components of a terrain is its material and textures.  What we want to do is automatically assign our textures to the Terrain while it is being built.  So let’s take a look at how we do this with Houdini, TOPs and the Houdini Engine for Unity.

9 | Hook up the Terrain Texture HDA

Now that we have the HDA which is responsible for the texturing of the terrain, let’s get it hooked into the TOP network so it is producing the textures for our terrain inside of Unity.

10 | Splitting Terrains with TOPs

To finish off our terrain, we should take a look at how to split our terrains using TOPs.  This is great for large scale terrains so we can take advantage of the Occlusion Culling feature in Unity.  

11 | Conclusion

To close out this section let’s do a quick review of the topics we covered throughout the lectures.


  • pauhol 4 years, 11 months ago  | 

    Does splitting the terrain into tiles affect the speed the cooking takes in Unity compared with keeping the terrain as one pice and cooking it ‘whole’?

    What is to prefer in order to keep the waiting time down as much as possible for testing out different variations (for example trying out different settings on the noises) of the terrain in the scene?

    Thank you!

  • Petoncle56 4 years, 11 months ago  | 

    Really a great tutorial, but as pauhol said, is splitting the terrain into tiles affect performances ?

    Thanks !

  • borbs727 4 years, 10 months ago  | 

    Is it possible to undo while painting? I'm noticing that ctrl+z doesn't do anything making the workflow kind of clunky. I haven't finished the tutorials yet, so maybe there's a solve, but at the moment I'm thinking it might be best to do all the setup in Houdini and just send over the result to Unity.

  • Indie-Pixel 4 years, 10 months ago  | 

    Howdy Guys! I am going to try to answer these questions as best I can.

    With regards to speeding up the design of terrains and performance when using Split Terrains, I highly recommend splitting the terrain when using PDG as you can update the individual tiles when they are dirtied rather than having to update the entire terrain for every small modification. You can do this using the Partition by Bounds and setting the Dirty mode to "Mapping Standard". This will make it so only those tiles that are affected by a change will update. That said, if you are updating something like changing the entire noise on a whole terrain, this would update the terrain as a whole anyways. Let me outline a different way to go about designing terrains to speed up the iteration time.

    Basically what I have started doing is creating terrain stamps. These stamps are exactly like brushes in Zbrush or Photoshop, but they are in 3D...but have the same sort of falloff. Each stamp represents a different type of terrain feature. Large mountain, river bed, rolling hills, etc. I then use those stamps in Houdini Engine to craft an entire game level. This is faster cause all the stamps are individual HDA's. This give more iteration to design. When I am happy with the design I turn it into a unity terrain by projecting it onto the terrain stamps.

    Hopefully that helps with the design of terrains.

    With regards to undo while painting, I don't see it either...I usually put the brush in subtract mode and remove value from the attributes. It is totally valid to create the rough terrain shapes in Houdini as well and just import the bgeo file into your PDG network.

    Thanks so much guys! :-)

    • borbs727 4 years, 10 months ago  | 

      I'm having trouble getting the textures to work in Unity. The cook finishes but it's just a blank terrain.

      I've found this information about the "Resources" folder requirement in the Unity docs and am just curious if this is why we're required to use this project structure with PDG?

      Also, here's my error message for the missing textures:

      Part with id 3 is missing.

      Unable to setup instancer!

      • olindstrom 4 years, 7 months ago  | 

        Did you ever find an answer to this? Currently having the same issue.

        • james001 4 years, 6 months ago  | 

          same problem here

          • 7drew4massey3 4 years, 4 months ago  | 

            Has anyone tracked this down? I'm having the same problem still too. Houdini 17.5.360, Unity 2019.2.

            • Indie-Pixel 4 years, 4 months ago  | 

              Howdy Drew!
              So yes! I actually got a fix for ya. So there were a lot of changes to the terrains in Unity 2019.2 it seems...Ive tested with Houdini 17.5.380 and HEngine 3.2.44 and its working using the unity_hf_texture_diffuse attribute on prims. I tried using the new Terrain Layers through HEngine but they still seem broken. But hooking up your Diffuse, Normal, etc using the hf attrs works! Let me know if you need an example.

              • 7drew4massey3 4 years, 4 months ago  | 

                Thank you so much! Switched to Unity 2018.3 and works like a charm.

                • aarongrove 4 years, 4 months ago  | 

                  Hi, having trouble with the part 9 as well, the texture node in unity fails for me (runs fine in houdini). The other nodes work fine, and I've tried comparing against the provided project files. I'm also using Houdini 17.5.360 and Unity 2019.2, and when I started a new project in Unity 2018.3 all my nodes failed. I also get the "Part with id 1 is missing" and "Part with id 3 is missing" errors. Do you have any ideas why this could be happening or more information about how I can go about finding the issue? Thanks.

              • Opheliar 4 years, 4 months ago  | 

                Just to be 100% sure, can you show an example of what you mentioned? This tutorial is great thanks to your constant examples of the common errors or oversights.

              • stinzen 4 years, 4 months ago  | 

                Hey! I have the same problem as the other with the texture node failing in Unity and the "Part with id 3 is missing. " error. Would be great if you could make an example with the correct setup. Thanks.

  • borbs727 4 years, 10 months ago  | 

    Also, thanks for the tutorials! I'm learning a lot!

  • 3clipse 4 years, 10 months ago  | 

    k so cannot get my textures to show up in Unity... (other than the Grass). After the texture node is added your implementation starts cooking 7 nodes. Mine still only starts cooking 4. So the issue is somewhere here, however I have gone over the tutorials from lecture 8 and 9 up to this point multiple times now and cannot see what I have done incorrectly I am hoping that there is an obvious answer that I have missed?

    • 3clipse 4 years, 10 months ago  | 

      nvm... I did not have the erosion HDA selected when I copied the File node... copied a new one correctly and it works fine... still only cooks 4 nodes (perhaps that is a change in 17.5.173

  • shoria 4 years, 10 months ago  | 

    I cannot find any textures (.tga) in the project files. Any clue where I can find them?

    • 3clipse 4 years, 10 months ago  | 

      Go onto the unity store... there are plenty of free textures there... also opengameart . org etc... simply google free textures and you will be able to get 3 to get through the tutorial... same applies for the prefabs... they aren't great but they are sufficient to at least get the tutorials finished.

  • Vectonaut 4 years, 9 months ago  | 

    Hey Kenny, really great tutorial so far and I really appreciate the amount of work you've put into this whole series (and other tuts).

    Just wanted to point something out for those not aware, and which is a huge time saver for updating HDA parameters. Basically instead of navigating up and down the network nodes to right click open the HDA type properties, you can instead right click on the HDA in the network file path. You know the bit just above the network graph with something like 'obj/level_creation_top/topnet1'. Just right click where your HDA is and you'll see the type properties option.

    Here's a picture to make it super obvious: https://i.imgur.com/58VyBos.png

    This means you can stay deep down in the network of your HDA and bring up the type properties window whenever you need it. I never see this mentioned in tutorials, but it's such a great quality of life improvement.

    • Indie-Pixel 4 years, 4 months ago  | 

      Whaaaa! Nice! How did I never know about that! Thanks! :-)

  • GlenD 4 years, 4 months ago  | 

    Hi everyone. Working on one of the last videos, Splitting the terrain. When I split the terrain in Unity, and Cook Node, only one tile is appearing. Is anyone else have this issue?

    • KokLiangTan 4 years, 3 months ago  | 

      I do address the same issue either! Did u solve it?

    • Kind Lau 4 years, 2 months ago  | 

      Houdini 17.5.425 and H Engine 3.2.44 , Unity 2018.4.11,has same issue.
      And I try to add attribute "unity_hf_terraindata_export_file " to heightfield for keeping terrain data, but nothing help : (

  • stausend 4 years, 3 months ago  | 

    None of the course file does contain the Terrain Textures. Anyone know where to get them?

    • FJSam 4 years, 2 months ago  | 

      Just google some textures.

  • BenjaminYde 4 years, 3 months ago  | 

    I have it as well

  • FJSam 4 years, 2 months ago  | 

    There's no iteration parameter in the new HDA processor in hou 18. How do I go through each tile ?

  • Florian13 4 years, 1 month ago  | 

    I'd love an answer to that questions too. Where did the "Iterations" option go in Houdini 18? :(

  • AbePoppy 4 years ago  | 

    I'm following this AMAZING tutorial and I'm ending up in a strange bug
    I'm at 7 | Testing our TOP Network in Unity
    and I'm having a strange bug:
    I have the TOP network cooking in Unity, but no output came out in Unity if the output is a Heightfield. If I add in the erode_terrain HDA a Convert Heightfield node at the end (that converts the HF into a polygon) and the output is properly visualized in Unity, which means the paths configuration is correct, but if I remove that node, no heightfield output came out.
    Is there a specific setting that I am missing to visualize hf in Unity? does the new version of Unity have excluded hf a possible output?

  • Indie-Pixel 4 years ago  | 

    Howdy Abe!
    It sounds like you are running into the Unity + Terrain material issue. So things changed with Unity and Houdini, in the way they add materials to the Heightfields when using HDAs or PDG. I made an update course on my Youtube page to help out with this cause I was getting so many questions about the same issue. Below is the link!


    Thanks! :-)

  • AbePoppy 4 years ago  | 

    I'm shocked by the speed of this answer.
    I'm going to follow this new tutorial!

  • Indie-Pixel 4 years ago  | 

    No prob at all! Let us know if anything else pops up! :-)

  • Dean_Lv 4 years ago  | 

    Hello i'm a new. I have a question, If I have generate the terrain,When I work on the terrain in unity, such as modified the hight data. Then to cook it agen, It will override the unity data? How to keep my exisiting data. Thanks for your tutorial,it give me help a lot.

    • Dean_Lv 3 years, 11 months ago  | 

      I'm very happy I have find a correct methods in your other tutorial. you are best mentor!

      • sascha 3 years, 9 months ago  | 

        Which tutorial is that?

  • sascha 3 years, 9 months ago  | 

    In Unity 2019.3.13f my levelCreateTOP1_OUTPUTS can't load the projected heightfield and eroded terrain, similar error as above: "Part with id 3 is missing. Unable to generate instance!" Is there any workaround to prevent that?

  • javadgholami1369 3 years, 7 months ago  | 

    I'm really curious about that is how to make seamless terrain for big map environment ( like so we have a map with the size of 48 km * 48 km
    I see in one the Houdini showcase ( https://www.youtube.com/watch?v=NfizT369g60&t=707s) for the FarCry game (in the 5:00)
    I don't understand what they do so the terrain intersection match together so please tell me ( if anyone know) how I can make this kind of feature

  • MartinBackhaus 3 years, 3 months ago  | 

    Hi, currently I am getting an Error "Expected HAPI_ATTROWNER_PRIM attribute owner for attribute unity_hf_terrainlayer_file but got HAPI_ATTROWNER_VERTEX!
    UnityEngine.Debug:LogWarningFormat(String, Object[])" in Unity 2019.4.12 with Houdini 18.0.597 and the terrain layers are not setup correctly. They are present, but the textures are not applied automatically using the string attribute. I already reported it so SideFX.

  • gabhpe 2 years, 7 months ago  | 

    When I generate the working itens in Unity each terrain that is splitted loses its terrain layers. What can I do?

    • morpheus_dreamer 2 years, 4 months ago  | 

      Hi Gabhpe, I am having the same issue losing the terrain layers. The last tile that gets processed still retains them however. Did you find a fix for this?

  • slient 1 year, 9 months ago  | 

    Hello, I have a problem, which can't be solved after checking a lot of information.
    unity:2020.3.34f1, houdini:19.0.589
    The first time I cooked, the result was correct. But i dirty&cook, and the result was wrong. At this point, the terrain will be flattened into a height map and the size will be reduced.
    After checking, I found that the reason is that houdini's node added attributes other than mask and height to terrain, such as base, water, cliff, etc. If only the mask and height attributes are kept, I can normally dirty&cook.
    How can I solve this problem? I'd appreciate any information you could give me.

    • sinngetu 1 year, 8 months ago  | 

      Currently having the same issue :(

Please log in to leave a comment.