Houdini Engine for Unreal
 All Files Pages
Landscapes

Houdini Engine for Unreal supports both the Input and Output of Landscapes. Version 2 also has the added ability to output landscapes to the World Composition system.

Note
Currently, version 2 of the Houdini Engine plugin does not support the Landscape Edit Layers that were added in UE4.25, but only the material/paint landscape layers.

Input

Landscapes can be imported to Houdini by using a Landscape Inputs, or a World Outliner Inputs.

The landscape's height and layer data will be available in Houdini as a heightfield (or as a point cloud or mesh if you selected the corresponding option in a world input).

If the landscape is exported as a heightfield, all the landscape layers will be available as masks on the heightfield node.

The input's landscape's tags are imported as primitive attributes, prefixed with unreal_tag_, followed by the tag's name. Theses attributes will be used to recreate the imported tags when outputting the heightfield back to Unreal.

Output

Landscapes can be generated by your HDA if it display node contains Heightfield data.

Heightfield nodes will automatically be picked up and converted to a Landscape by the plug-in. The height buffer will be used to control the landscape geometry, and all the additional buffers generated by heightfield nodes (mask, mesa, cliffs...) will be available on the landscape as Layers.

By default, Landscape Actors will be created for each Heightfield, but you can use the unreal_landscape_tile_actor_type (unreal_landscape_streaming_proxy in v1) primitive / detail int attribute with its value set to 1, in order to tell the plugin that it should create LandscapeStreamingProxies and Shared LandscapeActor instead.

If your Heightfield has a mask called visibility, then the plug-in will use it for the landscape's visibility layer, used to create landscape holes.

Note
For the holes to be actually visible in editor, you'll need to use a landscape material that uses the "Landscape visibility mask" node as its opacity mask.

Unreal requires all landscape layer to be saved to a file, by default the generated layers for a landscape will be saved in the HoudiniEngine/Temp folder in the content browser. When saving your level, make sure that these landscape layer asset are saved as well.

In version 2, you have the ability to specify/assign an existing landscape layer info object by using the unreal_landscape_layer_info string attribute, with the value set to an existing layer info asset's reference.

If the heightfield has unreal_tag_X primitive attributes, these attributes' values will be used for the resulting landscape Actor's Tags.

Note
Please note that if you are using time-dependent nodes, like "Heightfield Erode", be sure to use a timeshift node after it in order to set the time properly, as the plug-in will not let you set the frame used by an HDA. Since the frame parameter of the timeshift node has its default value set to $F, please make sure that you remove the keyframe on it ( ctrl + lmb on it, or by selecting "remove keyframe" in the "channels and keyframes" context menu ) as Houdini Engine will always have its frame value set to 1.

If the heightfield has unreal_uproperty_X detail attributes, it will be applied to Tile Actors as well Shared Landscape actors. If the height field has point or primitive unreal_uproperty_X attributes, it will only be applied to the respective landscape tile actor. Point/primitive attributes has to be on the heightfield primitive in Houdini. UProperty attributes on non-heightfield primitives will be ignored.

Data conversion

As Unreal uses 16-bits integers for Landscapes, and Houdini uses 32-bits floats to represent the height values, the data needs to be converted, resulting in a small precision loss when creating Landscape from a Heightfield.

By default, Landscape components generated by Houdini Engine will use 3/4 of the available 16 bits range for conversion. This allows you to still sculpt the landscape past its min/max values afterwards in Unreal.

If you would rather use maximum precision for the data conversion, simply activate the Marshalling Landscapes Use Full Resolution setting in the Geometry Marshalling section of the Settings.

As an example, a 4km high landscape will have a precision (on the Z axis) of 8.13 cm by default, or 6.10 cm if that option is activated.

The plugin can also be configured to use the default unreal conversion values in the plugin settings, by enabling the **Use default Unreal Scaling" option under *Geometry Marshalling*. This will likely result in a precision loss during the conversion, and may clip the heightfield values if they are too high, but will create landscape that have a "standard" scale factor on the Z axis.

When converting heightfield data to landscapes, you have the ability to specify the min and max values used for the conversion by adding the unreal_landscape_layer_min and unreal_landscape_layer_max float attributes. This will work on the height data, but also on any masks that will be converted to a landscape layer. This is especially usefull when outputing tiled landscapes, in order to ensure that all tiles are converted in the same manner.

Heightfield masks are converted from houdini's 32-bits float to Unreal 8-bits unsigned int. Values are converted from Houdini's [min, max] to [0, 255] in UE. If the unreal_unit_landscape_layer primitive/detail integer attribute is set to 1 for a mask, then the plugin will convert the mask to a landscape layer by using the [0 1] range instead of the mask's [min max] values.

By default, heightfield masks will be converted to weight-blended landscape layers. If you want some of the heightfield masks to be exported to Unreal as non weight-blended layers, you must add a Primitive String attribute to your heightfield, named unreal_landscape_layer_nonweightblended. Set this attribute values to the names of the masks separated by spaces (ie: "mask water debris").

Landscape size

Unreal Engine requires very specific sizes for its landscapes, as they are broken up in sections and components for LOD / optimisation purposes. The recommanded sizes are:

  • 8129 x 8129
  • 4033 x 4033
  • 2017 x 2017
  • 1009 x1009
  • 505 x 505
  • 253 x 253
  • 127 x 127

If your heightfield data doesn't match one of these recommended size, Houdini Engine will automatically resample the data so that the generated landscapes fit the size requirements. This may possibly causes issues due to the unwanted conversion, and will easily happen when splitting Heightfields to tiles. Additionally, using non-standard size will result in an excessive amount of components used resulting in severe performance degradation. It is highly recommended that you ensure the generated tiles's volume size match the sizes recommended by Epic in their Landscape Technical Guide.

