As V-Ray introduces new features and defaults with each iteration, old material (pun intended) may be left behind.
For example, the new energy conservation for GTR/GGX is turned on only for new materials, and it has no UI control to toggle it.
This is a problem if one has old material libraries, for example, they take materials from to add to new scenes.
The attached script aims to process .mat and .max files so to toggle such options (see the screenshot).
Usage:
a) Pick a Path to scan (it will recurse through sub-paths.) for .mat and .max files, or choose "work on the open scene" instead.
b) Toggle off the options you don't want
c) Press "Go!" and wait (a few seconds for matlibs, more for Max files.).
Warnings:
a) The script is given as-is, without any guarantee of support or improvements.
b) The script by default appends the max version to the saved files. The behaviour can however be toggled off, thereby enabling file overwriting. This is very risky (see point c) ) and shouldn't be used on the original files. To be clearer: make a copy of the files before processing them.
c) The process will set the version of matlibs/max files to the version of Max used to process them.
In other words, matlibs or max files saved with max 2023 will not open again in max 2022.
Particularly for older stuff: make a copy!
d) Max files can be opened either as matlibs (processing is super quick this way) and will then create a matlib as a result (maxfilename.mat) saved side-by-side, the original max files are left untouched, or as Max files proper (processing of these can be several times longer, depending on scene complexity.), and then by default a new version of the original max file will be created.
e) The switch of BRDF to GGX is naively done, there is currently no attempt at matching glossiness amounts. Looks *will* change (as it's the goal of the whole task.).
f) The legacy (typically mentalRay) custom attributes are detected and cleaned using Max's own scene converter. If it creates issues for you, turn it off.
Script version is 0.02 adds processing of just the open scene.
It also allows to add the Max version as token to the saved matlib (so old ones stay the same, and it future-proofs trying to open them.) as well as a custom string instead.
Script version 0.03 adds the processing and saving of max files as max or mat files, thereby creating (or overwriting. change defaults at your peril!) new max files or new mat files as the user chooses.
Script version 0.05 strenghtens the holding/fetching of max files, and adds conversion of bitmap loaders to vrayBitmap ones using the tried and tested functions that come with V-Ray.
Script version 0.07 adds the resetting of map coordinates' blur to 1.0 (only works on Max files treated as scenes. Won't touch matlibs.), and also turns on the new anisotropy model along with Energy conservation (the highlight will not turns into anisotropic, however.).
There is also a fix for a potential corner-case bug (that was not reported, however.).
Script and screenshots have been updated.
For example, the new energy conservation for GTR/GGX is turned on only for new materials, and it has no UI control to toggle it.
This is a problem if one has old material libraries, for example, they take materials from to add to new scenes.
The attached script aims to process .mat and .max files so to toggle such options (see the screenshot).
Usage:
a) Pick a Path to scan (it will recurse through sub-paths.) for .mat and .max files, or choose "work on the open scene" instead.
b) Toggle off the options you don't want
c) Press "Go!" and wait (a few seconds for matlibs, more for Max files.).
Warnings:
a) The script is given as-is, without any guarantee of support or improvements.
b) The script by default appends the max version to the saved files. The behaviour can however be toggled off, thereby enabling file overwriting. This is very risky (see point c) ) and shouldn't be used on the original files. To be clearer: make a copy of the files before processing them.
c) The process will set the version of matlibs/max files to the version of Max used to process them.
In other words, matlibs or max files saved with max 2023 will not open again in max 2022.
Particularly for older stuff: make a copy!
d) Max files can be opened either as matlibs (processing is super quick this way) and will then create a matlib as a result (maxfilename.mat) saved side-by-side, the original max files are left untouched, or as Max files proper (processing of these can be several times longer, depending on scene complexity.), and then by default a new version of the original max file will be created.
e) The switch of BRDF to GGX is naively done, there is currently no attempt at matching glossiness amounts. Looks *will* change (as it's the goal of the whole task.).
f) The legacy (typically mentalRay) custom attributes are detected and cleaned using Max's own scene converter. If it creates issues for you, turn it off.
Script version is 0.02 adds processing of just the open scene.
It also allows to add the Max version as token to the saved matlib (so old ones stay the same, and it future-proofs trying to open them.) as well as a custom string instead.
Script version 0.03 adds the processing and saving of max files as max or mat files, thereby creating (or overwriting. change defaults at your peril!) new max files or new mat files as the user chooses.
Script version 0.05 strenghtens the holding/fetching of max files, and adds conversion of bitmap loaders to vrayBitmap ones using the tried and tested functions that come with V-Ray.
Script version 0.07 adds the resetting of map coordinates' blur to 1.0 (only works on Max files treated as scenes. Won't touch matlibs.), and also turns on the new anisotropy model along with Energy conservation (the highlight will not turns into anisotropic, however.).
There is also a fix for a potential corner-case bug (that was not reported, however.).
Script and screenshots have been updated.
Comment