question

家洛 卢 avatar image
家洛 卢 asked ·

vray to arnold

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

vray-to-arnold.zip (17.5 KiB)
1 comment
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.

Oh, it is vray to arnold not max to vray

0 Likes 0 · ·
Mads Drøschler avatar image
Mads Drøschler answered ·

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

Share
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.

Mads Drøschler avatar image
Mads Drøschler answered ·

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_ArnoldMaterial.ms


I will add diffuse and bump slot and resubmit an updated script tonight.

1 comment Share
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.

You always help me when I need help, thank you.

0 Likes 0 · ·
Ciro Cardoso avatar image
Ciro Cardoso answered ·

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?

Share
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.

Mads Drøschler avatar image
Mads Drøschler answered ·

@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_ArnoldMaterial.ms

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
Share
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.

Mads Drøschler avatar image
Mads Drøschler answered ·

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_ArnoldMaterial.ms

Share
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.

Mads Drøschler avatar image
Mads Drøschler answered ·

Updated:


- Added Metalness support.
- Added Diffuse Roughness support.


https://github.com/gkmotu/ArnoldSceneConverterScripts3DSMAX/blob/master/VrayMaterial_To_ArnoldMaterial.ms

Share
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.

Petros Proestos avatar image
Petros Proestos answered ·

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

5 comments Share
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.

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.

0 Likes 0 · ·

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

0 Likes 0 · ·
conversor-v124.zip (154.0 KiB)

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.

0 Likes 0 · ·
Show more comments
Mads Drøschler avatar image
Mads Drøschler answered ·

Updated the Vray to Arnold material script.

- Specular RGB color
- Specular Roughness float
- Specular Roughness texture map

Share
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.

Mads Drøschler avatar image
Mads Drøschler answered ·

Updated the Vray to Arnold material script:

It currently supports these features and slots.

  • Diffuse RGB Color
  • Diffuse texture
  • Diffuse map on/off
  • Diffuse roughness float
  • Roughness texture
  • Diffuse roughness map on/off
  • Emission color
  • Emission float
  • Emission texture
  • Emission map on/off
  • Specular RGB Color
  • Specular roughness float
  • Specular texture
  • Specular map on/off
  • Specular roughness texture
  • Specular rouhness map on/off
  • Specular IOR
  • Metalness float
  • Metalness texture
  • Metalness map on/off
  • Opacity texture
  • Opacity map on/off
  • Normal texture
  • Normal map on/off
  • Transmission RGB color
  • Transmission texture
  • Transmission map on/off
1 comment Share
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.

yessssssssssss :)

0 Likes 0 · ·
Mads Drøschler avatar image
Mads Drøschler answered ·

Updated the Corona to Arnold material script:

It currently supports these features and slots.

  • Diffuse RGB color
  • Specular RGB color
  • Transmission RGB color
  • Opacity RGB color
  • Base float
  • Reflect float
  • Transmission float
  • Diffuse texture
  • Specular texture
  • Roughness texture
  • Transmission texture
  • Transmission extra roughness texture
  • Opacity texture
  • IOR texture
  • Emission texture
  • Diffuse map on/off
  • Specular map on/off
  • Transmission on/off
  • Specular map on/off
  • Opacity map on/off
  • Extra roughness map on/off
  • Opacity map on/off
  • Emission map on/off
  • Anisotropy map on/off
  • rotation map on/off
  • Anisotropy float
  • Anisotropy rotation float
Share
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.

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.