Unreal shader for Modo

The UnrealShader for MODO 801 is a plugin which provides a physically based material for creating assets for Unreal Engine 4. The new surface properties are the same as in Unreal and MODO’s preview render is a close approximation of the in-game look.

Comparison
unreal shader for modo Unreal shader for Modo BunnyHPModo
unreal shader for modo Unreal shader for Modo BunnyLPModo
unreal shader for modo Unreal shader for Modo BunnyUnreal
  • High poly (Modo)
  • Low poly (Modo)
  • Low poly (UE4)

Most of the differences can be attributed to the different ways they handle the environment. (Extra highlights due to unclamped HDRI and less color contribution in Modo.)

Downloads
Installation

Drag the .lpk file onto the MODO window.

If you installed the pre-kit version then you’ll have to remove the following files before installing the kit:
…\Luxology\modo 801\extra\UnrealShader.lx
…\Luxology\modo 801\resrc\UnrealShader.cfg
…\Luxology\modo 801\resrc\UnrealShaderIcon.png

Usage

The image on the right shows a typical shader tree setup. The bottom most layer is a standard material to control the bump, displacement and smoothing properties of the surface. (Having it in there is a temporary solution, it won’t be necessary in future versions.)

Shader tree setup unreal shader for modo Unreal shader for Modo Image01

Above it is an UnrealMaterial which provides some starting values for the unreal specific properties:

 

Base Color: Just like the Unreal equivalent it provides diffuse color for non metals and reflection color for metals.

 

Metallic: Controls how metallic the surface is. Keep it either 0 or 1 and only use grays for transitions between the two.

 

Specular: Used for micro occlusions, normal map related short range AO. It darkens the base color even while baking that channel so in the in-game material the “color*specular” operation should be omitted. The specular channel’s new default value is 0.5 which does not change anything. Higher values are not useful at this time.

 

Roughness: Defines surface roughness which affects specular highlight and reflection sharpness.

 

Emissive Color: The color of the light the surface emits.

 

Opacity: This value should behave as expected but has not yet seen thorough testing.

 

TessMultiplier: This property has no affect in MODO, it’s just here to allow the baking of data for tessellation density. The default value of 0.5 could be looked at as default, moderate amount of tessellation. Areas needing no extra triangles can be marked black while surface parts which use high frequency displacement are better set to white on this channel.

 

Aux. RGB A color property for arbitrary use. It does not affect the surface in MODO but can be baked and used in UE4 for any purpose.

Unreal Material properties unreal shader for modo Unreal shader for Modo Image02

When choosing the effect for a texture layer you can find these properties in the “Custom Material Channels/Unreal Material Channels” group.

 

Note that every channel is clamped so they stay in the 0..1 range.

 

Above this Unreal Material can be any number of texture layers driving the unreal specific material properties. Additionally MODO’s own “Normal” and “Displacement” texture effects can be used.

The last important component is another UnrealMaterial with ShaderMode turned on as seen on the right.

It is recommended to rename this item to Unreal Shader for clarity, although technically it is not a shader: in this mode the custom material converts all the physically based surface properties into standard material values (like specular power) and lets modo’s default shader do the rest.

The Shader mode toggle unreal shader for modo Unreal shader for Modo Image03

With this in place everything is ready to create surfaces in a physically based manner.

Baking

When the artwork is done then comes the baking. If you are using the “Bake to texture” functionality then you can just bake custom material channels as usual, along with normal maps.

However if you want to bake to render outputs then you will have to turn on the “Render Output Baking Mode” checkbox. Enabling it will prepare the unreal specific data to be baked using MODO’s standard outputs. Note that the “Final Color” will look weird so only keep this checkbox ticked while baking.

 

Data is stored in outputs the following ways:

Modo output Unreal data
Diffuse Color Base Color
Reflection Coefficient Metallic
Driver A Specular
Roughness Roughness
Luminous shading Emissive
Transparent amount Opacity
Driver B Tessellation multiplier
Specular Coefficient Auxiliary RGB
Subsurface Color R: Metallic G: Roughness B: Specular
Transparent Color R: Opacity G: Tess. multiplier

And finally there is the “Channel Preview” dropdown. Its function is simple: it shows the chosen channel’s value without lighting. It does not affect baking in any way, it’s just there to make it easier to see what is happening on the given channel.

The template scene

The template scene can be used as a starting point when creating new assets. It uses a stock Luxology environment preset, which provides about half of the total illumination (the other half is coming from a distant light). When replacing that HDR image the environment intensity might need tweaking in order to keep the lighting balanced. Also note that the image has its “Minimum spot” property set to 32 which makes GI less noisy but blurs the reflection a bit. If you are using high resolution environment images or have a large preview window then it might be necessary to decrease that value to sharpen reflections.

 

The rendering settings were also adjusted to make the preview viewport as fast as possible:
– Environment Importance Sampling is turned off because for some reason it made the preview render considerably slower.
– Irradiance rays are set to 32 which seemed to be just enough to deliver a reasonable result in my scenes. Complex, architectural models would benefit from a higher setting.

Known issues
  • When micropoly displacement is enabled and an occlusion layer is used on one of the Unreal Shader specific channels with the “Same surface only” enabled then modo will crash at the beginning of a baking render.
  • On some machines there is a delay after adding the custom material at the first time.
  • No way to control blurry reflection rays number, it’s hardwired to 1024. Reflection type is always set to “Environment only”.
  • No controls for bump, displacement and smoothing. Those properties are inherited from a standard material earlier in the stack.
  • The strength of the emissive color is hardwired at 1 W/srm2.
  • Near 0.1 roughness the specular highlight is slightly wider than it’s supposed to be.

Thanks to Phil, Farfarer and Mario Baldi for their help.

 

The “U” logo is used with the permission of Epic Games, Inc. Unreal and its logo are Epic’s trademarks or registered trademarks in the US and elsewhere.