Custom Inputs

   4102   3   1
User Avatar
Member
2 posts
Joined: June 2019
Offline
Hi,
I am currently investigating if and how we can integrate Houdini into our game.
Currently I am looking into how we can give our own data structures as input to Houdini.
For example we currently have a set of custom splines already with some data attached and would like to map these to a HDA Input and generate some assets/meshes from these.

The only ways I currently see how this could work is by ether instancing some HoudiniAssetActors with the target HDA and copy over the data needed for the HDA. Or break open the Houdini Plugin and Inject some custom code which reads the custom data or leverages the HAPI.

Do I overlook something here or are these my two options?
User Avatar
Staff
534 posts
Joined: Sept. 2016
Offline
Hi,

I think the only reasonable option for adding support of custom component types as input is to customize the plugin's code.

A good starting point would be to allow UHoudiniAssetInputs to accept your custom component type
(see UHoudiniAssetInput::UpdateInputOulinerArrayFromActor)
Then write the corresponding exporter
( see FHoudiniEngineUtils::HapiCreateInputNodeForWorldOutliner / FHoudiniEngineUtils::HapiCreateInputNodeForSpline )

Actually, if your custom component derives from Unreal's USplineComponent, you may just to need to add some additional code to HapiCreateInputNodeForSpline() to add your custom attributes when the spline casts to your custom spline.
User Avatar
Member
2 posts
Joined: June 2019
Offline
Thank you for your input.
I now solved it with a abstract UHoudiniCustomAssetInputcomponent. With a virtual function which signature looks very similar to all the CreateInputNodefunctions from the FHoudiniEngineUtils.
I also extended FHoudiniEngineUtils:HapiCreateInputNodeForWorldOutliner,FHoudiniAssetInputOutlinerMeshand UHoudiniAssetInput::UpdateInputOulinerArrayFromActorrespectively to to handle the new component type.

Now I can just Implement in the project space any Custom Input I like.
If there are more people interested in this kind of behavior I could share the code.
User Avatar
Member
453 posts
Joined: Feb. 2013
Offline
I don't need it right now, but I would generally appreciate to see it anyways, cause it might come in handy later. XD
  • Quick Links