interior visualizations of an attic apartment – wip

Here are some pictures of my new project. Final images coming soon.

In this project I tried a script which can switch ambient occlusion on in all A&D materials in the scene. One can save a lot work with this because you don’t have to change this parameters in each materials in the scene one by one. In my case I usually have at least 20-30 materials in a scene so you can imagine how sweltering it could be. The other solution is to render out an AO pass and put them together in post production, but it isn’t physically accurate, doesn’t look as good and it’s kludgy.

Here are some raw renders with different AO methods:

Many thanks for Ramy Hanna for this usefull script! I’ve been looking for something like this for a long time ago.
Here is the script:

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
)
)
)
)

here is the original post by Ramy Hanna: http://www.ramyhanna.com/2011/07/control-materials-globally.html

as you see this turns on AO in each A&D materials in the scene, also in multi/sub-object materials and set the AO distance to 36 and backface culling off. of course you can change this settings if you like, and can controll any other settings in your A&D materials. I did so. Here are my settings:

for a in objects do
(
if (classof a.material == Arch___Design__mi) then
(
a.material.opts_ao_on = true
a.material.opts_ao_distance = 50
a.material.opts_ao_samples = 64
a.material.opts_ao_exact = true
a.material.opts_ao_use_global_ambient  = true
)

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 = 50
a.material.materialList[b].opts_ao_samples = 64
a.material.materialList[b].opts_ao_exact = true
a.material.materialList[b].opts_ao_use_global_ambient  = true
)
)
)
)

In this I’ve changed the distant value and I changed some other AO parameters. I also made another script in case I want to turn AO off:

for a in objects do
(
if (classof a.material == Arch___Design__mi) then
(
a.material.opts_ao_on = 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 = false
)
)
)
)

You can check this link for more information about the A&D materials, so with this you can change any other parameters easily:
http://docs.autodesk.com/3DSMAX/14/ENU/MAXScript%20Help%202012/index.html?url=files/GUID-276095AD-1D67-4B27-B25A-1BAA66CC4FD-2598.htm,topicNumber=d28e868086

I’m not a script writer, in fact I can not write even one script line. But it wasn’t rocket science so go ahead and take control of those parameters! :)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s