HummingSowrdsman
July 23, 2019 05:11:53
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?
dpernuit
July 24, 2019 12:46:28
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.
HummingSowrdsman
July 25, 2019 09:47:21
Thank you for your input.
I now solved it with a abstract UHoudiniCustomAssetInput
component. With a virtual function which signature looks very similar to all the CreateInputNode
functions from the FHoudiniEngineUtils
.
I also extended FHoudiniEngineUtils:HapiCreateInputNodeForWorldOutliner
,FHoudiniAssetInputOutlinerMesh
and UHoudiniAssetInput::UpdateInputOulinerArrayFromActor
respectively 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.
DASD
July 30, 2019 10:44:41
I don't need it right now, but I would generally appreciate to see it anyways, cause it might come in handy later. XD