Using mip_matteshadow – The Final Word, kindof

Mental Ray and Maya, its a love hate relationship, both need each other but its like a bad marriage. :p
Anyway, here is a quick run through of getting mip_matteshadow to work for catching shadows casted by mental ray lights, such as the native IBL. Usebackground shader will not work for MR specific lights.

– First you must enable your MIP shaders, Just pop this in your MEL command and run “optionVar -intValue MIP_SHD_EXPOSE 1;”

– find the mip_matteshadow material in the hypershade and assign it to the floor plane

– Open the assigned mip_matteshadow material and make sure the you’ve got shadows ticked. ( its OK by default )

Next the tricky part, we have to tell maya to recognise the alpha of the matteshadow for the background

– Create a mip_rayswitch_environment
– Connect it to the “background” channel of mip_matteshadow
– create a mib_color_alpha
– set the factor of mib_color_alpha to 0.0
– connect it to the “background” channel of mip_rayswitch_environment ( note its different to the top one )
– Next, you can connect your IBL image into the Environment channel of mip_rayswitch_environment or a mip_cameramap ( this has no alpha contribution BUT you need it to for reflections etc, you can leave it blank for just shadow catching )

OK Phew, now we need to work on the camera. ( if you are using IBL or camera maping reflections etc )

– create another mip_rayswitch_environment and connect it to the mental ray environment shader of the render camera
– create a mib_color_alpha
– set the factor of mib_color_alpha to 0.0
– connect it to the “background” channel of mip_rayswitch_environment
– connect the IBL or mirrorball to the “environment” channel ( this is very important )

Well that should be it, when you render, you should see your image on a black background and your shadow included in the alpha of your image. šŸ˜‰
connect of mip_shadowmatte network to catch shadows with mental ray maya
mip_comp

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