Community
Arnold for 3ds Max
Rendering with Arnold in 3ds Max using the MaxtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Converting Legacy Shaders to Arnold

14 REPLIES 14
SOLVED
Reply
Message 1 of 15
christopher.wasden
3245 Views, 14 Replies

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?

Tags (2)
Labels (2)
14 REPLIES 14
Message 2 of 15

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


// Stephen Blair
// Arnold Renderer Support
Message 3 of 15

@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!

Message 4 of 15

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?



// Stephen Blair
// Arnold Renderer Support
Message 5 of 15
trs_andre
in reply to: 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

André Moreira

Game Developer / Technical Artist

LinkedIn

Message 6 of 15
trs_andre
in reply to: Stephen.Blair

I think it is because of the transmission attribute that became 1. When I change it to 0, the object reappears in the viewport. However, in the Arnold Render view the object is not there. Pitch black (I did add a light).

I have read something about changing the material to mia_material_x_passes first, but the result was the same.

What might be the problem? 😕

André Moreira

Game Developer / Technical Artist

LinkedIn

Message 7 of 15
lee_griggs
in reply to: trs_andre

Try turning coat_weight to 0 to get rid of the black.


1611300171401.png

Lee Griggs
Arnold rendering specialist
AUTODESK
Message 8 of 15
trs_andre
in reply to: lee_griggs

Thank you for your reply!

The coat weight was already at 0... Changing it to 1 didn't change anything either.

André Moreira

Game Developer / Technical Artist

LinkedIn

Message 9 of 15
lee_griggs
in reply to: trs_andre

Show us your renders/Maya UI or even better upload a scene somewhere, please.

Lee Griggs
Arnold rendering specialist
AUTODESK
Message 10 of 15

@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)

André Moreira

Game Developer / Technical Artist

LinkedIn

Message 11 of 15
trs_andre
in reply to: trs_andre

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

André Moreira

Game Developer / Technical Artist

LinkedIn

Message 12 of 15
lee_griggs
in reply to: trs_andre

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


Lee Griggs
Arnold rendering specialist
AUTODESK
Message 13 of 15
trs_andre
in reply to: lee_griggs

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.

André Moreira

Game Developer / Technical Artist

LinkedIn

Message 14 of 15
lee_griggs
in reply to: trs_andre

I cannot test it as I don't have mental ray installed.

How many shaders are you converting? Can't you convert the remaining shaders manually and use the Attribute Spreadsheet to change the attributes (I do this regularly when converting scenes and it is quicker than you might think).

Lee Griggs
Arnold rendering specialist
AUTODESK
Message 15 of 15
trs_andre
in reply to: lee_griggs

I see...

Well, there are quite a few of them, but I guess you're right. Might be faster to change the newly created materials' attributes. I'll give it a shot.

Thank you once again!

André Moreira

Game Developer / Technical Artist

LinkedIn

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report