for one or more objects selected, i’d like to change the vraymtl reflection color to 0 0 0. any thoughts on how i’d do this? i’ve tried many variations and keep getting errors.
VrayMtl reflection color 0 0 0
thanks
for one or more objects selected, i’d like to change the vraymtl reflection color to 0 0 0. any thoughts on how i’d do this? i’ve tried many variations and keep getting errors.
VrayMtl reflection color 0 0 0
thanks
$.material.reflection_maxDepth = 12
works just fine.
i tried
$.material.reflection 0 0 0
and get an error. i tried reflection = 0 0 0, tried (0 0 0) etc.
if i try
$.material.reflection i get an response that says (color 255 255 255) which is white which is what the material’s reflection color is.
ugh.
mother f’er.
$.material.reflection = (color 0 0 0)
works!
now all i have to do is figure out how to do this on objects with multi-sub materials. except for actual materials that need to be reflective:shock:
Try VMC / Batch Material Editor scripts, both are free and can do batch editing for materials.
What does it mean exactly?
i have a bunch of objects in the scene all with multi/sub materials. each has between 3-7 sub-materials. some of those should actually have a reflective color, but it’s maybe 10% of them.
the other thing was when i type that MF’r script with many objects in my scene selected, objects with the multi/sub, the script errors out right away saying ‘unknown property’ on multi/sub material.
after more research last night, i’d be faced with writing complex scripts and though i always like to learn, i think in this case i’m going to have to find a script like m.max suggested.
thanks
EDIT: something i did wonder is this: in the “scene materials” list of the slate material editor, wouldn’t all the materials be listed separately from the mult-sub materials? and if not, why? also, internally to max, why is a mult-sub material a “material”?
couldn’t i just say skip all mult-sub materials? i realize this doesn’t account for preserving metal materials or other materials with reflection, but i could add a snip that says “if reflection color > 0 0 0 then move on”
You can use the following Maxscript to change all Vray materials reflection color to white unless it was originally black ,this will works with all Vraymtls including the one inside mult-sub materials, blend ,2 sided, … etc.
for m in (getclassinstances vraymtl) where m.reflection!= color 0 0 0 do m.reflection = color 255 255 255
the VMC tool is cool. still, sometimes it’s nice to have my own little button
but i do have it installed!
for your script, i can change the 0 0 0 and 255 255 255 - what’s happening in my case is i get a lot of 255 255 255 when i import and convert materials to vraymtl. so no worries there. thanks for this.
just putting this out there also, but i found a Batch Material Edit by Nick Gushchin that works pretty well. it also allows me to change all bitmap blur settings. i tend to get a lot of vray warnings about bitmaps having a blur value of 0.01 for some reason (forest objects, imported revit stuff etc…) and i’m able to set them to 1.0 so i don’t get warnings.
That what I’ve recommend in my first comment too ![]()
I would highly recommend using Lele Script in the link below to clean your VRay material library for reset blur value and few other things :
https://forums.chaos.com/forum/v-ray-for-3ds-max-forums/v-ray-for-3ds-max-general/1157051-tool-to-update-old-material-libraries-to-v6-standards
woops sorry M.Max! chalk that up to scatter-brain-panic-deadline mode!
i walked-by lele’s script because i saw a warning and didn’t recognize anything in it so i thought - ADVANCED USERS ONLY ugh! but i will read up on it when i have chance.
Hi , I made this simple script ,for reflection color settings of selected object’s material
hope it helps.
vrayreflcolorsetter.zip (513 Bytes)
nice. in some ways i think to myself - why haven’t i relied more on scripts in the past. but in other ways i feel like - that’s a LOT of stuff that should be built in ugh.