Universal Scene Description in Unreal Engine | Unreal Engine 5.0 Documentation
This page states that there is Nvidia MDL support for the Stage Actor in Unreal 5.
You can try it by enabling the MDL Rendering Context in the Stage Actor.
I have tried this with various permutations of seemingly-correct USD schemas for MDL materials but simply cannot get it to work - it always gives me an error in the log that it cannot convert the MDL material.
Is there some minimal working example I can try? Has anybody gotten this working?
I’m not looking to do a hard import of the material with the MDL plugin, I specifically want the Stage Actor to pick up the MDL material and create a transient Unreal material for my use case.
Here is an example snippet of USDA code that defines an MDL material based on an MDL module I’ve created with Substance Designer and is located in the same directory as the USDA file.
def Scope "materials"
{
def Material "suzanne"
{
token outputs:mdl:displacement.connect = </root/materials/suzanne/Shader.outputs:out>
token outputs:mdl:surface.connect = </root/materials/suzanne/Shader.outputs:out>
token outputs:mdl:volume.connect = </root/materials/suzanne/Shader.outputs:out>
token outputs:surface.connect = </root/materials/suzanne/Shader_preview.outputs:surface>
def Shader "Shader"
{
uniform token info:implementationSource = "sourceAsset"
uniform asset info:mdl:sourceAsset = "metallic_roughness.mdl"
uniform token info:mdl:sourceAsset:subIdentifier = "M_R"
float inputs:albedo_add = 0
float inputs:albedo_brightness = 1 (
customData = {
dictionary HoudiniPreviewTags = {
double default_value = 1
string ogl_diff_intensity = "1"
}
}
)
float inputs:albedo_desaturation = 0
asset inputs:ao_texture = @@ (
colorSpace = "auto"
)
float inputs:ao_to_diffuse = 0
float inputs:bump_factor = 1
float inputs:detail_bump_factor = 0.3
asset inputs:detail_normalmap_texture = @@ (
colorSpace = "auto"
)
float inputs:detail_texture_rotate = 0
float2 inputs:detail_texture_scale = (1, 1)
float2 inputs:detail_texture_translate = (0, 0)
color3f inputs:diffuse_color_constant = (0, 0.5, 0) (
customData = {
dictionary HoudiniPreviewTags = {
double3 default_value = (0.2, 0.2, 0.2)
string ogl_diff = "1"
}
}
)
asset inputs:diffuse_texture = @@ (
colorSpace = "auto"
customData = {
dictionary HoudiniPreviewTags = {
string default_value = ""
string ogl_tex1 = "1"
}
}
)
color3f inputs:diffuse_tint = (1, 1, 1)
color3f inputs:emissive_color = (1, 0.1, 0.1)
asset inputs:emissive_color_texture = @@ (
colorSpace = "auto"
)