I am a newcomer to maxscript, I am trying to write a max to vray material converter, using max's scene converter. Some errors have occurred and the texture conversion rules I defined cannot be successful. My reference is the official vray conversion script. Anyone can help me, thank you.vray-to-arnold.zip
Solved! Go to Solution.
Solved by madsd. Go to Solution.
I got an initiative, a guy actually double bumped me to get it going for Vray to Arnold.
The scene converter script here works as intended, but no slots are wired up.
https://github.com/gkmotu/ArnoldSceneConverterScripts3DSMAX/blob/master/VrayMaterial_To_ArnoldMateri...
I will add diffuse and bump slot and resubmit an updated script tonight.
This is something really useful. One of the main things is holding people here at the office to move to Arnold is that all our models are in Corona or Vray. Can I have a look at the code and see if I can make it converting from Corona?
@Ciro
Anything is possible.
I started the converter github up quite a while ago, but only started, never got futher.
I will spend some time on it, and also include the corona mat to Arnold.
But:
You need class and superclass, proper naming through the script, just open and inspect the .ms file I link to just above.
There is a section where we can map vray and corona slots to arnold slots, so if you got a bitmap sitting in a slot, it will move the connection to the arnold mat automatically and work as expected. ( - or actually, anything that is connected to that slot will hook up to the new Arnold material. )
Try inspect the Scanline to Arnold conversion script here.
https://github.com/gkmotu/ArnoldSceneConverterScripts3DSMAX/blob/master/StandardMaterial_To_ArnoldMa...
There are 2 rules, Diffuse and Opacity.
line 118 and 119 contains the slot rules.
You can pull information of names with max script listener:
show $.material returns closure hook names and type.
show $,material.classID returns the classid
show $.material.superclassID retuns the super classid.
You need both for both things you want to convert FROM/TO.
And then rename the function names to logic names and in general just change what is needed.
Follow this logic for all slots, note, some values for 1 engine may need some calculations to match Arnold, but you can do that directly in the lines.
Dest.base_color_shader = Source.diffuseMap<br>Dest.opacity_shader = Source.opacityMap
Updated the Vray to Arnold material convertion script with 3 points.
- Diffuse Color
- Diffuse slot support
- Opacity map slot support
- Vray bump slot gets converted to Arnold normal, with an additonal Normal 2D node generated automatically. Let me know if the bump value translate correctly.
https://github.com/gkmotu/ArnoldSceneConverterScripts3DSMAX/blob/master/VrayMaterial_To_ArnoldMateri...
Updated:
- Added Metalness support.
- Added Diffuse Roughness support.
Updated:
Corona to Arnold material now added.
- Diffuse color
- Diffuse texture
- Specular
- Bump to Normal, an additional bump2D node is created in the process.
Let me know if float values needs some massaging to get identical looks.
https://github.com/gkmotu/ArnoldSceneConverterScripts3DSMAX
@Mads still cannot make it work... I installed vray...just in case, I open a vray file and I run Colin Senner's script for reload all bitmaps. Then I enter to scene converter, load your script, click on convert scene, I enter Arnold as a renderer, when I render ok it renders but with no bitmaps. And in the Material Editor still see "vray materials" alive...
Check if you do it right by adding a simple Vray material, no bitmaps to a sphere.
Convert, and check if the vray material converts to an arnold one, if it does not, then pipeline is broken and we have to find out where, afterwards.
I sent you to gkmotu@gmail the vray file with it's bitmaps to test it... No material even without bitmap is converted... Anyway pesonally if I have to deal with vray files to convert them into arnold I use this script (free from scriptspot) to convert them first to scanline and then with scene converter I convert them to arnold, with pretty good results... some minimun tweaks only in material editor, if for ex on a multi sub object (legacy) material are attached non compatible with arnold maps...conversor-v124.zip
I just tried to convert the multimap with all the books textures on.
It converts all vray materials to Arnold, and keeps the bitmaps in diffuse, but loses the falloff node in reflection glossiness.
I will update the script so the reflection gloss slot is supported tomorrow.
But it sounds like you are doing something wrong in the scene converter?
You do see the Vray material and do make a new connection, right? you need to set it up before it works, the connection needs to go into the most right window, in the EDITOR.
Setup looks like this.
Copy the file to that folder, and clean everything out in the right side, then add the highlighted conversion.
Updated the Vray to Arnold material script.
- Specular RGB color
- Specular Roughness float
- Specular Roughness texture map
Updated the Vray to Arnold material script:
It currently supports these features and slots.
Updated the Corona to Arnold material script:
It currently supports these features and slots.
Added 2 additonal Vray nodes.
- Vray2SidedMtl To Arnold two sided material
- VrayNormalMap To Arnold Normal map