Karma Shadow Matte

   22969   68   9
User Avatar
Member
274 posts
Joined: 3月 2011
Online
Is It possible to render shadow matte pass with Karma?
User Avatar
Member
15 posts
Joined: 8月 2010
Offline
I tried with Houdini18.5.408, it seems not working.
User Avatar
スタッフ
441 posts
Joined: 9月 2016
Offline
Hi. Karma does not yet support shadow matte or have a shadow catcher. As a workaround you could output shadowed and unshadowed AOVs and take the difference to generate a shadow pass in comp.
User Avatar
Member
382 posts
Joined: 11月 2010
Offline
dlee
Hi. Karma does not yet support shadow matte or have a shadow catcher. As a workaround you could output shadowed and unshadowed AOVs and take the difference to generate a shadow pass in comp.
Still no solution in 19.5?
What's the holdup?
User Avatar
Member
8768 posts
Joined: 7月 2007
Offline
OneBigTree
Still no solution in 19.5?
What's the holdup?
I personally haven't used Karma much, but there is this since 19
https://www.sidefx.com/docs/houdini/nodes/lop/backgroundplate.html [www.sidefx.com]

Does it not provide AOVs you are after?
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
1696 posts
Joined: 3月 2009
Online
It has worked for me before (with some small caveats), if you use the holdout LOP, connect its second output to the second input of the karmarendersettings lop in question and then hook on the "Import render vars from second input" on the Image Output - AOVs tab of the karmarendersettings.
*Edit: "Before" as in: earlier today, on build .387
Edited by protozoan - 2022年10月3日 14:56:19
Martin Winkler
money man at Alarmstart Germany
User Avatar
Member
382 posts
Joined: 11月 2010
Offline
tamte
OneBigTree
Still no solution in 19.5?
What's the holdup?
I personally haven't used Karma much, but there is this since 19
https://www.sidefx.com/docs/houdini/nodes/lop/backgroundplate.html [www.sidefx.com]

Does it not provide AOVs you are after?
I am not looking for AOVs I need a Matte shader for catching shadows and mask objects in the scene with complex geometry, like the Redshift Matte_Shadow - without having to go through a comp first. As far as I understand the Background plate is meant to catch a camera projection to interact with the scene.
I have also a bunch of problems with controlling render visibility using the standard matte shader for Mantra (which works in a way in solaris) but it is all too much hassle for the quick turnaround I need.

https://www.sidefx.com/forum/topic/86688/ [www.sidefx.com]

Edit:
I tried the Background plate but it seems just as problematic and it doesn't exactly do what I need.
Edited by OneBigTree - 2022年10月10日 11:47:30
User Avatar
Member
1 posts
Joined: 8月 2014
Offline
protozoan
It has worked for me before (with some small caveats), if you use the holdout LOP, connect its second output to the second input of the karmarendersettings lop in question and then hook on the "Import render vars from second input" on the Image Output - AOVs tab of the karmarendersettings.
*Edit: "Before" as in: earlier today, on build .387

Hi! Thanks for the tip. What do you mean by "Holdout LOP"? I've done a search for Holdout in Lops but I'm not finding anything.

Thanks for any help!
User Avatar
Member
57 posts
Joined: 12月 2014
Offline
Any news on the Shadow Matte functionality for XPU?
Just holding out for this node to be created and I'm leaving Arnold for good...
BTW tried the holdout and it's not the same, we need to have a shadow catcher on a plane geometry so that the plane is transparent where the shadow is not present.
User Avatar
スタッフ
527 posts
Joined: 5月 2019
Offline
Tser
Any news on the Shadow Matte functionality for XPU?

The next version of Houdini will have much better support for shadow mattes in XPU
namely
- shadow LPEs (eg "shadow;C.*")
- Holdout LPEe (eg "holdout;C.*"or "holdout;C<..'torus'>.*"etc...)
Edited by brians - 2023年2月2日 21:58:00
User Avatar
Member
57 posts
Joined: 12月 2014
Offline
brians
Tser
Any news on the Shadow Matte functionality for XPU?

The next version of Houdini will have much better support for shadow mattes in XPU
namely
- shadow LPEs (eg "shadow;C.*")
- Holdout LPEe (eg "holdout;C.*"or "holdout;C<..'torus'>.*"etc...)
Thanks for the heads up brians, are any of these methods the same as a shadow Matte material as what Arnold uses, as I don't want to have to composite a scene just to see what it will look like when doing look dev.
As a work around for now, I have a plane (grid) under my geometry with opacity mapping to blend its edges into the environment map, this plane (grid) catches the shadows from the geometry, it has various noise and normal mapping to simulate the ground of the environment map, this works o.k. but it's not as good as the real thing and a lot of work to set up.
T.
User Avatar
スタッフ
527 posts
Joined: 5月 2019
Offline
Tser
are any of these methods the same as a shadow Matte material as what Arnold uses

