Very basic question about shadow mat

   2627   7   2
User Avatar
Member
340 posts
Joined: June 2017
Offline
I haven't tried using a shadow material before in Houdini with Mantra, but I can't get the equivalent of a shadow catcher in Modo, Blender, or C4D. What setting am I missing? In actual render, the png lacks the environmental light behind the floor/grid material but the grid comes in as a partial transparency.

The only workaround I can use is to do two renders, with objects hidden in the second render. Then in the first render, do not render environment. Finally, put them together in Davinci resolve (or photoshop). Is there an easier way?
Edited by Island - June 20, 2020 15:01:13

Attachments:
ShadowTest.hiplc (516.4 KB)
ShadowProblem.jpg (202.3 KB)
ActualRender.jpg (1.2 MB)

User Avatar
Member
73 posts
Joined: March 2020
Offline
I'm not sure I understand the question. If you take your png output (the second attached image) and composite it over a background image, the alpha in the image (which are in the areas where the pixel value is black) results in a shadow over the visible part of the background image. The grid is partially transparent because the environment light causes a very diffused shadow. Is this not what you were expecting?
User Avatar
Member
340 posts
Joined: June 2017
Offline
In modo, blender, and cinema 4d - when the environment is rendered with a shadow matte on a ground plane, it renders as if objects had a shadow on the environment. There is no extra step of post processing composite needed.
User Avatar
Member
73 posts
Joined: March 2020
Offline
Oh I see. Well you can go inside the shadowmatte shader and rewire it as follows:
Edited by ziconic - June 22, 2020 19:25:41

Attachments:
shadowmatte.png (64.8 KB)

User Avatar
Member
340 posts
Joined: June 2017
Offline
Unfortunately that is worse. It does not render the shadow and the ground plane is completely transparent. Thanks for looking though.
User Avatar
Member
73 posts
Joined: March 2020
Offline
Did you set Cf to 0 and Af to 1 and plug alpha into Of (not Af)? This is what I got.

Attachments:
ShadowTest.png (958.1 KB)

User Avatar
Member
340 posts
Joined: June 2017
Offline
Brilliant! My mistake. I did not set one of the constants correctly. It works perfectly now.
User Avatar
Member
172 posts
Joined: Jan. 2014
Offline
Hi, decided to just ask here.

I need the same thing, but in Karma and the setup from above doesn't really work there.
If anybody knows how to get this to work in Karma let me know, please

Thank you
Edited by Ivan L - March 31, 2021 14:37:22
I contribute to the beauty of this world
  • Quick Links