Jump to content

Lights / LUT's / Sprites


Torsin
 Share

Recommended Posts

Hello once again, I have another issue that I'm trying to resolve relating to lights. I'm using LUT's for the day and night cycle which work perfectly. I'm trying to add lights on a different layer/group and mix with a shader. This seems to work fine as well, when I cycle to the day time the light dims and disappears but the sprite light in the left window of the house that just doesn't seem to be bright enough at night. I suspect it's the way I mix the colors with the shader but I may be completely off. Ideas?

I made a demo for your troubleshooting convenience.

https://www.pixiplayground.com/#/edit/z0K8eqYopE_Nwq9c21vvX

Link to comment
Share on other sites

I actually had no issue with the demo and simply reused your existing light, and made sure it was a decent size in order to represent through. I think You can do something here to help tho. Add another light with a bloom filter in the same location as your lights. This can create a "glowing" effect.

I recommend you always use WHITE lights to punch through the LUT, and then use another light PNG for adding color

I'm not too precise here but using a few different layers to achieve the lighting image.png.990be6bc4a4b0a1f65165ca55cc016e1.png

Updated pen: https://www.pixiplayground.com/#/edit/tvaxCJBzSAe-tTsHetMvG

 

Edited by Jammy
Link to comment
Share on other sites

12 hours ago, ivan.popelyshev said:

It has partial transparency. If you apply LUT to layer that has partial transparency, yuo'll get wrong result because you dont unpremultiply alpha. 

http://www.adriancourreges.com/blog/2017/05/09/beware-of-transparent-pixels/

Ah yes! I had a sneaky suspicion it was related to that! I had started down that path a few days ago and just decided to ask here before going to far. Thanks for the information.

Link to comment
Share on other sites

10 hours ago, Jammy said:

I actually had no issue with the demo and simply reused your existing light, and made sure it was a decent size in order to represent through. I think You can do something here to help tho. Add another light with a bloom filter in the same location as your lights. This can create a "glowing" effect.

I recommend you always use WHITE lights to punch through the LUT, and then use another light PNG for adding color

 

Thanks Jammy, I will play some more with the layers and use a white light to punch through the LUT as you mentioned and add color via another. Glad to have some new paths to follow, was getting stuck and was running out of ideas. :)

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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...