I often get tired of having to render AO (ambient occlusion) passes along with rendering my animations. I've often wanted to just use the AO setting in the A&D materials, but I'm way too lazy to go through all of my materials in my scene to turn them on, so I wrote this simple maxscript that does several things for the A&D material:
-turns on AO in all A&D materials of a scene
-sets the AO spread distance to 3'
-turns off backface culling for all materials in scene
Here it is:
for a in objects do
(
if (classof a.material == Arch___Design__mi) then
(
a.material.opts_ao_on = true
a.material.opts_ao_distance = 36
a.material.opts_backface_cull = false
)
if (classof a.material == Multimaterial) then
(
for b = 1 to a.material.numsubs do
(
if (classof a.material.materialList[b] == Arch___Design__mi) then
(
a.material.materialList[b].opts_ao_on = true
a.material.materialList[b].opts_ao_distance = 36
a.material.materialList[b].opts_backface_cull = false
)
)
)
)
I can't take the credit for this script. A big thanks to max expert Louis Marcoux. This script can also apply to any other parameter in the A&D material. If you want to change other parameters of the A&D material, you can find them here. And substitute /add them into the script.
0 nhận xét:
Đăng nhận xét