!!! The script only works with the mia_material_x_passes, so if you have a normal Mia material… use the upgrade feature of the attribute editor first.
The script scans the most used input connections (diffuse, reflection, refraction etc.) and connects them to the VRay material.
In the first version I´ve only done the needed connections, due to the fact that MR and VRay are working completely different the look of the materials won´t be exact the same But it will give you a good start to work with.
I´m still working on the script, so if there is anything which should be added or changed, please let me know!
Hi I tried this script, works great. Conversion is smooth
However the newly created material won’t show up in the hypershade. Never seen this happen before with Maya. even duplicating the shader does not fix this. (Maya 2010 x64)
Also is it possible to get the bump maps to connect to the vray shader?
That is all. Excellent work on all the scripts, makes life in Maya a lot easier.
I have sometimes the same problem with materials not showing in the hypershade. It has nothing to do with the script… Don´t know how this happends
I have a part in the script which scans the bump connection. The problem with the Mia material has 500 different ways to add bump to the shader. So my script only scans the overall_bump connection.
But it should be no big deal to add some of the other bump ways too
Just let me know what you use the most and I will add it for you.
How do you create the shaders in your script? You must create them through the “shadingNode” command, rather than “createNode”, otherwise they won’t appear in HyperShade.
I´ve changed the createNode command, so the material should now be visible in the hypershade
I´ve also added a check for the two bump connections (overall and standard bump).
If one of them has a connection the script will work… If both have a connection it won´t, so in that case you have to combine the bump nodes and connect them into one input of the Mia shader.
Thats the stupid thing with the Mia material, there a 100 different ways to built up your network ^^
One thing I noticed with the script is when you convert some mia_materials with fresnel, the newly created VrayMat does not have the fresnel box checked. It copies over the fresnel settings okay, but the little checkbox is turned off. Try mental ray’s Glass Physical preset and then convert and you’ll see what I mean.
I don’t think the Anisotropic settings are converted yet either, if I knew MEL I’d try and help out but I don’t understand it yet.
you´re right. Some values are not converted yet. I didn´t add the fresnel button because they behave totally different in the VRay material. So I decided not to do this connection. I can add it if you need it, but I suggest to change/add this value manually.
The Anisotropic part will come in the next update. I haven´tr found a nice way to convert these settings so that they look nearly the same in VRay.