On this page

Materials can be assigned to meshes generated by the plug-in in two different ways:

Houdini engine can also automatically create material instances from existing Unreal Material and procedurally change its parameters.

By Attribute

The special Unreal to Houdini primitive attribute unreal_material specifies an Unreal material asset to apply to a given primitive. This attribute has the path to the asset as its string value. You can get the path to the material asset by right-clicking and choosing Copy reference in the context menu.

If the sent mesh has more than one material, the value of the unreal_material attribute will be prefixed by its material slot number in square brackets, for example:

[0]/Script/Engine.Material'/Game/StarterContent/Materials/M_Ground_Grass.M_Ground_Grass

You can also automatically create a Material Instance of a given Unreal material asset. See Material Instances for more information. You can change a physical material by using the unreal_physical_material attribute.

Generate

Optionally, the plug-in can attempt to generate an Unreal material that matches a material applied in Houdini.

There are two ways to assign the material:

  1. Use the material network and assign it to the geometry from a material node.

  2. Use a SHOP network and the shop_materialpath attribute.

The material reads for each primitive/face in the geometry produced and creates an Unreal material for each unique material. Constant values, colors, and textures are generated from the parameters/tagged parameters to the associated channel in the unreal material.

The following tables list the names of the parameters generated on a given material channel in Unreal. If the Houdini Material node on the mesh doesn’t have a parameter that match the following names, it uses any parameter available on the material node that has a matching compatibility tag.

Unreal Material Channel

Principled Shader Parameter

Parameter

Compatibility Tag

Base Color

basecolor

ogl_diff

Base Color (Texture)

basecolor_texture

ogl_tex1

Metallic

metallic

Metallic (Texture)

metallic_texture

Specular

reflect

ogl_spec

Specular (Texture)

reflect_texture

ogl_specmap

Roughness

rough

ogl_rough

Roughness (Texture)

rough_texture

ogl_roughmap

Emissive Color

emitcolor

ogl_emit

Emissive Color (Texture)

emitcolor_texture

Opacity

opac

ogl_alpha

Opacity Mask (Texture)

opaccolor_texture

ogl_opacitymap

Normal (Texture)

normalTexture

ogl_normalmap

Normal Map Type (Tangent/World)

ogl_normalmap_type

Note

ogl_normalmap_type determines the space of the normal map (Tangent vs World). If the parameter is set to World Space, then the material bTangentSpaceNormal uproperty is set to false and the normal map is in World space. If not, the normal map is in Tangent space.

Textures are required to cook to a file. Textures created by Houdini Engine are in the cook temp folder (HoudiniEngine/Temp), make sure to save them with your level.

Here is an example showing how to generate materials from your HDA:

The mesh generated in your HDA needs to have UVs.

  1. Create a material sub network in your HDA (matnet).

  2. Create a Principled Shader in the material subnet.

  3. At the geo/sop level, add a material node to your generated geometry, pointing to the principled shader in the material subnetwork.

When instantiated in Unreal, the following principled shader parameters will be converted to an Unreal Material:

Unreal Material Channel

Principled Shader Parameter

Parameter

Compatibility Tag

Base Color

surface, basic, base color

basecolor

ogl_diff

Base Color (Texture)

textures, base color, texture

basecolor_texture

ogl_tex1

Metallic

surface, specular, reflection, metallic

metallic

Metallic (Texture)

textures, metallic, texture

metallic_texture

Specular

surface, specular, reflection, reflectivity

reflect

ogl_spec

Specular (Texture)

textures, reflectivity, texture

reflect_texture

ogl_specmap

Roughness

surface, roughness, texture

rough

ogl_rough

Roughness (Texture)

textures, roughness, texture

rough_texture

ogl_roughmap

Emissive Color

surface, emission, emission color

emitcolor

ogl_emit

Emissive Color (Texture)

textures, emission, texture | emitcolor_texture

Opacity Mask

textures, opacity, texture

opaccolor_texture

ogl_opacitymap

Normal (Texture)

bumps and normals, base, texture path

baseNormal_texture

ogl_normalmap

Normal Space

bumps and normals, base, vector space

baseNormal_vectorSpace

ogl_normalmap_type

Material Instances

You can automatically create a Material Instance from a given Unreal Material asset.

  1. Assign the unreal_material_instance primitive attribute

  2. For the parameter’s string value, use the path to the material asset.

  3. To obtain the path, right-click on the asset and choose Copy reference.

