Houdini Engine for Unreal
|
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 parameters on these.
The special Unreal to Houdini primitive attribute unreal_material can be used to specify an Unreal material asset to apply to a given primitive.
This attribute should have the path to the asset as its string value. The path to the material asset can be obtained by right-clicking on it and choosing Copy reference in the context menu.
In a similar way, it is also possible to automatically create a Material Instance of a given Unreal material asset. Please see Material Instances for more information on the subject.
Optionally, the plug-in can attempt to generate an Unreal material that matches a material applied in Houdini.
This is accomplished by reading parameter values on the associated SHOP or VOP nodes.
Textures will be generated by copying the associated data from possible channels which are connected through parameter names or tags. Likewise constant values for each channel will be detected.
Channel | Parameter / Tag |
---|---|
Diffuse | ogl_diff, basecolor |
Opacity | ogl_alpha |
OpacityMask | ogl_opacitymap |
Normal | ogl_normalmap, normalTexture |
Specular | ogl_specmap/ogl_spec, reflect_texture/reflect |
Roughness | ogl_roughmap/ogl_rough, rough_texture/rough |
Metallic | metallic_texture / metallic |
Emissive | ogl_emit, emitcolor |
An Unreal Material that connects Sampler nodes for those new texture assets into the Material results will be generated. This will trigger a recompilation of the associated shaders for the new Materials which may take some time.
Please note that textures are required to be cooked to a file. Textures created by Houdini Engine will be created in the cook temp folder (HoudiniEngine/Temp), do not forget to save them with your level.
It is possible to automatically create a Material Instance from a given Unreal Material asset.
To do so, simply assign the unreal_material_instance primitive attribute, and using the path to the material asset as the parameter's string value. That path can be obtained by right-clicking on the asset and choosing Copy reference in the context menu.
Upon cook, a new Material instance of the source Unreal Material will be created in the cook temp folder, and assigned to the generated geometry.
For Landscapes , unreal_material_instance can be used for the Landscape Material, and unreal_material_hole_instance can be used for the hole material.
When creating a material instance in this way, it is possible to control and modify material parameters via attributes. Material parameters can be changed via the generic unreal_material_parameter_ prefix. This works in a similar way than the Generic UProperty Attributes do.
Simply add a detail or primitive attribute starting with unreal_material_parameter_, then append the name of the material parameter you wish to modify to it (without spaces). Upon cook, Houdini Engine will try to find the corresponding material parameter on the generated instance, and will override and set its value to the one you specified in the attribute.
This system works both for the "standard" material parameters that are always generated by Unreal when creating a material instance ( BlendMode, PhysMaterial, TwoSided etc.) but also for the "custom" material parameters that expose scalar, vector or texture parameters defined in your material.
For example:
This system currently supports 4 different types of material parameters: