Hello there!
I'm a Houdini beginner, and for a while now I've been struggling with developing and HDA for Unity that basically just gets a terrain input from within Unity, does scattering inside of Houdini and then outputs the final terrain with trees.
Everything's working well except the importing process. I'll attach a screenshot showing how I'm taking the terrain input from Unity.
The input system works, but it fails on some key points that I must have in order for this system to do exactly what I need from it. The thing is, the input system works perfectly if my Unity input terrain is at least 512x512 with a heightmap resolution of 513x513. That's great, however, I need my HDA system to work just as well with some very specific numbers, since that's how the game I'm working on has been developed so far.
I need my HDA system to work just as well when I'm feeding it a 100x100 Unity terrain with a heightmap of 1025x1025, and it doesn't. It's either not outputting anything, or it's outputting the terrain with artifacts.
I noticed that I'm able to output 100x100 terrains with a 1025 heightmap only if I'm creating the terrain from scratch inside Houdini. So if I create a Heightfield with size 100x100, and Grid Space of 0.09765625, then that's the equivalent of a 100x100m terrain with heightmap 1025, in Unity.
I came up with that uncommon Grid Space number by dividing the desired heightmap resolution (1024) by the terrain length (100) and using that result to divide 1 by it (1 / 10.24 = 0.09765625).
As I said, if I create a Heightmap inside Houdini with those settings, then my HDA outputs a perfectly nice 100x100 terrain with Heightmap resolution of 1025x1025, which is what I need.
The only thing is, I need my HDA to do the exact same thing but using an input instead of a normal Heightfield node. The reason for that is that I already have my terrain tiles done inside of World Machine and have brought these into Unity. I want to be able to feed my HDA with a specific terrain tile, have it do the splatmapping and scattering and then have that HDA output the final terrain correctly.
Below is a screenshot of my import system. And I'm using the "Object 1" parameter from Object Merge as a public input in my HDA, so I can add a Unity terrain into that slot from within Unity itself.
Can anyone point me towards the right direction with this one? Thank you so much!