Upon cook, a new Material instance of the source Unreal Material is created in the cook temp folder and assigned to the generated geometry.

For landscapes, use unreal_material_instance for the Landscape Material, and unreal_material_hole_instance for the hole material.

Material Instance Parameters

You can use material instance to control and modify material parameters in the attributes.

Change the material parameters in the generic unreal_material_parameter_ prefix. This works similarly to Generic UProperty Attributes

  1. Add a detail or primitive attribute that begins with unreal_material_parameter_

  2. Append the name of your material parameter without spaces.

By default, this override will apply to any materials that have a parameter matching this name. If desired, you can specify the index of the material slot to apply this override to by prepending the material parameter name with INDEX_ where INDEX is the material slot index. This only works if the unreal_material_instance values have their corresponding material index prepended to the values. Otherwise, the index of each material is aset ccording to whichever materials appear first in the list of unreal_material_instance values.

This system works both for the standard material parameters that are always generated by Unreal when creating a material instance (BlendMode, PhysMaterial, TwoSided) but also for the custom material parameters that expose scalar, vector or texture parameters defined in your material.

When it cooks, it overrides and sets its value to your specifications. This works for both the standard material parameters generated by Unreal and custom material parameters that expose scalar, vector, or textureparameters.

For example:

  • To set the Diffuse Boost parameter to 2.0, add a unreal_material_parameter_diffuseboost detail attribute to your asset, and set its value to 2.0 (Float attribute)

  • To change the Blend Mode parameter from the default Opaque value, to Additive, add a unreal_material_parameter_blendmode detail attribute to your asset, and set its value to either additive (String attribute) or 3. (Float or Integer attribute)

  • To change a custom My Color Vector parameter that you created in your material, add a unreal_material_parameter_mycolor detail attribute, Float with a tuple size of 4, and set its value to the desired color value, ( 1.0, 0.0, 0.0, 1.0 ) for a bright red

This system currently supports 4 different types of material parameters:

  • Scalar parameters can be controlled with single tuple attributes (Float or Integer).

  • Vector parameters are controlled with Float or Integer attributes with a tuple size of 4 or 3. Float attributes will be considered as a FLinearColor in Unreal, whereas Integer attributes will be interpreted as a FColor in Unreal.

  • Enum parameters (like Blend Mode) can be set either by using the string value of the enum or the integer value of int (starting from zero).

  • Texture parameters can be changed by String attributes. To use an existing unreal texture asset, you can simply use the asset’s unreal path (obtained by right clicking on it and choosing Copy Reference).

To use a texture generated by the current Houdini Asset, you have two options:

  1. For a single material, set the attributes to the material channel (basecolor (or diffuse), normal, specular, roughness, emissive, metallic, opacitymask).

  2. For multiple materials, add the relative path to the SHOP node(or principled shader node) that generates the material before the desired channel. For example testgeometrysquab1/shopnet1/SquabSkin/diffuse. This path is relative to your asset node.

Attributes

Houdini to Unreal

This table lists special attributes to set in an HDA and the plugin recognizes when you translate the Houdini data to Unreal outputs. You can setup these attributes on your assets to control and override some properties and behaviours of the generated Unreal outputs. See Attributes and Groups for more information.

Materials

Attribute Name

Owner

Type

Description

unreal_material

any

string

Unreal path of a Material asset to apply to an output. You can specify the material slot by prefixing the path with the slot number in square brackets.

unreal_physical_material

prim, detail

string

Unreal path of a PhysicalMaterial asset to be used as a Physcial Material on the output

unreal_simple_physical_material

prim, detail

string

Unreal path of a PhysicalMaterial asset to be used for Simple Unreal Collisions

unreal_face_smoothing_mask

prim

int

Mesh smoothing mask data

Material Instances

Attribute Name

Owner

Type

Description

unreal_material_instance

prim, detail

string

Unreal path of a Material asset to create an instance of

unreal_material_hole_instance

prim, detail

string

Unreal path of a Material asset to create an instance of, to be used for Landscape holes

unreal_material_parameter_*

detail

any

Attribute prefix used to modify generated material instances' parameters

Unreal to Houdini

This table lists special attributes which are created by the plug-in when importing data from Unreal to Houdini. See Attributes and Groups for more information.

Materials

Attribute Name

Owner

Type

Description

unreal_simple_physical_material

prim

string

Unreal path of a PhysicalMaterial asset taken from simple collisions

Unreal

Getting started

Basics

Using Houdini Engine

Scripting

Reference