Community
Maya Shading, Lighting and Rendering
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya materials topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Converting Arnold to legacy shaders

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
matt.wilmot
9034 Views, 10 Replies

Converting Arnold to legacy shaders

Hi there.

We have received a Maya file and it has Arnold shaders.
We are using a game engine that doesn't support these shaders.
So we want to convert them back to legacy...

It seems that you can't convert Arnold shaders in to Legacy shaders like Phong, Blinn etc.
There are scripts and ways to convert from Legacy to Arnold but not the other way.

Any ideas?

thanks for any help.

10 REPLIES 10
Message 2 of 11
sean.heasley
in reply to: matt.wilmot

Hi @matt.wilmot

 

I've used this script in the past from this thread for things like this.

 

From that thread: Here is a very simple mel that can change your selected shaders to lambert and keep the same shader names. Of course you can change the "replaceType" to blinn or whatever you like.

 

string $replaceType = "lambert";
string $sNode[] = `ls -sl`;
for ($each in $sNode)
{
string $replaceWith = `createNode $replaceType`;
replaceNode $each $replaceWith;
delete $each;
rename $replaceWith $each;
}

 

 

Please let me know if this helps or if you need any more assistance!

 

 

If one or more of these posts helped answer your question, please click Accept as Solution on the posts that helped you so others in the community can find them easily.

 

 

 

Kudos are greatly appreciated. Everyone likes a thumbs up!

 

 

Message 3 of 11
damaggio
in reply to: sean.heasley

Handy script Sean, thanks a lot.

Message 4 of 11
matt.wilmot
in reply to: sean.heasley

Awesome and very simple script!
Thank you.
Message 5 of 11

It can improve to save the color and the texture in the conversion... Please, its very important to export to Unity/FBX.

Message 6 of 11
pixelwash
in reply to: kikesa72ERFK8

Yes, PLEASE could somebody update this script to keep the texture map and color information in the base color channel..

Message 7 of 11
pixelwash
in reply to: sean.heasley

Hi Sean, could you update this script so that it keeps the texture map and color information from the base color channel in Arnold standard material shaders?

Message 8 of 11
Samitga
in reply to: sean.heasley

Thank you very much, I have been looking for a solution to this problem for a long time ) 

Message 9 of 11
lms2k
in reply to: pixelwash

Hi,

 

I have this really quick tool I made for work in order to turn arnold toon/standards into Lamberts. They keep the base color connection intact.

This is a link to the github page. 

Message 10 of 11

I'm getting a syntax error oddly enough, has anyone tried this script on Github? I was going to report the issue on Git but can't remember my login at the moment. I pasted code into python tab of script editor but it's tripping up. can't tell which line, but I'll try chunks of it to see if I can suss it out. 

Message 11 of 11

Hi!
Just as info, this scripts does not works here in OSX 10136/Maya 2018/Arnold 4021.

Seleting and object an executing the script makes the object disappears with no error message.

Here it is my solution:
- open your Arnold scene

- select an object and open Hypershader

- RMC (right mouse click) and Graph Materials on Viewport Selection

- for each aiStandard Surface material, create a respective Standard material:

For example: 
                     Metal or Glass => Blinn
                    Wood, paint, decal => Phong

- connect any maps, WITHOUT any auxiliary arnold nodes (aiImage, Remap,etc...)

- set sou render to Maya Software

- be Happy!

- now you can export your FBX/DAE/OBJ with not warnings!
I do that for every model in Maya.

Hope this helps others too!

LAO

 

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report