Issues with Unity Terrain as input

   Views 3806   Replies 2   Subscribers 1
User Avatar
Member
2 posts
Joined: Aug. 2019
Offline
I'm trying to import a Unity Terrain into Houdini(with an object merge node) but then I get an argument out of range error ( Recook error: System.ArgumentException: Trying to access out-of-bounds terrain height information. ). I understand what it means, but not sure how should I fix it? I tried to follow the manual but to my understanding, it should just recognize a Unity Terrain and then convert it to heightfield in the background, what am I missing here?

Edit: I also get a “Houdini heightfield voxel size differs from terrain input” warning, however I'm not sure why. The heightfield size in Houdini is set to 512 by 512, grid spacing set to 1 and sampling set to corner. I tried changing the Unity terrain width and length to 512x512(heightmap resolution is 513x513), 511 and 513 as well(in case I misunderstood something in the manual) but I get the same error and warning.

I'm using Houdini 18.0.499, with HE 3.3.11 and Unity 2019.4.5f1
Edited by receceasd123 - Aug. 5, 2020 18:34:00
User Avatar
Member
2 posts
Joined: March 2019
Offline
I have the exact same issue.
Edited by Alberto_Mastretta - Oct. 20, 2020 16:23:19
User Avatar
Member
2 posts
Joined: March 2022
Offline
Hello! I found solution from an issue in git. Here it is - https://github.com/sideeffects/HoudiniEngineForUnity/issues/32 [github.com]

In short, to make a Unity terrain work with engine, you need to edit the source (HEU_InputInterfaceTerrain.cs), removing this line:
alphaMapsConverted = HEU_TerrainUtility.ResampleData(alphaMapsConverted, sizeX, sizeY, heightsSizeX, heightsSizeY)
  • Quick Links