shadow catcher

Hi,

I am trying to replicate a shader similar to that of the mip_matte_shadow shader in mental ray (an advanced maya “use background” shader)

On another forum the use of the VrayWrapperMtl has been suggested and you have to make sure you have a material plugged into your base slot.

I have tried this however I had no luck. The ground plane just renders black.

Now I think this might be bacause I do not have anything plugged into my background slot, so it defaults to black.

I am using dome light with a long/lat hdr for the texture. I want that to be the background rather than an image plane.

Possible?

Thanks,

Joe

One way to do it to use a VRayMtlWrapper material with the “matte”, “shadows” and “affect alpha” options enabled, with the alpha contribution set to -1.0. You still need to assign a base material (e.g. a VRayMtl material) to the VRayMtlWrapper material.

Best regards,
Vlado

Hey Vlado,

Just tried but not seeing any shadows on the ground plane now. Plus the ground reflects black into the car.

See attachment vray_wrapperFloor.jpg

I want to get a result like mr_shadowShader.jpg

The background is the texture attached to the lightDome.

Thanks,

Joe


It works for me. It might be better if you can get us a simple scene to vraymaya@chaosgroup.com just in case you are doing something else.

Best regards,
Vlado

Hi Vlado,

I sent you an email earlier today. Not sure if you recieved it though as not heard anything back. (which is unusual ;-))

Can you let me know if you recieved it, if not I can send it again.

Many thanks,

Joe

To make it work you need to have “Matte for all secondary rays” option enabled.
Otherwise V-Ray for Maya will take into account the matte effect only for the primary race of the sampling.

So a few more notes in your scene:

(*) The VRayMtlWrapper material shows the environment through it; the dome light is not considered environment. To fix this, just assign the same file texture node to the V-Ray background environment slot. This will still cause an issue as the dome light has an intensity multiplier of 2.5. To fix this, I moved this to the “Color gain” of the file texture, and left the dome light intensity to 1.0.

(*) You must assign a material to the base slot of the VRayMtlWrapper material. This material will be used for reflections, refractions, GI etc. If you want the plane to be matte in reflections as well, you must turn on the “Matte for all secondary rays” option, like Zdravko suggested, and you will also need to assign the same environment file texture to the reflection environment slot of V-Ray.

See attached the result after these changes.

Best regards,
Vlado

Hi guys,

Thanks for the help.

Got this to work however I do not get the same result when rendering with RT.

A bug?

Same settings literally just rendering by pressing IPR to initiate RT.

Thanks,

Joe


Yep, the matte/shadow material does not work very well in the RT engine at present.

Best regards,
Vlado

Hey Vlado,

Ah ok.

Is there an alternative to this workflow that will play nicely with RT at this present time?

Many thanks,

Joe

It looks like it should be good enough to use RT to estimate. Sometimes it can be different (SSS materials for example) but it is always good enough to get a good idea on how it will finally render.