Using Houdini Engine to generate Unreal Spline Meshes

   2536   0   1
User Avatar
Member
10 posts
Joined: March 2019
Offline
Hi all! First time posting here, hoping for some advice on a weirdly specific topic.
I've been using Houdini and HE for about 9 months now, relatively new still, so don't assume I've done anything remotely correct

I have created a HDA I'm using in Unreal that places meshes along a spline - pretty standard stuff really, resamples based on mesh length, creates instance attributes for the meshes input, raycasts to a landscape etc.

This so far has all been working great, but because the meshes are just instances at the moment, they (of course) cannot deform or bend. My naïve solution so far was to create, deform and output a new mesh, which works OK but does not scale well at all to larger objects, such as a 100m long fence line or similar.

I'm now trying to upgrade this HDA to take advantage of Unreal's Spline Meshes, which are a magical unreal actor that can uniquely deform meshes along a spline but still keep their LODs, eg. a big large-radius curving pipe or fence where each instance of the mesh is deforming uniquely to follow the spline but it all remains performant.

I was wondering if anyone has attempted something similar?

At first I didn't think it would be possible for HE to generate the Spline Mesh components directly, so I would need to have an option to output the curve from the HDA (instead of instance points) and then feed that into a blueprint that created the Spline Meshes. This somewhat works but as far as I can tell, the output curve loses all the N, up etc attributes, so using that curve in a blueprint doesn't really match to what Houdini calculates. It also seems to only work correctly with meshes facing forward on X, even if changing unreals Spline Mesh options to use Y as forward facing. Maybe I'm missing some important maths here.

My second attempt was motivated by HEv2 being able to instance actors and set uproperties directly, but I haven't been able to strike the right balance here either. If I instance SplineMeshActor, then one Spline Mesh is added for every point (makes sense) instead of a Spline Mesh actor that follows multiple points. I considered maybe I could make a custom blueprint actor that creates the Spline Mesh, and then instance that once in HE, and then can pass it uproperties to construct it how I wish, but it appears as far as I can tell that HE can only instance built in or maybe C++ based actors.

Feel as though I've hit a bit of a wall but am so tantalizingly close.

Hopefully this makes sense. Any pointers are very appreciated!
  • Quick Links