bento Posted November 6, 2015 Share Posted November 6, 2015 Hi, Does anyone have thoughts on how I might be able to access the direct_shadow component on a light by light basis in VEX? I'm using PBR, and need to do some shadow compositing in render rather than in post. I can use the shadowmatte vop to give me a matte to use, but it doesn't appear to allow me to restrict which lights contribute to the matte. My current thinking is to use an illuminance loop with categories, but I'm unsure if/how I can query the lights for shadowing info. Is that data exported from lights, or in PBR is it all lumped into one output by the integrator? (I see the pbrlighting vop exports direct_shadow as one vector...) any ideas? Ben Quote Link to comment Share on other sites More sharing options...
fathom Posted November 6, 2015 Share Posted November 6, 2015 when you say you need to do shadow compositing, what do you mean? inside an illuminance loop, i think you just need to call shadow() to get the light coming thru and invert that to get the amount of shadow (probably should call it with a {1,1,1} light value). Quote Link to comment Share on other sites More sharing options...
bento Posted November 7, 2015 Author Share Posted November 7, 2015 Thanks - shadow() did the job. I'd been skirting around that in my first stab at things, but couldn't quite get my head round its usage. For the record this is doing the job for me (as an inline piped into the Ce of a computelighting): vector shad = {0,0,0}; illuminance(P,N,1,"categories","A") { shad += shadow({1,0,0}); } illuminance(P,N,1,"categories","B") { shad += shadow({0,1,0}); } illuminance(P,N,1,"categories","C") { shad += shadow({0,0,1}); } $out = 1 - shad; All I want it for is generating some shadow mattes so I can 'grade' a backplate projected on to a grid for a turntable setup. Just want to avoid having to do it in comp after the fact. Much better if it can be live. Thanks againBen 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.