1 | 導入

このセクションでは、レベル構築プロセスに入り、地形生成のTOP ネットワークの開発から始めます。 これにより、Unity エディタ内で地形を完全にデザインできるようになります。 ここでは、レベルデザイナが地形をレイアウトできるように HDA を設計する方法を説明し、そのレイアウトへ地形侵食とタイル分割を施した完全な Unity 地形に処理する方法について説明します。


2 | 地形レイアウトツールの作成

地形構築プロセスの開始は、システムが地形をプロシージャルに生成するのではなく、レベルデザイナがシステムへの何らかの入力を提供出来る必要があります。 ここでは、レベルアーティストがまさにそれを実行できるように HDA を最初から構築します。 Houdini Engine ペインタを使用し、山の配置場所とその広さをデザイナが制御できるようにする方法について説明し、それから Unity エンジン内部で HDA からの出力方法を学習し、このセクションを終了します。


3 | 地形レイアウトツールのテスト

この HDA の構築ができたら、Unity エディタ内ですべてが正しく動作することを少し時間をかけて確認しましょう。


4 | メイン TOP ネットワークの作成

地形の大まかなレベルのレイアウトができれば、今度はレベル全体の構築を担う主要な TOP ネットワークの構築に集中していきましょう。 ここでは Unity ゲームエンジン用の大規模 TOP ネットワークを構築していきます。


5 | 地形の投影

ここでは、レイアウトジオメトリを Heightfield に変換し、Houdini 内で Heightfield のすべての機能を活用できるようにします。これにより 地形の侵食、分割、テクスチャ化、オブジェクトの分布が可能になります。


6 | 地形の浸食

大規模ゲーム地形のほぼすべてで、リアルな景観にするために浸食が使用されています。 そこで、TOPネットワークにも浸食を追加、ルックの微調整のためのコントロールを提供しましょう。


7 | Unity での TOP ネットワークのテスト

ここで、Unity 内で作成した TOP ネットワークをテストします。これにより Houdini Engine で TOP を使用した開発プロセスにより慣れ親しんでいきます。


8 | TOPs による地形へのテクスチャ追加

地形の中心的な要素の1つはマテリアルとテクスチャです。 達成するべきことは、地形構築中に自動的にテクスチャを割り当てることです。 そこで Houdini、TOPs、Houdini Engine for Unity を使ってこれを行う方法を見ていきましょう。


9 | Terrain Texture HDA の追加

地形へのテクスチャ処理を行う HDA が完成すれば、TOPネットワークに接続、Unity 内で地形のテクスチャを生成してみましょう。


10 | TOPs で地形の分割

地形の完成させるため、TOPs を使用して地形を分割する方法をみていきます。 これは大規模な地形に最適で、Unity のオクルージョンカリング機能を後々利用していくことができます。


11 | まとめ

このセクションを締めくくるため、講義を通して取り上げたトピックを簡単におさらいしましょう。



コメント

  • pauhol 5 年, 8 ヶ月 前  | 

    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 5 年, 8 ヶ月 前  | 

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

    Thanks !

  • borbs727 5 年, 7 ヶ月 前  | 

    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 5 年, 7 ヶ月 前  | 

    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 5 年, 7 ヶ月 前  | 

      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 5 年, 4 ヶ月 前  | 

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

        • james001 5 年, 3 ヶ月 前  | 

          same problem here

          • 7drew4massey3 5 年, 1 ヶ月 前  | 

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

            • Indie-Pixel 5 年, 1 ヶ月 前  | 

              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.
              Thanks!

              • 7drew4massey3 5 年, 1 ヶ月 前  | 

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

                • aarongrove 5 年, 1 ヶ月 前  | 

                  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 5 年, 1 ヶ月 前  | 

                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 5 年, 1 ヶ月 前  | 

                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 5 年, 7 ヶ月 前  | 

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

  • 3clipse 5 年, 7 ヶ月 前  | 

    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 5 年, 7 ヶ月 前  | 

      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 5 年, 7 ヶ月 前  | 

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

    • 3clipse 5 年, 7 ヶ月 前  | 

      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 5 年, 6 ヶ月 前  | 

    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 5 年, 1 ヶ月 前  | 

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

  • GlenD 5 年, 1 ヶ月 前  | 

    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 5 年 前  | 

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

    • Kind Lau 5 年 前  | 

      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 5 年 前  | 

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

    • FJSam 4 年, 11 ヶ月 前  | 

      Just google some textures.

  • BenjaminYde 5 年 前  | 

    I have it as well

  • FJSam 4 年, 11 ヶ月 前  | 

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

  • Florian13 4 年, 10 ヶ月 前  | 

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

  • AbePoppy 4 年, 9 ヶ月 前  | 

    Hi
    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 年, 9 ヶ月 前  | 

    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!

    https://www.youtube.com/playlist?list=PL5V9qxkY_RnI4olJ4uKJ2eKSyVqqRMW7r

    Thanks! :-)

  • AbePoppy 4 年, 9 ヶ月 前  | 

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

  • Indie-Pixel 4 年, 9 ヶ月 前  | 

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

  • Dean_Lv 4 年, 9 ヶ月 前  | 

    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 4 年, 9 ヶ月 前  | 

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

      • sascha 4 年, 6 ヶ月 前  | 

        Which tutorial is that?

  • sascha 4 年, 6 ヶ月 前  | 

    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 4 年, 4 ヶ月 前  | 

    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 4 年 前  | 

    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 3 年, 4 ヶ月 前  | 

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

    • morpheus_dreamer 3 年, 1 ヶ月 前  | 

      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 2 年, 6 ヶ月 前  | 

    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 2 年, 5 ヶ月 前  | 

      Currently having the same issue :(

Please log in to leave a comment.