• RuntimesUnity
  • Skeleton lit not working properly. Some parts does not recive light.

Hello, i wanted to try skeleton-lit shader in a simple scene but i couldn't make it work properly.


It's just a simple point light and dragon. But wings of the dragon does not receive light.
Editor version 2021.3.12.f1
I also tried vertexlit and pixellit shader.

I assume this happens because dragon is using multiple material.
Could someone help me understand?

Related Discussions
...

@Hilmi Could you please check whether you've adjusted only a single material of the many skeleton materials in the skeleton's project folder? Note that there might be only 2 materials displayed at any time of the e.g. 6 materials in the folder, according to the currently visible attachment images at the current animation frame.

    Hello Harald , I'm aware a skeleton can use multiple material and I changed all of the materials to skeleton lit.

    I think this is related to normals.

      Hilmi I think this is related to normals.

      No, SkeletonLit uses a fixed normal in the shader which is independent of the vertex data.

      We could just reproduce the issue you are seeing:
      The problem turns out to be due to the vertex-lit nature of the SkeletonLit shader, combined with a very large attachment image, being lit by a spot- or point light in your scene.

      So to fix the issue, either of the following needs to be changed:

      • a) Lighting,
      • b) The used shader (a pixel-lit shader, like Spine/Sprite/Pixel Lit or any of the URP shaders if you are willing to switch the render pipeline) or
      • c) The attachment geometry (adding more vertices, turning the RegionAttachment into a MeshAttachment).