mia_material_x Glossy Samples locked

david | dj mod,mel script,mentalray,rendering | Monday, November 12th, 2007

The mia_material_x shader in maya 2008 was written with efficiency in mind and one example of this is the relationship between the Glossiness parameter and the Glossy Samples parameter. A Glossiness value that is less than 1 results in a blurred reflection the quality of which is determined by the Glossy Samples parameter.


Increase Glossy Samples and the reflection is less grainy, at the expense of an increase in render times.

If Glossiness = 1, then you get a perfect mirror reflection which requires no extra sampling and the renderer ignores the Glossy Samples value and internally uses a value of zero. In the attribute editor the Glossy Samples slider becomes dimmed and locked to indicate its redundancy in this situation.


However if you hook up a texture map to Glossiness, as shown above, you will find that the Glossy Samples slider is locked even though your texture map may contain values less than 1.

This is not a major problem, since the renderer does not ignore the Glossy Samples value in this case, but it makes it difficult to tweek the value. You have to disconnect the texture, lower the Glossiness value to unlock the slider, change the Glossy Samples and then reconnect the texture.

Well today I had to do this often enough that I decided to modify the mel script that locks the slider and to disable that bit. It was just a matter of commenting out 4 lines and restarting maya.


Download mia_material_x_functions.rar here.

Extract mia_material_x_functions.mel and put it in your local scripts folder and restart maya.

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.

Powered by WordPress | Based on a theme by Roy Tanck