Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: MDL in Iray for Maya

  1. #1
    Join Date
    Jul 2010
    Posts
    343

    Default MDL in Iray for Maya

    Please read carefully

    If you are a fresh and new user of this plugin, you can stop reading here.
    If you have been part of the Beta forum or you are a user of the IFM plugin that was sold for Maya 2015 by [0x1], you may notice that Iray for Maya is not supporting the ifmCustomMDL node anymore. Instead you find a ifmMDLMaterial node in the new release.

    This may have a very dramatic effect if you try to load old scenes. ANY ifmCustomMDL node will turn into an unknown node and if you save your scene in that state, all information of your former ifmCustom node is lost

    To avoid this, you have to enable an environment variable before you start Maya.
    IFM_LEGACY_CUSTOMMDL=enable
    This enables Iray for Maya to deal with both nodes.
    if you set this variable your old ifmCustomMDL node will appear again and old scenes will behave as before.

    We will provide a script soon that allows you to convert materials from the old to the new node. Please run that on your old scenes and remove any ifmCustomMDL node, since this is a deprecated node and will vanish in the next version of the plugin.

  2. #2
    Join Date
    Jul 2015
    Location
    Santa Clara
    Posts
    250

    Default

    Also note that the location of the plugin has moved from:

    C:\Program Files\[0x1]\Iray For Maya 2016

    ...to...

    C:\Program Files\NVIDIA Corporation\Iray for Maya 2016

    You will need to copy over your MDL libraries (apart from unsupportedGifts) to the new plugin location (C:\Program Files\NVIDIA Corporation\Iray for Maya 2016\materialLibraries) folder for the ifmCustomMDL node to see your MDL's.

    This is not the preferred MDL location, but is temporarily needed to support the deprecated ifmCustomMDL node. Once you have everything you need converted over, they can be moved to the user/mdl folder (but that's another discussion).

    I'd also suggest saving out MAYA ascii (.ma) versions of your old scenes as a backup in case you miss anything during this conversion period.

  3. #3
    Join Date
    Nov 2015
    Posts
    7

    Default

    Are you guys going to make a Custom MDL again or a program to let us make our own MDL?


    I would like to make my own or edit existing ones with out diving into the code.

  4. #4
    Join Date
    Nov 2015
    Posts
    7

    Default

    Okay. I have made my own Mdl and placed it in the folder location you have posted, but it is not showing up when I run maya. The others are but not mine. I went from Substance Designer and exported the MDL to that folder, but it won't show up. I checked the code on it and it is an MDL 1.1. Can someone who knows the pipeline from Substance Designer to Maya Iray help?

  5. #5
    Join Date
    Jul 2015
    Location
    Santa Clara
    Posts
    250

    Default

    I haven't used substance designer so I'm not sure what the workflow should be. However, if the MDL is not correct in any way, it won't show up in IFM even if it's put in the correct location. You also won't see the MDL if you copy it to the location while MAYA is running, IFM caches the MDL library on MAYA startup.

    The default location for custom MDL's is

    C:\Users\<username>\Documents\mdl\user_materials

    Can you upload the mdl file so I can take a look at the code?

  6. #6
    Join Date
    Nov 2015
    Posts
    7

    Default

    okay I added in that folder into the mdl file in the Documents but didn't work. I opened Substance Designer and reloaded in the Mdl and swaped it back and forth with other mdl files and it works just fine in there. Its just in Maya. Here is the code for my mdl.
    and a link for the filehttps://www.dropbox.com/s/re5sodn8artpzrw/head.mdl?dl=0


    mdl 1.1;

    import ::alg::base::normalmapping::custom_tangent_space_n ormal_texture;
    import ::alg::materials:hysically_metallic_roughness:hysically_metallic_roughness;
    import ::base::file_texture;
    import ::base::mono_mode;
    import ::base::rotation_translation_scale;
    import ::base::texture_coordinate_info;
    import ::base::texture_return;
    import ::base::transform_coordinate;
    import ::state::texture_coordinate;
    import ::state::texture_tangent_u;
    import ::state::texture_tangent_v;
    import ::tex::gamma_mode;
    import ::tex::wrap_mode;
    import ::state::normal;

    export material head(*)
    = ::alg::materials:hysically_metallic_roughness:hysically_metallic_roughness(
    ambientOcclusion: 1.f,
    baseColor: ::base::file_texture(texture_2d("" /* tag 3247, version 0 */, ::tex::gamma_default), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::transform_coordinate(::base::rotation_tran slation_scale(float3(0.f), float3(0.f), float3(1.f)), ::base::texture_coordinate_info(::state::texture_c oordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0))), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint,
    emissiveColor: color(0.f, 0.f, 0.f),
    emissiveIntensity: 1.f,
    height: 0.5f,
    heightScale: 0.f,
    metallic: ::base::file_texture(texture_2d("" /* tag 3260, version 0 */, ::tex::gamma_default), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::transform_coordinate(::base::rotation_tran slation_scale(float3(0.f), float3(0.f), float3(1.f)), ::base::texture_coordinate_info(::state::texture_c oordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0))), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).mono,
    normal: ::alg::base::normalmapping::custom_tangent_space_n ormal_texture(texture_2d("" /* tag 3273, version 0 */, ::tex::gamma_default), 1.f, false, true, ::base::transform_coordinate(::base::rotation_tran slation_scale(float3(0.f), float3(0.f), float3(1.f)), ::base::texture_coordinate_info(::state::texture_c oordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0))), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 1.f, 0.f),
    roughness: ::base::file_texture(texture_2d("" /* tag 3285, version 0 */, ::tex::gamma_default), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::transform_coordinate(::base::rotation_tran slation_scale(float3(0.f), float3(0.f), float3(1.f)), ::base::texture_coordinate_info(::state::texture_c oordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0))), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).mono,
    opacity: 1.f,
    specularLevel: 0.5f,
    anisotropyLevel: 0.f,
    anisotropyAngle: 0.f,
    refraction: 0.f,
    refractionIOR: 1.5f,
    scattering: 0.f,
    absorption: 0.f,
    absorptionColor: color(1.f, 1.f, 1.f));
    Last edited by XxGingerSharkxX; January 29th, 2016 at 01:21.

  7. #7
    Join Date
    Jul 2015
    Location
    Santa Clara
    Posts
    250

    Default

    Substance seems to have changed the way it handles MDL's recently. The problem is the exported MDL is looking for:

    import ::alg::base::normalmapping::custom_tangent_space_n ormal_texture;

    We only have:

    ::alg::base::annotatons::

    ...in vMaterials.

    The quick fix is to replace all occurrences of:

    ::alg::base::normalmapping::custom_tangent_space_n ormal_texture
    with

    ::base::tangent_space_normal_texture:
    Text file fix attached- test2-mdl.txt

    Alternatively you can copy the files from:

    C:\Program Files\Allegorithmic\Substance Designer\5\resources\view3d\iray\normalmapping.mdl
    (or something like it)

    to

    C:\ProgramData\NVIDIA Corporation\mdl\alg\base\normalmapping.mdl
    Last edited by rossh; January 29th, 2016 at 03:04.

  8. #8
    Join Date
    Nov 2015
    Posts
    7

    Default

    Thank you. I'll give it a try when I get home tonight after work. If this works, I plan on letting Allegorithmic know about that glitch. Thanks

  9. #9
    Join Date
    Jul 2015
    Location
    Santa Clara
    Posts
    250

    Default

    Not sure it's a glitch, just that Substance designer and IFM are out of sync with the core compatibility files. There are similar files for 3dsMAX and MAYA so other 3d software can use MDL's created on those platforms too.

    Let me know if it works, I got the edited mdl to work but I'd try copying normalmapping.mdl to C:\ProgramData\NVIDIA Corporation\mdl\alg\base\ first.

  10. #10
    Join Date
    Nov 2015
    Posts
    7

    Default

    I GOT IT!!!!! IF FINALLY GOT IT. I HAD TO INPUT THE LOCATION OF THE TEXTURES IN MANUALLY. And the normal mdl you were talking about worked.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •