shadow capture

   1654   0   2
User Avatar
Member
168 posts
Joined:
Offline
I am continuing investigation Houdini for a lighting purposes. This time a Shadow capture.
My goal is to capture shadow from a sphere onto the grid and from grid onto the sphere, but without grid SELF shadow contribution.

So this is a base object (8x8 pixel samples, 2 diffuse bounces):


So with Mantra, if we had to capture shadows for compositing, we would use “shadowmate” shader to store shadows within a separate rendered image on alpha channel:

This approach was annoying as it required separate material settings for an object - potentially set via Take or later introduced StyleSheets.
Also it did not took in consideration any diffuse bounces - it is just shadow or not shadow option.
So that way will definitely not work.

I could use “ShadowMask” on the light and disable ground - but that will also disable shadows casted onto the sphere - which is not a good solution:


With introduced ‘Render Visibility’ option we could choose “shadow” or “primary” or “secondary” rays for a specific object but that did not solve any need for a shadow pass.

With LPE and AOV passes, we could “ask” for “indirect_shadow” and “direct_shadow”:

I am getting some broken indirect shadow pass, but I am unable to choose where that shadow comes from.

Maybe there is more advanced LPE expression that could solve this issue for me ?

Now, lets switch to Karma (pixel samples 256 and diffuse bounces set to 2):

I'm getting different diffuse bounce effect than mantra, but ok, it's a different render. Just worried that look is much worse than mantra, that's all

Now lets set up shadow catcher.. We won't go with shadowmate as we have seen it's not going to work properly with diffuse bounces, so maybe LPEs or AOVs ?
To be honest, I am not even sure where to start as I don't see anything that would guide me towards shadow catching settings here:



Maybe someone of you have a good, tested workflow?
I know, i could probaby render some elements separately - one with sphere shadow and second with ground as phantom, shadowing sphere then put them together in Nuke - But this is my point - with such basic lighting manipulations we are looking for something more efficient that does not require lots of work in 3rd party applications.
Edited by tmdag - Oct. 15, 2020 14:03:50

Attachments:
base.jpg (257.3 KB)
base.hipnc (325.4 KB)
shadowMatte_alpha.jpg (23.4 KB)
shadow_matte.hipnc (325.4 KB)
shadowAOV_indirect.jpg (103.5 KB)
shadowAOV.hipnc (327.4 KB)
maskLight.jpg (163.5 KB)
shadow_masklight.hipnc (328.7 KB)
karma_base.jpg (146.2 KB)
karma_base.hipnc (495.9 KB)
karmaAOV.png (91.5 KB)

Albert
  • Quick Links