Jump to content

advanced light linking


Recommended Posts

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 by PhasmaCeritus
Link to comment
Share on other sites

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 by zbyshek
  • Like 1
Link to comment
Share on other sites

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 by zbyshek
  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...