Page 1 of 1

Light Attenuation!!!

PostPosted: Sun Mar 25, 2018 7:15 pm
by tareq.abdnabi
can anyone explain how the Light Attenuation is really work?? like give a small tutorial about it ,because i cant get how it is work even after reading the documentation & try it in editor didn't work , I'm trying to create shader can cast shadows on transparent surface by capture the lighting & shadows from the Light Attenuation node ,but when i try do it for testing purpose like what i founded in the documentation exacatily NOT WORKKING!!! :?

Re: Light Attenuation!!!

PostPosted: Mon Mar 26, 2018 10:25 am
by Amplify_Borba
Hello, thank you for getting in touch and for your support!

Have you had the chance to check the node page for the Light Attenuation node? It provides information regarding the node and an example setup.

There are two samples that make use of that node, the CustomLightingToon and UVLight, which you may also examine.

We are also working on a tutorial that covers a few custom lighting related topics, I'll be sure to let you know as soon as it has been released.

Please let me know if the above information helps, thanks!

Re: Light Attenuation!!!

PostPosted: Mon Mar 26, 2018 4:01 pm
by tareq.abdnabi
thanks for replay, the issue was from node link to emission not for custom lighting like what i found in sample scene.

this what i found in http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Light_Attenuation Node link :

Image

but still i cant figure out how to capture shadows on the shader and turn them to UV or texture !! for using them as opacity mask

Re: Light Attenuation!!!

PostPosted: Mon Mar 26, 2018 5:07 pm
by Amplify_Borba
Attenuation is basically a texture fetch in case of point/spot lights which uses a range falloff, and unfortunately our documentations is somewhat outdated, so you have to connect it to the Custom Light port.

It might not be possible to access the information you want, could you elaborate any further on the type of effect you want to create?
Providing a screenshot of your current setup and also a screenshot or reference of the intended visual effect would provide us more insight in how to best help you, thanks!

Re: Light Attenuation!!!

PostPosted: Tue Mar 27, 2018 12:23 pm
by tareq.abdnabi
what i try to do is masking shadows , and trying to convert to output data from light attenuation & light color multiply as UV texture data

Re: Light Attenuation!!!

PostPosted: Tue Mar 27, 2018 2:48 pm
by Amplify_Borba
Thank you for providing additional details!

I'm not quite sure if we can suggest a solution for that specific request, since shaders with transparency are not contemplated by the shadow pass, because their depth is not written to the depth buffer.

While you can still get some data out of the Light Attenuation node that can be used in the outputs, its result will have no attenuation since that information relies on the depth, which is an expected problem when dealing with transparent shaders as they have no concept of depth.

Apologies for not being able to provide further assistance in regards to this situation, please let me know if you have any further questions.

Re: Light Attenuation!!!

PostPosted: Thu Mar 21, 2019 9:43 am
by bigbenmatt
Hi Sorry to hijack this thread but is there custom lighting support for the LWSRP templates. I'm trying to do a similar thing. Well specifically the half lambert bounce light trick a la INSIDE :)

Any info on this would be greatly appreciated!

Re: Light Attenuation!!!

PostPosted: Thu Mar 21, 2019 10:34 am
by Amplify_Borba
Hello, no problem at all!

You may use our Lighting nodes in both the HD and LW unlit templates to create your own custom lighting, but you might have to tweak the templates themselves depending on what you intend to create.