I'm not familiar with the Arnold shadow-matte material sorry. And also I'm not an expert on how to best use the Karma shadow-matte stuff either, I just made XPU do the same as Karma CPU. I could get someone else to chime if this answer does not suffice?

But the shadow LPE takes the difference between an occluded render and an unoccluded (ie without shadows) render. And then sticks the difference into an image, which can be used at compositing stage.

The holdout LPE stuff allows someone to isolate (or mask out) parts of their image.

Here is a quick example I put together for dev/testing purposes. Its all done through the LPE system (KarmaRenderSettings node -> image output tab -> AOVs (render vars) tab -> scroll down to see "extra render vars" section)

https://www.sidefx.com/docs/houdini/render/lpe.html [www.sidefx.com]

Attachments:
holdout_shadow_lpe_195.JPG (159.6 KB)
lpe_test_torus_holdout3_195.hip (721.1 KB)

User Avatar
Member
57 posts
Joined: 12月 2014
Offline
Thanks Brians, tried out your test scene, but All I got was what your image displays, two transparent objects casting shadows onto the grid.
What I want is the objects (torus and sphere) to be solid (not transparent), the grid to be transparent but it must receive the shadows, so the only sign of the grid is the shadows on it from the objects, this is how the Arnold renderer works. It achieves this by the material which is applied to the grid, the Shadow Matte Material. No other setting are needed to be changed except the addition of the Shadow Matte material to the grid object.
So, basically I want the opposite to what your scene does, instead of two transparent objects casting shadows on a visible grid, I want two visible objects casting shadows onto a transparent grid.
User Avatar
スタッフ
527 posts
Joined: 5月 2019
Offline
click this button here to see all the different layers.

What the layers have in them are defined in that "KarmaRenderSettings node" -> "image output tab" stuff I mentioned

When you render out to something like EXR, all the different layers will be in there (view them in MPlay) and any decent compositing software will be able to read the layers. Or perhaps use some EXR tool to extract them out... (sorry not my area of expertise)
Edited by brians - 2023年2月6日 04:24:23

Attachments:
holdout_shadow_lpe_195_layers.JPG (115.8 KB)

User Avatar
Member
57 posts
Joined: 12月 2014
Offline
Thanks for that Brians, but it's not the same, I know that I can render out AOV's and composite them together afterwards, but I need this to be done in the beauty pass all at once when I do a render, this is for look dev, I need to see in the viewport, what the final render will look like as I add or change materials and the environment. The shadows in the viewport render make a large difference to the render.
User Avatar
Member
57 posts
Joined: 12月 2014
Offline
This is an Arnold Shadow Matte material on the grid.
Edited by Tser - 2023年2月6日 05:20:09

Attachments:
ShadowMatteExample.png (934.8 KB)

User Avatar
スタッフ
527 posts
Joined: 5月 2019
Offline
We have a background plate feature that somewhat fits what you're describing (ps: KarmaCPU only)
https://www.sidefx.com/docs/houdini/nodes/lop/backgroundplate.html [www.sidefx.com]
Edited by brians - 2023年2月7日 14:42:58
User Avatar
Member
8034 posts
Joined: 9月 2011
Offline
brians
We have a background plate feature that somewhat fits what you're describing (ps: KarmaCPU only)
https://www.sidefx.com/docs/houdini/nodes/lop/backgroundplate.html [www.sidefx.com]

It sounds like this Arnold shader works a little differently, allowing for 'plateless' background plates by continuing the ray. Is that a possibility in the future of Karma (or possible now with some clever VEX in karma cpu)? When I investigated the background plate lop, it seemed like a lot of the composition stuff happens behind the scenes in Karma, and isn't just part of the shader.
Edited by jsmack - 2023年2月7日 15:46:40
User Avatar
スタッフ
404 posts
Joined: 2月 2008
Offline
Tser
I need this to be done in the beauty pass all at once when I do a render

You can use the Background Plate LOP to do this.
By default it creates the AOVs and composites them with the plate - only in the viewport, leaving a clean Beauty and AOVs so you can put it all back together in comp.
However, you can force an output of the comp straight into the beauty by adding a Render Settings LOP node after the Karma Render Settings LOP, set it to "edit", make sure to set all parms to "Do Nothing" using the "Initialize Parameters" menu, then navigate to Karma > Global > Image and enable the "Use Background" and set it to "On".

There is also a quick setup on the Background Plate LOP to create the COP network to comp the various AOVs back together without baking it all into the beauty.
User Avatar
Member
57 posts
Joined: 12月 2014
Offline
Thanks for the reply npetit, is there any way you could upload a simple scene comprising a Dome light with a hdr texture for lighting, a grid to capture the shadows (but is transparent) and a couple of objects casting shadows to replicate the image that I showed in a previous post.
Your expertise is greatly appreciated.
T.
  • Quick Links