Hello,
is there a easy/fast/script way to reset all the reflection/refraction glossiness of all the materials in a scene to 1.0 ?
thanks !
Hello,
is there a easy/fast/script way to reset all the reflection/refraction glossiness of all the materials in a scene to 1.0 ?
thanks !
There is a check-box in the “Global switches” rollout to disable all glossy effects in the scene (they will be treated as non-glossy instead).
Best regards,
Vlado
yeah i know that one, but the fact is i received a heavy scene from someone that i need to work on, especially on the materials.
And the guy has set glossy on almost all the materials…and i need to clean this out because rendering at 1h/frame (HD) on dual quad-core, well it is not acceptable for me ![]()
theMats = getclassinstances VrayMtl
for m in theMats do
(
m.reflection_glossiness = 1
m.refraction_glossiness = 1
)
this will reset them at the material level.
The checkbox is a lot better, however, as it’ll allow you to go back to the original state with a click.
Edit: Well, shouldn’t have got a cup of Coffee while writing the message ![]()
If you want it to be really reset within the materials, you can use
for i in (getclassinstances vraymtl) do
(
i.reflection_glossiness = 1.0
i.refraction_glossiness = 1.0
)
```best regards,
Michael
LMAO!
Well, you’re one line short, hence more efficient!
Coffee worked ![]()
thanks, you just divided my rendering times by 20 ![]()
and if by any chance you know how to script :
put all the mat ID’s to 2 when the material has written “chrome” in its name
Would be usefull as well for my post-prod ![]()
Somewhere is a great one called VMC (VrayMaterialControl.) It lets you have control over anything…I believe it was written by Olly?
thxs for the info will check this out !
Hi Muoto!
Instead of answering by private message, i prefer to use your thread, because it might be of interest for others as well, who knows ![]()
Look at the given code:
for i in (getclassinstances vraymtl) do
(
i.reflection_glossiness = 1.0
i.refraction_glossiness = 1.0
)
```So what the script does, is to collect all Vray Materials anywhere in the scene (getclassinstances vraymtl), and then goes through all of them to change what you put inbetween the brackets.
I quickly listed all the properties of a Vray Material. Now it's up to you to find out how to change the script to make it work. I know you can do it - and to give you a starting hint, boolean means "true" or "false"!
.diffuse : RGB color
.diffuse_roughness : float
.reflection : RGB color
.reflection_glossiness : float
.hilight_glossiness (reflection_glossiness) : float
.reflection_subdivs : integer
.reflection_fresnel : boolean
.reflection_maxDepth : integer
.reflection_exitColor (reflect_exitColor) : RGB color
.reflection_useInterpolation (useInterpolation) : boolean
.reflection_ior : float
.reflection_lockGlossiness : boolean
.reflection_lockIOR : boolean
.refraction : RGB color
.refraction_glossiness : float
.refraction_subdivs : integer
.refraction_ior : float
.refraction_fogColor : RGB color
.refraction_fogMult (refraction_fogMultiplier) : float
.refraction_fogBias : float
.refraction_affectShadows : boolean
.refraction_affectAlpha : integer
.refraction_maxDepth : integer
.refraction_exitColor (refract_exitColor) : RGB color
.refraction_useExitColor (refract_useExitColor) : boolean
.refraction_useInterpolation : boolean
.translucency_on (translucency_type) : integer
.translucency_thickness : worldUnits
.translucency_scatterCoeff : float
.translucency_fbCoeff : float
.translucency_multiplier : float
.translucency_color (translucent_color) : RGB color
.brdf_type : integer
.anisotropy (brdf_anisotropy) : float
.anisotropy_rotation (brdf_anisotropy_rotation) : float
.anisotropy_derivation (brdf_anisotropy_derivation) : integer
.anisotropy_axis (brdf_anisotropy_axis) : integer
.anisotropy_channel (brdf_anisotropy_channel) : integer
.soften (brdf_soften) : float
.option_traceDiffuse : boolean
.option_traceReflection : boolean
.option_traceRefraction : boolean
.option_doubleSided : boolean
.option_reflectOnBack : boolean
.option_useIrradMap : boolean
.option_traceDiffuseAndGlossy : integer
.option_cutOff : float
.preservationMode : integer
.option_environment_priority : integer
.option_clampTextures : boolean
.texmap_diffuse : texturemap
.texmap_diffuse_on : boolean
.texmap_diffuse_multiplier : float
.texmap_reflection : texturemap
.texmap_reflection_on : boolean
.texmap_reflection_multiplier : float
.texmap_refraction : texturemap
.texmap_refraction_on : boolean
.texmap_refraction_multiplier : float
.texmap_bump : texturemap
.texmap_bump_on : boolean
.texmap_bump_multiplier : float
.texmap_reflectionGlossiness : texturemap
.texmap_reflectionGlossiness_on : boolean
.texmap_reflectionGlossiness_multiplier : float
.texmap_refractionGlossiness : texturemap
.texmap_refractionGlossiness_on : boolean
.texmap_refractionGlossiness_multiplier : float
.texmap_refractionIOR (texmap_ior) : texturemap
.texmap_refractionIOR_on (texmap_ior_on) : boolean
.texmap_refractionIOR_multiplier (texmap_ior_multiplier) : float
.texmap_displacement : texturemap
.texmap_displacement_on : boolean
.texmap_displacement_multiplier : float
.texmap_translucent : texturemap
.texmap_translucent_on : boolean
.texmap_translucent_multiplier : float
.texmap_environment : texturemap
.texmap_environment_on : boolean
.texmap_hilightGlossiness : texturemap
.texmap_hilightGlossiness_on : boolean
.texmap_hilightGlossiness_multiplier : float
.texmap_reflectionIOR : texturemap
.texmap_reflectionIOR_on : boolean
.texmap_reflectionIOR_multiplier : float
.texmap_opacity : texturemap
.texmap_opacity_on : boolean
.texmap_opacity_multiplier : float
.texmap_roughness : texturemap
.texmap_roughness_on : boolean
.texmap_roughness_multiplier : float
.texmap_anisotropy : texturemap
.texmap_anisotropy_on : boolean
.texmap_anisotropy_multiplier : float
.texmap_anisotropy_rotation : texturemap
.texmap_anisotropy_rotation_on : boolean
.texmap_anisotropy_rotation_multiplier : float
.reflect_minRate : integer
.reflect_maxRate : integer
.reflect_interpSamples : integer
.reflect_colorThreshold (reflect_clrThresh) : float
.reflect_normalThreshold (reflect_nrmThresh) : float
.refract_minRate : integer
.refract_maxRate : integer
.refract_interpSamples : integer
.refract_colorThreshold (refract_clrThresh) : float
.refract_normalThreshold (refract_nrmThresh) : float
Michael
Thanks !
Is this written somewhere in the SDK doc as well ?
Do you have the same info for vraylightmtl ?
show (vraylightmtl())
perfect !
learned something new today ![]()
That was my intention!
Best regards,
Michael
eeerrrr…where to type this script in max? im total noob ![]()
heeeeeelppp
For that, you have a 3ds max manual.
It will grow your understanding of your favourite tool too.
Open Max, press f1, and try searching for “MaxScript”.
thanks for the advise lele. wow maxscript is my worst nightmare haha. well when I have time sure will look at it.
with script knowledge definately is a great thing for better workflow
this is a master.
but im too dumb for that ![]()
here’s the for-idiots-like-me version: http://www.scriptspot.com/3ds-max/vmc-vray-material-control
best vray tool ever