Shadow Recieving Matte for Ground Plane

Probably a super simple question. Say I have a plane and a teapot and a vraylight dome with an HDRI. I want the plane to catch the shadow from the teapot. I apply a VrayMtlWrapper material to the plane, set Matte Surface to on, shadows on, affect alpha on, alpha contribution to -1. Render, no shadow. What step am I missing? Thanks.

- Neil

dome light set to use irradiance map…?? or brute force

Neither, GI is not enabled.

- Neil

It won’t receive shadows if the teapot is set to matte also, and just to be obvious the tea pot is casting shadows?

The teapot has a standard material. And yes, the teapot is casting shadows, if I put a standard material on the plane it receives shadows like it should, it just doesn’t see through to the vraylight behind it.

- Neil

Here’s a test file that fails, if anyone’s interested in taking a poke at it.

- Neil
matte.zip (20.5 KB)

… simple answer.
… replace the standard materials with vray materials !!! especially in the overwrite material
… first use a vray plane light to see the effect … the shadow
… use a map in the background … to see the matte effect

hope that helps

love your scripts

Klaus

Now I’m confused. Is there supposed to be a submaterial in the VrayMtlWrapper? If so, what material? And are you saying there has to be an environment map? There’s no way to see through the plane to the map that’s visible in the VRayLight?

Thanks!

- Neil

no time for confusion :slight_smile:
i will post a file in a minute

Klaus
matte_2014_Vray_3.zip (297 KB)

Do not never use standard materials with Vray. use Vray materials for vray work.

Vray will never output render elements for standard materials so any vray type features, you’ll have to make sure you’re using vray materials exclusively. I’d say what Klaus is saying is that you’ve gotta have a vray material as the actual base shader in the vrayMTLwrapper.

never ever :slight_smile:

the demo file
matte_2014_Vray_3.zip (297 KB)

Thanks. So your file works, but you changed a lot of stuff. I’ll poke at this tonight when I get back from work to see if I can narrow down the exact setting that’s different between the two files that stops my example file from doing the right thing. Thanks for the help so far!

- Neil

That was just an oversight. Replacing the Standard material with a vraymtl in my original file equally doesn’t work.

- Neil

… put a vraymtl in the vraymtlwrapper as base material
… make yor dome light invisible … to see the background
… put a map in the background

and

your file works

Hmmm. Ok, I get what’s happening now. Unfortunately, it won’t do for what I’m trying to do. I’m basically trying to catch the shadow on a plane, and then still see anything below the plane (whether that be a light or another object), just with a shadow overtop. I’ll have to do some rethinking of how I’m trying to achieve my goal. Anyways, thanks for all the help!

- Neil

… but that´s exactly what it does.
put an object below the plane
the plane catches the shadow of the light
and
you see the object or a light below the plane
no need to rethink

if you want the dome light with a map it´s ok (invisible) and put a instance of the map in the background

Klaus

Not sure if this helps but if you:

1. Add a white material to your plane
2. Bake out your lighting for this plane
3. Re-add your environment image to your plane
4. Then divide this environment image by your baked light map for your plane shader

You can add objects and get the correct shadowing. I haven’t tested this enough yet though to figure out whether the result is the same as using a material wrapper.

That’s not entirely true - when a camera ray hits matte object it omits every geometry behind it a reaches directly to the background. You can control object visibility in the alpha-channel via Alpha Contribution parameter inside WrapperMtl but not in the beauty-pass.
The only option would be to bake the matte-shadow-map and then use it into opacity slot of the ground material without matte-properties.

Here you could find a single-pass solution which will work with standard Max-lights but not with VrayDOmeLight.
http://forums.chaosgroup.com/showthread.php?76842-Matte-problem&p=611392#post611392