How to Import Assets for Unreal Engine 4
Houdini Asset
A HoudiniAsset is created when Importing a Houdini digital asset file (.hda, .hdalc) into an Unreal project.
The HoudiniAsset's .uasset file is associated with the corresponding .hda file and also stores a copy of the binary contents of that .hda. The copy of the hda content will only be used if the source hda file is not found.
Dragging a HoudiniAsset from the Content Browser into the viewport will spawn a HoudiniAssetActor, that use a HoudiniAssetComponent as its main root component.
The HoudiniAssetComponent is the main component that handles cooking, parameters, inputs and outputs of the digital asset in the level.
After changing the content of the .hda file in Houdini, you can update the .uasset by right-clicking on it in the Content Browser and selecting Reimport or Rebuild All Instances. In addition Rebuild All Instances will trigger a rebuild of all instances of that asset.
Expanded hda files (hda folders) can also be imported into an Unreal project by selection the file in the hda folder. However, Expanded hda files will not store a local copy of the asset's content, and always require the original file to be present.
The asset is imported using relative paths if it is located on the same drive as your project.*Absolute paths* will be used if it's located in a different drive. If you intend on using some form of source control for your project / asset, we generally recommend that you save the HDA on the same drive as your project, preferably, with the unreal project, to ensure that relative paths are used.
- Note
- If you need to know if your assets are running inside Unreal via Houdini Engine, you can look for the HAPI_CLIENT_NAME environment variable. The Houdini-Engine for Unreal plug-in will always set it to "unreal" after successfully initializing HAPI.
Houdini Asset Details
In the Details panel for a HoudiniAssetActor, the Houdini Engine section lists a number of options and actions that can be performed on the Houdini Asset.
Generate
The first thing that is displayed under the Houdini Engine logo is the Session Status. This indicates the current status of the Houdini Engine session, and lets you know whether or not the plugin is correctly talking to Houdini.
The statuses can be:
- Not Started: The Houdini Engine session has not been initialized yet. (the plugin only starts a session after instantiating a new HDA or modifying an existing HDA).
- Ready: The Houdini Engine Session was successfully created and the plugin is actively communicating with Houdini Engine.
- Stopped: The Houdini Engine session was manually interupted by the user.
- Failed: The plugin was unable to start a Houdini Engine session. The logs will likely indicate the reason of the failure.
- Lost: The plugin had lots contact with the Houdini Engine Session. This likely indicates that either Houdini / HARS was manually interrupted, or that it crashed.
- Failed - No License: This indicates that the plugin was unable to start a Houdini Engine session due to the lack of Houdini Engine / Houdini License.
- Disabled: This indicates that the session type is set to None in the plugin settings. The plugin will not try to create a Houdini Engine session, and will not be able to instantiate/cook HDAs.
Generate
In the context of a HoudiniAssetActor, Cooking refers to the same concept as in Houdini. The outputs of a Digital Asset inside Houdini are recalculated when a cook is triggered. This generally happens either manually by a forced recook or (optionally) automatically when a parameter or input of the Houdini Asset changes.
Assets can also be cooked or rebuilt via Console Commands or Keyboard Shortcuts .
- Rebuild Reimports the asset's .hda file and forces the asset to recook even if no change has been detected. This is useful when the underlying .hda has been updated or if something has gotten out of sync. Rebuilding an HDA will update its interface, and any new parameter or input will be visible in the details panel. Value of existing parameter or input will be kept after a rebuild.
- Recook Triggers a forced cook of the Houdini asset in Houdini, even if its inputs or parameters haven't been modified. This will also force an update to the HDA's outputs. This is mostly useful when the On Parameter/Input change cook trigger is disabled.
- Reset Parameters Resets all of the asset's parameters to their default state saved in the Digital Asset.
- Temporary Cook Folder Indicates the directory that will be used to save the temporary output files generated by the Houdini Asset when cooking. This can also be set via the "unreal_temp_folder" attribute.
Most Houdini assets need to have some of their temporary cooked content written to a uasset file. Static Meshes, Materials, Textures, Landscape Infos etc. will be stored in the Temporary Cook Folder (by default Game/HoudiniEngine/Temp). All unused and unreferenced assets stored in this folder can be cleaned up automatically by using the Clean Houdini Engine Temp Folder entry in the Houdini Engine menu.
Bake
Baking refers to the creation of native Unreal assets or actors based on the outputs of the Houdini asset. Contrary to cooked outputs, which are still owned by the Houdini Asset Actor, and will be destroyed with it, baked output are independant, and are not tied to the Houdini Asset that generated them.
- Bake Pressing this button will bake all the outputs of the Houdini Asset. The type of asset produced when baking can be control by the combo box next to the bake button.
- Actor Can be used to bake the current asset outputs to Actors in the world. Baking to Actors will bake all outputs and then spawns new individual Unreal-native actors for each outputa. The new actors will be added to a new folder in the World Outliner.
- Blueprint Can be used to bake the current asset outputs to a BluePrint Actor in the content browser. All of the Houdini Asset's outputs are baked to .uasset files in the bake folder, and a new Blueprint Actor class is created, which has components that uses all the baked outputs.
- Foliage Bakes the instanced static mesh components generated by the asset to unreal's foliage system, adding new foliage type for each instanced mesh. This option is only enabled if your asset generates instances.
- World Outliner: Not implemented in V2 Bakes a single Static Mesh and sets it on the first World Outliner input's actor, then disconnect the input. This option is only available if the asset has at least one world outliner input and generates one static mesh.
Bake Options can also be used to control or automate some of the baking process:
- Remove HDA output after Bake After baking, all the temporary/cook outputs of the HDA will be automatically destroyed. This is especially usefull when baking to Actors, as this avoids having both baked and cooked outputs overlapping.
- Auto Bake When enabled, the temporary outputs of the Houdini Assets are automnatically baked after a succesfull cook.
- Recenter Baked Actors When enabled, this option automatically recenters the position of all the baked Actors, making them use the center of their bounding box instead of the HDA's location.
- Replace previous Bake When enabled, baking will always overwrite the previous bake's results. When disabled, the baked files will be created incrementally, and will never replace previous bake files.
- Bake Folder This can be used to set the directory where baked output assets will be saved if the "unreal_bake_folder" attribute is not set on the output. The Bake Folder is determined by checking the "unreal_bake_folder" attribute first (prim, detail), then this property, and lastly the default folder configured in the plugin settings.
All Houdini assets present in the level can be replaced automatically by their baked counterpart by using the Bake And Replace All Houdini Assets entry in the file menu. This process cannot be reverted and should only be used with final content.
Baking all or only selected Houdini Asset Actors can also be achieved via Console Commands or Keyboard Shortcuts .
Asset Options
Cook Triggers
- On Parameter/Input change When any parameter or input is changed on the HDA, a cook of the asset will be triggered. Disabling this allows parameters/inputs to be changed without recooking the ouputs. Cooking must then be performed manually by pressing on the Recook button. This may be desired for complex assets that have a long cooking time.
- On Transform change When enabled, translating, rotating or scaling the Houdini Asset Actor in Unreal will automatically trigger a recook of the HDA.
- On Asset Input Cook When using another HDA in an Asset Input, this option lets you decide if this HDA should be recooked automatically when its input HDA is cooked (ie, after modifying its parameters or inputs).
Miscellaneous
- Push transform to Houdini Indicates whether or not the Unreal world transform should be set on the digital asset's input node in Houdini.
- Do not generate outputs Prevents the Houdini Asset from generating outputs. The asset will be cooked in Houdini, but will not produce anything in Unreal. This can be useful when chaining multiple Houdini Assets together via Asset Inputs.
- Output templated geos When enabled, outputs will be created for templated nodes found in the HDA. Such templated outputs are editor-only, and will, by default, use a wireframe material. They can be useful to visualize helper geometry (like a cutting plane for example) directly in the Unreal Editor.
Input Curves & Editable Output Curves
- Enable Curve Settings By default the settings in this section get their values from the plugin's default settings. To override any of these settings on a particular Houdini Asset Component, enable this setting.
- Disable rot & scale Attributes If this is checked, the plugin will not create rot and scale attributes on the points of input curves and editable output curves that are sent to Houdini by this component. The default value for this setting can be configured in the plugin settings: SettingCurves.
Help and Debug
- Show Cook log Displays the contents of the Houdini cook log. This is useful for troubleshooting/debugging the Digital Asset.
- Asset Help Displays the contents of the Digital Asset help. The help is created via the Help tab in the Operator Type Properties window for the Digital Asset in Houdini.
How to Import Assets for Unreal Engine 4
Source: https://www.sidefx.com/docs/unreal/_assets.html