Mdl from substance not recognised in onmiverse

Hi!

I have created mdl s from substance desiger (also from Iray for 3dsmax) but the don’t discplay properly in Omniverse (View and create). My guess is that omniverse can’t see .mdl modules from other vendors, even though I have them located in MDL_USER_PATH and Material Exchange is installed.

This is how it looks like:

Where is should have opacity cut off, displacement and normal maps, also the color is incorrect (sorry the system only allows for one attached photo)

Here is the mdl code


mdl 1.5;

import ::tex::*;

import ::adobe::util::float_texture;
import ::alg::base::core::displacement;
import ::anno::author;
import ::anno::copyright_notice;
import ::anno::description;
import ::anno::display_name;
import ::anno::hard_range;
import ::anno::in_group;
import ::anno::key_words;
import ::anno::unused;
import ::anno::usage;
import ::df::custom_curve_layer;
import ::df::diffuse_reflection_bsdf;
import ::df::directional_factor;
import ::df::microfacet_ggx_smith_bsdf;
import ::df::scatter_mode;
import ::df::weighted_layer;
import ::nvidia::core_definitions::normalmap_texture;
import ::state::normal;
import ::state::texture_tangent_u;
import ::tex::gamma_mode;

export material MDL_Material(
    float roughness_u = 0.103f [[
        ::anno::display_name("Roughness"),
        ::anno::in_group("", "", ""),
        ::anno::usage("roughness"),
        ::anno::hard_range(0.f, 3.40282347e+38f)
    ]],
    float weight = 0.178000003f [[
        ::anno::display_name("Mettalic"),
        ::anno::in_group("", "", ""),
        ::anno::usage("metallic"),
        ::anno::hard_range(0.f, 1.f)
    ]],
    color tint = color(0.299439013f, 0.0294649992f, 0.f) [[
        ::anno::display_name("Base Color"),
        ::anno::in_group("", "", ""),
        ::anno::usage("baseColor")
    ]],
    float float_1 = 0.5f [[
        ::anno::display_name("Specular Level"),
        ::anno::in_group("", "", ""),
        ::anno::usage("specularLevel")
    ]])
 = 
    let {
        bool tmp0 = false;
        material_surface tmp1(
            ::df::weighted_layer(weight, ::df::directional_factor(tint, color(1.f, 1.f, 1.f), 3.f, ::df::microfacet_ggx_smith_bsdf(roughness_u * roughness_u, roughness_u * roughness_u, color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect, "")), ::df::custom_curve_layer(float_1 * 0.0799999982f, 1.f, 5.f, 1.f, ::df::microfacet_ggx_smith_bsdf(roughness_u * roughness_u, roughness_u * roughness_u, color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect, ""), ::df::diffuse_reflection_bsdf(tint, 0.f, ""), ::state::normal()), ::state::normal()),
            material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance));
        material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance));
        color tmp3 = color(1.f, 1.f, 1.f);
        material_volume tmp4 = material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f));
        material_geometry tmp5(
            ::alg::base::core::displacement(::adobe::util::float_texture(texture_2d("./substance_test2/substance_test2_resource_0.png", ::tex::gamma_default)), 5.f),
            ::adobe::util::float_texture(texture_2d("./substance_test2/substance_test2_resource_1.png", ::tex::gamma_default)),
            ::nvidia::core_definitions::normalmap_texture(texture_2d("./substance_test2/substance_test2_resource_2.png", ::tex::gamma_default), float2(1.f), float2(0.f), 0.f, false, 1.f, 0));
        hair_bsdf tmp6 = hair_bsdf();
    } in
        material(
            thin_walled: tmp0,
            surface: tmp1,
            backface: tmp2,
            ior: tmp3,
            volume: tmp4,
            geometry: tmp5,
            hair: tmp6);


My gut tells me that something is happening here:

import ::adobe::util::float_texture;
import ::alg::base::core::displacement;

Same thing happens with Iray+ modules from LW.

Is there a solution to that? I am sure it is, as the whole concept of mdl is to be cross compatible.

This is how it should look like (view from substance designer).

Capture

I’ve actually successfully setup and had my own MDLs from Designer in Omniverse working with sheen and other properties before they had the Omnisurface added, although somewhat troublesome…

If Omniverse can’t compile your MDL, you might want to check what’s going in Designer. No errors/warnings during export? What does the Omniverse log say after compiling?

Also, new Omnisurface has opacity and displacement inputs, so why not just use the built-in supported MDL instead? Not sure what advantage you have by importing a shader you can easily replicate with what’s already in Create and just plug in your maps.