This would be useful when I just want to quickly create and save IR and LC maps for use later and don’t want all the extra prepasses associated with glossy reflections to go at that time. Especially in scenes with a lot of glossy materials it can be a pain to go through them all and disable interpolation.
A global glossy quality control perhaps, rather than having to turn it off?
These are great ideas, I quite often get scenes with interpolated materials in and i’m not sure where they are to turn them off and avoid extra pre passes.
I use the vray automator script to change glossies in an entire scene but I think it has it’s limitations as I think it can’t change a material within a vray wrapper… or something like that, I can’t remember??
I would have though these are common problems?
-- change the properties of materials in the current object selection.
fn changeparam u=
(
-----------------------------------------------------
-- this is where the material parameters are changed!
-- change this to true or false, or add other material properties.
u.reflection_useInterpolation=false
-----------------------------------------------------
)
for p in selection do
(
pushprompt "Working..."
if p.material!=undefined then
(
s=p.material
format "% " s.name
if classof s==Multimaterial then
(
for t in s do if classof t==Multimaterial then
(
for u in t do changeparam u
) else
(
changeparam t
)
) else
(
changeparam s
)
)
)
pushprompt "Finished!"
)
Ok so i’m really no scripter but I guess I (or some scripter guru) could slip this code into the vray automator? and bobs your uncle?
You can select new script, paste this in, then drag to a custom toolbar. Or you can save it with a name and select run script.
The basics are good to know.
Great thanks for that!
Tested it and it seam to work fine for vray materials, but I did a quick test with a multisub-
used a multisub object with mat 1 set as a vray material with interpolated glossies and the rest left as standard materials (not in use) and applied it to an object.
The script gave this error:
---Unknown property:“reflection_useinterpolation” in Material #--------:standard
The material its talking about is in slot 2 of the multisub.
Any ideas?
Well - I didn’t script that and unfortunately cannot recall who did. I think this was mentioned a long time ago on the forum - perhaps even a thread started by me. This is left for someone else with much better skills to figure out. ![]()
This might work if I counted the parenthesis right.
-- change the properties of materials in the current object selection.
fn changeparam u=
(
-----------------------------------------------------
-- this is where the material parameters are changed!
-- change this to true or false, or add other material properties.
u.reflection_useInterpolation=false
-----------------------------------------------------
)
for p in selection do
(
pushprompt "Working..."
if p.material!=undefined then
try
(
s=p.material
format "% " s.name
if classof s==Multimaterial then
(
for t in s do if classof t==Multimaterial then
(
for u in t do changeparam u
) else
(
changeparam t
)
) else
(
changeparam s
)
) catch()
)
pushprompt "Finished!"
)
i dont think the above script will work with multi level materials.
I have a script that can do it, I will ask if I can distribute it.
PM me if you are interested in it
good suggestions for those who use scripts. Personally I’m a giant ludite and don’t even know what a script is. If it’s not a pretty little button inside the vray GUI its way beyond me. Just one for the wishlist I guess.
jacksc02 that would be great!
Consider this a PM as I don’t have messenger installed at work( too distracting)
A working script that resolves this issue would be a real asset.
PM me through the forum