question

Christopher Wasden avatar image
Christopher Wasden asked ·

Converting Legacy Shaders to Arnold

I am looking to convert numerous assets that contain various kinds of Legacy shaders from Maya (Lambert, Blinn, Mental Ray, etc.) to Arnold 5.

I am trying to use the 'Convert Deprecated Shaders' option on the Arnold Menu->Utilities->Convert Deprecated Shaders. From what I could tell, I thought this would allow for conversion of these materials. When I try to use this script, however, I am getting a warning:

# Warning: Unknown object type: alSurface #
# Warning: Unknown object type: alHair #

This looks like the script is expecting an older Arnold shader and not other shaders. When I look into the script (mtoa/convertShaders.py), I can confirm that there is only support to convert previous Arnold shaders and not Lambert, Blinns, Mental Ray, etc.

Per this answer, it looked like there is a script that is what I am looking for, but the link is dead and the only other answer points me back to this Convert Deprecated Shaders script.

Is there a script that actually converts Legacy shaders to Arnold Standard Surface shaders?

shaderslegacy
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Stephen Blair avatar image
Stephen Blair answered ·

The old Convert Deprecated Shaders utility handles Arnold 4 shaders and alShaders only.

Upgrade to a newer MtoA, and use the newer Convert Shaders to Arnold utility, that handles these shaders:


  • aiStandard
  • aiHair
  • alSurface
  • alHair
  • alLayerColor
  • alRemapColor
  • alRemapFloat
  • alFractal
  • alFlake
  • alLayer
  • lambert
  • blinn
  • phong
  • VRayMtl
  • mia_material_x_passes
  • mia_material_x
  • dielectric_material
7 comments
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

@Stephen Blair

I am not being able to convert mental ray shaders to arnold.

After trying the Convert Deprecated Shaders utility in Maya 2018, I got the same issue, so I used the one from Maya 2020 by using the python file. A newly created mia_material_x gets converted, but the result is not the expected, as the object gets invisible or with a weird color in the viewport and when rendering with the arnold renderer it does not show at all.

Am I doing something wrong? Is there a better way to accomplish this?

Thank you in advance!

0 Likes 0 ·

No, that's the best conversion script we have (it was contributed by a studio, and replaced the old script).

You should get a standard_surface where the base_color is the diffuse from the mia_material_x. What do you get?

0 Likes 0 ·
Andre Moreira avatar image Andre Moreira Stephen Blair ♦♦ ·

Thank you for the fast reply!

The steps I have taken in the conversion are as follows:

1) Create mia_material_x and change the base color

2) Set it to a sphere

3) Select the material in hypershade

4) Run the Maya 2020 convertShaders.py in Maya 2018 script editor for the selected shader

The shader does get converted to an aiStandardSurface, and the base color is there as well. However, it disappears from the viewport, but it is still selectable (only the wireframe appears).

*continues below

0 Likes 0 ·
Show more comments
Andre Moreira avatar image
Andre Moreira answered ·

@Lee Griggs

Thank you for the follow up. You can access the scene file here:

https://file.io/tvXSiCBZGU6W


And sorry, I forgot to mention that upon conversion I'm seeing this in the script editor:


Converted mia_material_x1 to aiStandardSurface

# Warning: 'mia_material_x1.message' is already connected to 'materialInfo1.material'. #

<pymel.internal.factories.Callback object at 0x000001F02167A828>

<pymel.internal.factories.Callback object at 0x000001F02167A860>

<pymel.internal.factories.Callback object at 0x000001F02167AAC8>


(following a couple more of similar lines, only the number changes)

5 comments
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

(Sorry, the reply form wasn't letting me submit...)

0 Likes 0 ·

It is black because transmission_weight is 1. Reducing the transmission_weight I get this. The mia material is an empty node because mental ray isn't available and so cannot be converted.

1611313217744.png

1611313334313.png


0 Likes 0 ·
1611313217744.png (171.2 KiB)
1611313334313.png (23.6 KiB)

Sorry for the late reply and thank you for the tips.

When I lower the transmission weight to 0, the sphere does appear in viewport, but in the arnold render view it keep black, nothing appears... Are you rendering in Arnold?

The mia material is not empty in my side, as created the scene file in Maya 2018 with both Arnold and Mental Ray installed.

I'm including both to be able to compare the two materials and achieve the closest result possible.

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.