Upon cook, the generated landscape's transform will be automatically set up so that its dimension, altitude, scale and position in Unreal are the same as in Houdini.

Unreal_Landscapes.png

Transforming landscapes

Landscapes can be transformed from both within Houdini as well as within the Unreal Editor itself. Landscape actors are transformed relative to their parent actors.

Note
While heightfield translation from Houdini is supported, heightfield rotation from Houdini is not currently supported.

Tiled Landscapes

Splitting heightfields into tiles in Houdini can be done using the Heightfield Tile Split SOP node. By default, each Landscape tile will be imported into UE as a standalone LandscapeActor. It is highly recommended to import tiled landscapes as streaming proxies by setting the unreal_landscape_tile_actor_type attribute on the heightfield primitives (in Houdini) to 1. Refer to Output Attributes for more information.

Details Panel

As Landscapes cannot be made component of another Actor, the generated landscape will not be listed in the component list of your Houdini Asset, but will be listed as a child of your Houdini Asset in the World Outliner. It will also appear in the details panel of the asset, under the Houdini Generated Meshes section, along with its landscape material and hole material.

Unreal_LandscapeDetails.png

This section will give you the option to override the landscape's main and hole materials.

You can automatically assign an existing material to one of these by using the unreal_material and unreal_hole_material attributes. In version 2, it is also possible to override the physical material via the unreal_physical_material attribute.

You can also automatically generate material instances for the landscape material and hole material by using the unreal_material_instance and unreal_material_hole_instance attributes. For more details on this, see Material Instances.

Even if it is not listed in the Houdini Asset's components, generated Landscape Actors or Streaming proxies will still remained "linked" to it. Recooking the asset will "overwrite" the generated landscapes, and deleting the asset will also delete its landscape as well.

To separate the generated landscape from its Houdini asset, you just need to "bake" it by using the corresponding button in the details panel.

World Composition

World Composition support has been added to Version 2, and is supported when baking landscapes generated from tiled heightfields.

When baking tiled landscapes in a world with world composition enabled, the plugin will automatically create or update the levels needed for the tiles. Please note that when cooking the HDA, the generated landscape tiles will remain attached to the HDA Actor to provide visual feedback and fast iteration.

The following attributes can be used on the HF to control World Composition baking:

  • The unreal_landscape_tile_actor_type primitive, int attribute can be used to decide if LandscapeStreamingProxies should be created when baking. When set to 1, Landscape streaming proxies are created. When set to 0, landscape actors are created. This replaces the unreal_landscape_streaming_proxy attribute previously used in v1.
  • You can set the actors name for each individual landscape tilesby using the unreal_output_name attribute.
  • The unreal_level_path attribute can be used to set the name and path to the levels that will be generated for the landscape tiles when baking to world composition.

When generating landscape streaming proxies, the unreal_landscape_shared_actor_name primitive, int attribute can be used to specify the name of the common, shared landscape actor that controls all the streaming proxies.

When mixing heightfield tiles and instancers/meshes in the same hda, the unreal_level_path attribute can be used to control the sub-levels that will be used for baking the landscapes, but also for the instancers and meshes as well. In order to do that properly, you'll likely need to split the instancers, for example, using the tile number of the tile they were scattered on. To do so:

  • promote or copy the "tile" attribute from the heightfield to the instances.
  • after merging all the outputs, indicate that you want to split the instancers by using tile attribute by setting the "unreal_split_attr" attribute to "tile".
  • finally set the "unreal_level_path" for both the Heightfield and instancers to something that uses the tile output token: ie: "{world}/Landscape/Tile{tile}"
Note
In some cases, like when using point instancers (unreal_instance), you may need to promote the "tile" and "unreal_level_path" attributes on the Heightfield to points as well, due to the mismatch caused by the attributes being stored on points for the instances.

Editable Landscape Layers

HDA Inputs

If an Landscape with edit layers is used as an HDA input, the landscape will import its (final) heightfield and paint layers as usual as well as import the heightfields of the individual edit layers using the layer names, prefixed by landscapelayer_.

Note
The imported landscape layers are hidden during import, so be sure to use the Visibility SOP to unhide them, if needed.

The incoming landscape layers can then be selectively used to generate a new a (additive) landscape layer.

HDA Outputs

Heightfield data can alternatively be drawn to editable landscape layers on existing landscapes. In order to output editable landscape layers, the Enable Edit Layers have to be enabled on the target landscape. Also the landscape the unreal_landscape_output_mode (int prim) attribute must be set to 1.

The name of the target landscape (actor) is set with unreal_landscape_editlayer_landscape (string prim) attribute. If the landscape name is set to Input0 (default), the first input landscape will be used, Input1 the second, and so on (this supports input landscapes as World Outliner inputs or Landscape input).

The name of the target editable landscape layer is set with the unreal_landscape_editlayer_name (string prim) attribute (default value is HE_Layer). If the target landscape edit layer does not exist, a new edit layer will be added (at the top).

The layer can also be programmatically placed after (above) another layer by specifying another layer name with the unreal_landscape_editlayer_after (string prim) attribute.

By default, the landscape layer output will only draw (replace) values in region occupied by the output layer. Any height or paint layer data that falls outside this region will be left untouched. The height/paint layers on the target edit layer can be fully cleared (before drawing starts) by setting the unreal_landscape_editlayer_clear (int prim) attribute to 1.

Note
When outputting a heightfield for use with landscape edit layers, keep in mind that the layers in Unreal are additive which means that heightfield would need to be subtracted from one of the input layers in order to be an 'additive' layer.
Landscapes that are output as edit layers use default unreal scale values during heightfield conversion. This means that any custom min/max height values will be ignored.