paatz04

  • 17 Th10 2024
  • Đã tham gia 12 Th02 2023

    @paatz04 No worries, glad to hear you've figured it out. Thanks for taking the time to share the actual cause of the problem was and what solved it in the end.

    @paatz04 Normally you don't need to clear all slots manually as above for newly set skins, what you normally do is let the SetSlotsToSetupPose call set the slot attachments to null or not according to the setup pose.

    Also see the documentation here (which I assume you're already familiar with):
    http://esotericsoftware.com/spine-api-reference#Skeleton-setSkin

    What does ColorTeam(); do?
    It sounds a bit as if the problem comes from somewhere else than from the code shown above, or can you also reproduce this behaviour with just the lines above, without calling additional methods like ColorTeam();?

    @paatz04 The blue rim light is implemented as follows:
    1) 2D Light Blend Style layers are setup in Example 2D URP Renderer Data.
    Rim is assigned at the red (R) channel of masks.

    2) There is a global Rim Light gameObject with a 2DLight component of blue color, with Blend Style set to Rim (like a layer just an integer set to 1).

    3) The skeleton's material now has a Mask Texture assigned, where the mask's red channel determines how much any 2DLight with Blend Mode Rim is to be applied. In this case, stretchyman-rim-mask is set to white only near the outer edge, where the rim light should be applied. Actually it would work the same with only the R channel being set. The G and B channels of the mask texture have no effect since no 2DLight uses Blend Mode using the G or B channels (and the Example 2D URP Renderer Data does not define anything for G and B channels).

    @paatz04 Unfortunately there is no direct "mask bones from being applied" feature available.

    If you have lots of animations to duplicate (with leg keys removed in the duplicate), you could write a SkeletonDataModifierAsset to be assigned at the SkeletonDataAsset which duplicates certain animations and removes any leg keys from them.

    On the animation side, there might be some tricks available to use IK mix values set to 0.0 or 1.0 to enable and disable parts of your animation, however I think that this will be a rather complicated setup which creates more work than it saves.

    You could also modify the source code to add a masking feature yourself based on name strings, however I'm afraid this would be too much effort as well.

    If anyone knows other solutions or workarounds, please don't hesitate to share your wisdom below! 🙂