PhasmaCeritus Posted February 12, 2011 Share Posted February 12, 2011 Hi, I was wondering if anybody made a material that catches shadows but doesn't cast any (no self shadowing). I am working with ray-traced shadows and ray-traced rendering if that makes any difference. Thanks for ideas! Quote Link to comment Share on other sites More sharing options...
brianburke Posted February 12, 2011 Share Posted February 12, 2011 two ways to do this. the first is to use a normal 'shadow matte' vop and set the 'shadow mask' on your light to exclude the object you don't want to self shadow. the other way is to do it in your shader with isshadowray() switching the opacity of the object off for shadows. here's what that looks like: 3 Quote Link to comment Share on other sites More sharing options...
PhasmaCeritus Posted February 13, 2011 Author Share Posted February 13, 2011 Dude, you'r awesome Thanks! two ways to do this. the first is to use a normal 'shadow matte' vop and set the 'shadow mask' on your light to exclude the object you don't want to self shadow. the other way is to do it in your shader with isshadowray() switching the opacity of the object off for shadows. here's what that looks like: Quote Link to comment Share on other sites More sharing options...
dickagm Posted April 26, 2014 Share Posted April 26, 2014 (edited) Hi guys, By using the "isshadowray" solution the object stops casting shadows over the other objects as well. Is that what it actually does or I'm messing something? How to turn off only the self shadow but keep cast shadows over the other objects? I want to render pyro smoke that's occluded by mate object which cast shadows over the smoke. That's fine. Now I want to output a render pass (mantra image plane) that contains only the smoke's shadow cast over the matte object. I need both yellow frames to render at once not by using takes or any technique that needs to execute a second render. Thanks! Edited April 26, 2014 by dickagm Quote Link to comment Share on other sites More sharing options...
Guest tar Posted April 26, 2014 Share Posted April 26, 2014 (edited) Try; Uncheck 'Enable Shadows' on: /shop/mantrasurface/surfaceModel/computelighting1/pbrlighting1 SelfShadowPhantom.hip Edited April 26, 2014 by tar Quote Link to comment Share on other sites More sharing options...
dickagm Posted April 27, 2014 Share Posted April 27, 2014 Thanks for the reply and the hip file Marty! That's a nice trick to control the self shadows with mantra surface, in my opinion that attribute should be exposed at upper user control level in to the mantra surface gui because it should have a common use in a complex compositing situations unfortunately the matte shadow node is still outputting with the self shadows included. How can I combine the use of this trick with the use of matte_shadow node? For now what I have achieved that's looking very close to what I need is the use of "isshadowray" combined with the matte_shadow node, unfortunately it completely stops the shadows casting of the object. What I need so far is to stop somehow only the self shadows of the "matte_shadow" node, because I'm outputting my shadow pass using this node, I'll appreciate any additional workarounds of this issue. Thanks! Quote Link to comment Share on other sites More sharing options...
Guest tar Posted April 27, 2014 Share Posted April 27, 2014 (edited) Is it possible to upload a very simple file showing what you want? Using the unchecked Enable Shadows and in Mantra using the 'direct_shadow' Vex Variable works for outputting a shadow pass without self-shadow. Thanks! SelfShadowPhantom2.hip Edited April 27, 2014 by tar Quote Link to comment Share on other sites More sharing options...
dickagm Posted April 29, 2014 Share Posted April 29, 2014 Hi Marty, Here is the scene. There's a simple smoke sim and there are 3 takes: main - where everything is visible (to get sense of the scene) take1 - is where my beauty pass is exactly as I wanted (the smoke is cut by the matte object and have received shadow cast from the mate object as well) but the SHADOW_MATTE pass contains the self shadows of the matte object (which is the thing I don't want ) take2 - is where the beauty pass have loosed the shadow cast from the matte object (by use of isshadowray with the matteshadow nodes), but on cost of that the MATTE_SHADOW pass now contains only the smoke shadow cast over the matte object which is the exact thing I want from this pass so I want to have in one render the beauty result from take1 (smoke, cut by matte object, recieve shadows from same matte object) and shadow_matte result from take2 ( only the smoke's shadow cast over the matte object ). Really appreciate your help Marty! Thanks! matte_shadow_test.hipnc Quote Link to comment Share on other sites More sharing options...
dickagm Posted May 6, 2014 Share Posted May 6, 2014 After some more try outs it looks like there's no way to turn off the self shadow of a matteshadow shader? Is that possible if I write my own VEX shader for mantra, if so I'll appreciate any tips about the variable I'll have to play with to control the shadows? I have old memories about mental ray shader that can separate the individual ray components like, primary rays, secondary rays, reflection rays, shadow rays and so on... which makes possible to tell the shader what to do with the shadow rays only or the ones you need. It was used mainly to control the sampling behind transparent objects like glass windows but I guess the same concept will be applicable to the matteshadow shader that I need. The issshadowray node looks like the rayswitcher I'm talking above, so I only need a way to check the object's id at rendertime and if the shadow ray that is cast over certain object is caused by the same object then to dismiss it. Thanks! Quote Link to comment Share on other sites More sharing options...
afandina Posted January 21, 2015 Share Posted January 21, 2015 I think this link may help: http://houdini.dreamerzstudio.net/?page_id=187 1 Quote Link to comment Share on other sites More sharing options...
WLVL Posted November 13, 2015 Share Posted November 13, 2015 (edited) Hi all! Did anyone solve the problem? thank you Edit: using what afandina suggested actually works (be sure to exclude the object you don't want selfshadow from the light shadow mask) selfshadow.hipnc Edited November 13, 2015 by WLVL Quote Link to comment Share on other sites More sharing options...
WLVL Posted September 20, 2019 Share Posted September 20, 2019 updating this example scene file to latest houdini version. shadow_catcher.hip 1 Quote Link to comment Share on other sites More sharing options...
WLVL Posted April 3, 2020 Share Posted April 3, 2020 I have realized that the above mentioned technique does not work for shadows that should be occluded from the shadow catcher. I have updated the hipfile to simulated this scenario. Image attached: all elements, shadow caster (green cubes), shadow caster shadows (red), shadow catcher (set, grid and big yellow cube) and the overlay of the shadow pass onto the set. As you can see the highlighted shadow is not correct, the shadow catcher (the set) should have "blocked" that shadow from happening. Any workarounds or totally different approach please? Thanks. shadow_catcher_v010.hip 1 Quote Link to comment Share on other sites More sharing options...
WLVL Posted April 6, 2020 Share Posted April 6, 2020 a clarification: this is happening because of the technique used. The shadow catcher is excluded from the shadow mask parm of the key light in order to prevent self shadowing. By doing this though the shadow catcher will not be consider as an occluder of the lightsource, hence letting the shadow from the caster drop multiple times on the catcher. 1 Quote Link to comment Share on other sites More sharing options...
WLVL Posted May 18, 2020 Share Posted May 18, 2020 Solved it! Just generate a shadow_catcher_shadow pass (Mantra: extra image planes / direct shadows, 1 light rays, reflection limit zero (no bounces) ) Multiply the inverse of it with the shadow_caster_shadow (red). Use the result as shadow pass. I will provide an updated hip file with example as soon as I have the chance. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.