Houdini Engine and Unity Terrain 2018.3+

   2704   4   0
User Avatar
Member
571 posts
Joined: May 2017
Offline
As of Houdini 17.5.302. there have been significant changes to the Houdini Engine for Unity's terrain generation system. In general, the terrain generation now fully works with the latest changes to Unity's terrain, and has a much improved workflow, thanks to feedback from users.

Most notably, the height layer is now strictly used for height values. And the mask layer is completely ignored.

Any additional heightfield layer is converted into a TerrainLayer.

Existing TerrainData and TerrainLayers files can be specified via string attributes. So you can create these beforehand in Unity, set up the textures and material info, then point to them in your layers via string attributes (file paths). Attribute names are specified found here: https://www.sidefx.com/docs/unity/_attributes.html#AttributesInput_Heightfields [www.sidefx.com]

On Recook, the existing Terrain, TerrainLayers, and splatmaps are kept as much as possible. But each of these might be updated/replaced if the HDA updates them. For example, if you generate a terrain with an HDA, then add your own TerrainLayers, they will be kept around unless you specify an existing TerrainData via an attribute (the TerrainData will override the one you were using). Similarly for TerrainLayers, if you specify them via attributes, they will override the ones that you are already using.

On Rebuild or Reset Parameters, all the terrain data is recreated.

If you use an Unity terrain as an input, its TerrainData and TerrainLayers file paths will be set via attributes. On the roundtrip back into Unity, these will be loaded and set on the new terrain. This is a good workflow to keep your terrain data around (i.e. use an input Unity terrain to make and preserve your changes there).

The online documentation has also been updated to reflect these changes: https://www.sidefx.com/docs/unity/_terrain.html [www.sidefx.com]

Changelist:
  • No longer creating “height” and “mask” layers as TerrainLayers or SplatPrototypes.
  • “height” layer is only used for height values, while “mask” is completely ignored; also removed from Terrain Section UI.
  • Only Terrainlayers/SplatPrototypes created are those specified in the HF volume layers other than “height” and “mask”.
  • On Recook, existing TerrainData, TerrainLayers/SplatPrototypes are reused (including ones added by user), and splatmaps are kept.
  • On Rebuild, TerrainData is created (reset), all user-added TerrainLayers /SplatPrototypes are removed, and splatmaps are cleared.
  • Only normalizing the splamaps if they aren't already normalized between 0 and 1 from Houdini.
  • No longer doing any calculation with splatmap weights (i.e. not summing to 1), so they are used as is, but with UI strenghts multiplied.
  • For TerrainLayer files specified via attributes, they are used as is unless TerrainLayer properties are modified via attributes, in which case the TerrainLayer is duplicated and modified (leaving the original TerrainLayer as is).
  • Updated online documentation's terrain section.

Bonus feature added, not related to terrain:
  • Added new “Load Geo File” option to HoudiniEngine menu to load in .bgeo;.bgeo.sc files.

Note that for Unity versions earlier than 2018.3, these updates also affect it. The difference is that instead of the new TerrainLayer, the old SplatPrototypes are used. Since SplatPrototypes are not assets stored in files, the plugin will not save or load them via string attributes. It is recommended to use the new terrain in 2018.3 and later going forward, as the priority for the plugin development will focus on the new terrain.
Edited by seelan - July 7, 2019 13:09:36
User Avatar
Member
571 posts
Joined: May 2017
Offline
Additionally, as of Houdini 17.5.286, a default terrain material can be set via Houdini Engine Unity's Plugin Settings. This material is then used when generating new Unity terrain. Especially useful when working with the Unity's new render pipelines such as HDRP, and LWRP.

For HDRP, it is recommended to use DefaultHDTerrainMaterial found in the HDRP package.
User Avatar
Member
8 posts
Joined: Jan. 2019
Online
Working good in Unity 2019… the only problems I am having is operator error (me lol)
User Avatar
Member
29 posts
Joined: Sept. 2017
Offline
seelan
As of Houdini 17.5.302.

  • No longer creating “height” and “mask” layers as TerrainLayers or SplatPrototypes.
  • Only Terrainlayers/SplatPrototypes created are those specified in the HF volume layers other than “height” and “mask”.


I just downloaded 17.5.293 and wondered why i get terrainlayers “height” and “mask” in unity. Where do i get 17.5.302?
User Avatar
Member
571 posts
Joined: May 2017
Offline
Daily builds: https://www.sidefx.com/download/daily-builds/ [www.sidefx.com]
Edited by seelan - July 5, 2019 15:59:46
  • Quick Links