PhasmaCeritus Posted December 31, 2010 Share Posted December 31, 2010 (edited) Hi, I was wondering how it would be possible to exclude lights from certain surface calculations in material. for example I have a material where a part of it calculates fake SSS. But in my scene I have couple of light and only one should effect obj's SSS but all of them effects for example diffusion. Is there a way to create something like a light mask in material to make some of them surpass my SSS calculation? Maybe by checking if the ray comes from a certain light since I am rendering with ray-trace? how something like that would look in VEX? One option would be rendering with takes but I was hoping for a single take solution. Thanks Edited December 31, 2010 by PhasmaCeritus Quote Link to comment Share on other sites More sharing options...
Macha Posted January 1, 2011 Share Posted January 1, 2011 I think the light-mask in the illuminance loop can take care of that. You'd have to build it all from scratch though, I think. Quote Link to comment Share on other sites More sharing options...
PhasmaCeritus Posted January 2, 2011 Author Share Posted January 2, 2011 I think the light-mask in the illuminance loop can take care of that. You'd have to build it all from scratch though, I think. Thanks again Marc, I just could not figure-out how to use the illuminance loop.. so if somebody has an example, please share Tanks Quote Link to comment Share on other sites More sharing options...
zbyshek Posted January 8, 2011 Share Posted January 8, 2011 (edited) Thanks again Marc, I just could not figure-out how to use the illuminance loop.. so if somebody has an example, please share Tanks Hi PhasmaCeritus, Perhaps, it will be helpful for you: http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=21332 I have attached a file in the latest post. Where I have presented two models (the illuminance loop and the custom loop through getlights()). The both models have "light masks" and "light categories". You can look at them. Edited January 8, 2011 by zbyshek 1 Quote Link to comment Share on other sites More sharing options...
Macha Posted January 9, 2011 Share Posted January 9, 2011 Cool stuff Alexey. If I may ask, what is that time parameter in your shader network? How does it work? Quote Link to comment Share on other sites More sharing options...
zbyshek Posted January 10, 2011 Share Posted January 10, 2011 (edited) Cool stuff Alexey. If I may ask, what is that time parameter in your shader network? How does it work? Hi Macha, The parameter "Time" in my example is time to calculate of the sampling. That parameter is required for functions sample_light() and shadow_light(). You can find them in the VEX Documentation. If you set the parameter "Use Shading Time" to 0, then the shader will be calculated at time = 0. Perhaps It will helpful if you have a lot of area lights and you will want to use motion blur. Of course, you won't have the motion blur in shadows. But the area light produces the soft shadow and I think that will be imperceptible to the human eye for some cases. If you set the parameter "Use Shading Time" to 1 then the shader will be calculated at time = Time. Also If you need the correct result, you should use "P" or getblurP() (P for time = Time, and getblurP(delta) for time = delta) for an argument "pos" for functions sample_light() and shadow_light(). I have not done this in my example because my example is simple prototype. Edited January 10, 2011 by zbyshek 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.