Jump to content

Pixi lights layering


apg
 Share

Recommended Posts

Hi all,

I'm trying to implement pixi lights to my project, but I have some difficulties.

In this example I have the following structure https://www.pixiplayground.com/#/edit/ymGy4TrFm3LswAEKsM8yB:

  1. Grass - no lights
  2. Blue background - lights
  3. Blocks container - some elements have lights, some does not have
  • block1 - has lights, masked with sprite mask
  • block2 - no lights
  • block3 - has lights

The issues I have:

  1. The lighted display objects appear semi-transparent
  2. The brown block (no light) is positioned above the blue background (lighted). However as you can see the blue background is visible over the brown block even though it is positioned underneath.
  3. The brown block (no light) is positioned below the overlapping pink block (lighted). The left half of the pink block is displayed differently compared to the right half.
  4. When it comes to masking lighted objects I should apply mask to each sprite separately, rather than the whole container 

What I want to achieve is:

  1. The blue background to be fully visible and with lights applied (currently is semi-transparent)
  2. There should be no blue background over the brown block, as the block is positioned over the background
  3. The pink block that overlaps the brown one should not have different visuals whether it overlaps the brown one or not (I guess this is related to the semi-transparency above)
  4. Apply a mask to a container rather than each sprite separately (I believe I've met a topic where this is was discussed and it is not possible currently, but wanted to doble check)

I've tried to move the groups order in the stage but with no result.

I'm not sure if all this is possible, but any help will be much appreciated.

Thank you in advance.

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...