Luis Morao

I've bought spine and exported a Spine project and loaded it in godot.
So far the models can be loaded, but changing the light mast on the SpineSprite doesn't do anything.

I am not using the 1st light mask, but instead the 3rd. I've changed that. In the editor all this shows up, but on the game itself, the SpineSprite.light_mask does not seem to make any difference and the spine sprites are all black.

On the attached images, the first one is inside the game, we see the huge dark silhouetes of the feet that are not being illuminated by the Light nodes.
The second image shows the legs of the SpineSprite, with the light_mask set to the third that had no effect to get the image illuminated in game.

Am I changing the light_mask on the wrong node? I didn't see anywhere else to change this on.

---

As a note, if I do change my light nodes to add layer 1, the SpineSprite shows illuminated in the game _even if it is not on light mask 1_. I don't see anywhere else to change the light_mask on the editor.
You do not have the required permissions to view the files attached to this post.
Luis Morao
  • Posts: 3

Mario

Could you post a small project that reproduces the issue?
User avatar
Mario

Mario
  • Posts: 3283

Luis Morao

Hi Mario,

Here's a reproduction https://github.com/lmorao/light_mask_spine_reproduction
It is a remake of the "examples/01-helloworld/" from spine-godot repo.

- 1st scene/screenshot. Light is on layer2
file: helloworld.tscn
Main scene where we have the light on the second layer, and then a group of sprites on the first layer and second layer.
We see that the Spineboy on the second layer is not being lighted up, when I expect it to.

- 2nd scene/screenshot. Light is on layer1
file: helloworld_not_good_assumptions.tscn
I created another scene where I changed the light to be on layer 1, there we can see that both the SpineSprites are light up, even the one on layer 2 that should not be lighted up.

I added a Godot Sprite on each of the layer groups for us to see what is the expected result in the two scenes.

Thanks.

PS.: I'll point that the SpineSprite>Visibility>Light Mask, what it seems to be changing is the bone visibility. We can see that in the first screenshot below, the yellow bones on the second spineboy are showing yellow. It should also be changing the visibility of the sprite images attached to the bones, but it is not.

---

I'll attach some screenshots of both scenes.
You do not have the required permissions to view the files attached to this post.
Luis Morao
  • Posts: 3

Mario

Thank you for this excellent bug repro and description! I've opened an issue here which you can follow. I had a quick look and my suspicion is that the light masks are not working because we are generating Mesh2DInstances under the hood for the attachments (images and meshes) of the skeleton. When you set the light mask on the sprite, that information is not passed down to the mesh instances. I need to find a way to get a notification in case the light mask on the sprite changed so I can "forward" it to the underlying mesh instances as well.
User avatar
Mario

Mario
  • Posts: 3283

Mario

This has now been fixed in the 4.1 and 4.2-beta branches. New editor binaries are being build at the moment. Thanks for reporting!
User avatar
Mario

Mario
  • Posts: 3283


Return to Runtimes