You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to make a tool where an artist can paint on a Terrain using Terrain Layers inside of Unity, assign this to an HDA, and for these maps (Splatmaps?) to appear on the HeightField alongside the height and mask volumes.
I've been unable to find a combination of Terrain Width/Height, Heightmap Resolution, Control Texture Resolution etc that doesn't throw a "Setting VolumeInfo Data : Invalid argument given: length is out of range." error when uploading the data to Houdini Engine.
I did, however manage to get it to work by editing the source (HEU_InputInterfaceTerrain.cs::UploadAlphaMaps() (line 436 on the latest version), removing this line :
.. which I was finding was producing a float[] that was the wrong size for the volume created a few lines earlier using CreateHeightfieldInputVolumeNode.
It looked like the HEU_TerrainUtility.ResampleData is resampling the Splatmap to the same dimensions as the heightfield (which is [power of 2] + 1 x [power of 2] + 1), but the Splatmap is just ([power of 2] x [power of 2]).
This meant that, with a splatmap of 512 x 512, Unity was telling Houdini to create a volume of dimension 512x512, but then sent it a float[] of size 513 x 513, resulting in the out of range error.
Is it possible that Unity 6's terrain system is now returning an extra heightmap of the wrong size, which makes earlier calculation of heightSizeX/Y incorrect ? Or do I simply have the wrong settings for terrain dimensions?
Here's my terrain settings for reference :
Thanks for the great work otherwise, this Unity->Houdini bridge is allowing us to do some amazing things, and our artists are very happy!
The text was updated successfully, but these errors were encountered:
I'm trying to make a tool where an artist can paint on a Terrain using Terrain Layers inside of Unity, assign this to an HDA, and for these maps (Splatmaps?) to appear on the HeightField alongside the height and mask volumes.
I've been unable to find a combination of Terrain Width/Height, Heightmap Resolution, Control Texture Resolution etc that doesn't throw a "Setting VolumeInfo Data : Invalid argument given: length is out of range." error when uploading the data to Houdini Engine.
I did, however manage to get it to work by editing the source (
HEU_InputInterfaceTerrain.cs::UploadAlphaMaps()
(line 436 on the latest version), removing this line :alphaMapsConverted[m] = HEU_TerrainUtility.ResampleData(alphaMapsConverted[m], sizeX, sizeY, heightsSizeX, heightsSizeY);
.. which I was finding was producing a
float[]
that was the wrong size for the volume created a few lines earlier usingCreateHeightfieldInputVolumeNode
.It looked like the
HEU_TerrainUtility.ResampleData
is resampling the Splatmap to the same dimensions as the heightfield (which is [power of 2] + 1 x [power of 2] + 1), but the Splatmap is just ([power of 2] x [power of 2]).This meant that, with a splatmap of 512 x 512, Unity was telling Houdini to create a volume of dimension 512x512, but then sent it a
float[]
of size 513 x 513, resulting in the out of range error.Is it possible that Unity 6's terrain system is now returning an extra heightmap of the wrong size, which makes earlier calculation of
heightSizeX/Y
incorrect ? Or do I simply have the wrong settings for terrain dimensions?Here's my terrain settings for reference :
Thanks for the great work otherwise, this Unity->Houdini bridge is allowing us to do some amazing things, and our artists are very happy!
The text was updated successfully, but these errors were encountered: