On this page

Houdini Cookable

Note

This page describes internal refactoring that happened in Houdini 21.0 and is mainly aimed at developer who customized the plugin code.

In Houdini 21.0, the core of the plugin was rewritten to no longer rely on a Component (the Houdini Asset Component) as the main data holder for Houdini Asset.

A new object, the Houdini Cookable was introduced, and the cookable is now the object that stores all the node, parameter, input, output, and all other options data to link the HDA to Unreal.

This change means that you are no longer forced to create a Component/Actor to use HDAs in Unreal. This allows HDA without being instantiated in a Level/World. For example, this allowed Houdini Assets inside the PCG Graph.

When instantiating an HDA in Unreal, it still creates a Houdini Asset Actor and a Houdini Asset Component, but all the data is now processed from a Cookable rather than directly on the component.

When you use the plugin, this change should be transparent for you:

  • When loading a project with version 2 of the plugin (pre Houdini 21.0)

  • The plugin will automatically convert the Houdini Asset Component found in the world to version 3

  • Moving and converting all the asset data to a corresponding Houdini Cookable tied to the Component.

It’s recommended to re-save and rebuild all the Houdini Assets in a level to ensure the data has been properly updated to Cookables. Saving will prevent the conversion process to be executed again when reopening the level.

The plugin’s public API (Blueprint / Python) hasn’t been changed following the implementation of Cookables and accessing the data in any of the API’s function will correctly use the appropriate cookable function.

Note

Houdini Asset Blueprint Components has not been updated to Cookables.

Custom Changes to the plugin

As Cookable are mostly an internal refactor, they should have a minimal impact on users of the plugin.

However, if you had made custom changes to the plugin’s source code, the switch to Cookable will require you to update your code for it to remain functional.

Cookable data

Most of the data stored on the Houdini Asset Component that was related to the Houdini Asset has been deprecated, and moved to the Houdini Cookable object instead.

The Cookable stores data on a set of sub-classes, that act as a feature set for the cookable:

  • Input data is stored in the UCookableInputData class, that can be accessed by calling GetInputData() on the cookable.

  • Output data is stored in the UCookableOutputData class, that can be accessed by calling GetOutputData() on the cookable.

These are the list of feature sets currently used by Cookable in Houdini 21.0:

Name

Data Class

Support function Description

Houdini Asset

UCookableHoudiniAssetData

IsHoudiniAssetSupported()

Stores all the data related to the use of an HDA file.

Parameters

UCookableParameterData

IsParameterSupported()

Stores all the parameters data and options.

Input

UCookableInputData

IsInputSupported()

Stores all the data and options for inputs.

Outputs

UCookableOutputData

IsOutputSupported()

Stores all the data and options for outputs.

Baking

UCookableBakingData

IsBakingSupported()

Stores all the data and options used for baking outputs. (requires output to be supported)

Proxy Mesh

UCookableProxyData

IsProxySupported()

Stores all the options needed to control proxy mesh creation. (requires output to be supported)

Component

UCookableComponentData

IsComponentSupported()

Stores all the data and options needed for the Cooakble to create components and actors in the world/level.

PDG

UCookablePDGData

IsPDGSupported()

Stores all the data and options for the Cookable to use the PDG Asset Link

To know if a Cookable supports a given feature sets, you can call the matching IsXXXSupported() function on the Cookable.

Upgrading your code to Cookable

If you were accessing the data by using a member of the Houdini Asset Component directly, then it’s likely that that member has been deprecated and can no longer be accessed. Instead, you should access it using the Cookable.

For example, the following will be deprecated (bUseOutputNodes_DEPRECATED): HoudiniAssetComponent->bUseOutputNodes;

and should be replaced with: HoudiniAssetComponent->GetCookable()->GetUseOutputNodes();

If you were accessing the data on the Houdini Asset Component using the getter/setter function, then no change will be required because all getters/setters on the HAC are internally calling the corresponding function on the Cookable.

If you need to access the member directly, then you will first need to get the Cookable from the HoudiniAssetComponent, then access the member directly by getting the appropriate data class:

HoudiniAssetComponent->Outputs

should be replaced with:

HoudiniAssetComponent->GetCookable()->GetOutputData()->Outputs

or you can use a direct accessor:

HoudiniAssetComponent->GetCookable()->GetOutputs();

Unreal

Getting started

Basics

Using Houdini Engine

Scripting

Reference