mcarriere

  • Sep 21, 2017
  • Joined Aug 15, 2013
  • Thanks, I had a few more speedbumps, but was able to resolve this. When selecting a straight Unlit Transparent shader, our character had several missing parts due to our artist scaling things negatively to flip them (after a bit of searching this seems to be advertised to be in the editor, but I can't find it for the life of me).

    Either way, if anyone else runs into this issue, and wants a Straight Alpha Shader, I've made what seems to be the necessary one-line edit to the Spine Skeleton shader to provide that:

    Shader "Spine/Skeleton (Straight)" {
     Properties {
         _Cutoff ("Shadow alpha cutoff", Range(0,1)) = 0.1
         [NoScaleOffset] _MainTex ("Main Texture", 2D) = "black" {}
     }
    
     SubShader {
         Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
    
     Fog { Mode Off }
     Cull Off
     ZWrite Off
     Blend SrcAlpha OneMinusSrcAlpha
     Lighting Off
    
     Pass {
         Fog { Mode Off }
         ColorMaterial AmbientAndDiffuse
         SetTexture [_MainTex] {
             Combine texture * primary
         }
     }
    
     Pass {
         Name "Caster"
         Tags { "LightMode"="ShadowCaster" }
         Offset 1, 1
         ZWrite On
         ZTest LEqual
    
         Fog { Mode Off }
         Cull Off
         Lighting Off
    
         CGPROGRAM
         #pragma vertex vert
         #pragma fragment frag
         #pragma multi_compile_shadowcaster
         #pragma fragmentoption ARB_precision_hint_fastest
         #include "UnityCG.cginc"
         sampler2D _MainTex;
         fixed _Cutoff;
    
         struct v2f { 
             V2F_SHADOW_CASTER;
             float2  uv : TEXCOORD1;
         };
    
         v2f vert (appdata_base v) {
             v2f o;
             TRANSFER_SHADOW_CASTER(o)
             o.uv = v.texcoord;
             return o;
         }
    
         float4 frag (v2f i) : COLOR {
             fixed4 texcol = tex2D(_MainTex, i.uv);
             clip(texcol.a - _Cutoff);
             SHADOW_CASTER_FRAGMENT(i)
         }
         ENDCG
     }
     }
    
     SubShader {
         Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
    
     Cull Off
     ZWrite Off
     Blend One OneMinusSrcAlpha
     Lighting Off
    
     Pass {
         ColorMaterial AmbientAndDiffuse
         SetTexture [_MainTex] {
             Combine texture * primary DOUBLE, texture * primary
         }
     }
     }
    }
    
    
  • I've been banging my head against this problem for some time now too


    and it turned out that it was because we are also in Linear colorspace for a separate part of our project.

    When you mention "Straight Alpha Blend Mode"


    are you talking about a different shader? Exporting without PMA? I can't seem to find any option on the skeleton or shader list that suggests this.

  • We have a character in our game that has a mask with a few slots on it, along with the rest of the skeleton for said character. We plan on doing some mesh deformations and animations on the mask, so it's important that it's all part of the same spine project and not separated or hooked up at runtime.

    We would like the mask and the rest of the body to have two different shaders.

    My plan was to create a submesh for the mask, and apply a separate material for that mesh, rather than using the CustomSlotMaterial for all the given slots being used for the mask. Are there any issues with this approach that I should be considering?

    Also, I'm sure I'll find this out when we try, but I'll preemptively ask anyway: will setting a material of a submesh be overwritten by the runtime?

  • Two more to add, after combing through the Runtime Docs

    http://esotericsoftware.com/spine-using-runtimes#Mixing-animations

    Animation mix is similar to apply, accept instead of

    (probably meant "except")

    Multiple cases in the pseudocode where "*" is used, but it seems like "//" should have been used for single line / inline comments:
    http://esotericsoftware.com/spine-using-runtimes#Applying-animations
    http://esotericsoftware.com/spine-using-runtimes#Mixing-animations
    http://esotericsoftware.com/spine-using-runtimes#AnimationState

    (Searching for "*" on the runtime docs will help find all of them.)

  • A few days ago, I sat down and read through the entire user guide. It's put together fantastically, great job on that. During my read-through, I found a few typos or small things that may have changed over time that you may want to resolve.

    http://esotericsoftware.com/spine-basic-concepts#Slots
    The slots in the text are not in the image shown. This lead me to be a bit confused to start.

    http://esotericsoftware.com/spine-tools

    Right clicking anyway in the editor area will toggle between the current tool and the last selected tool.

    (probably meant "anywhere")

    http://esotericsoftware.com/spine-tools
    "spine weights" view link is invalid, should probably be http://esotericsoftware.com/spine-weights

    http://esotericsoftware.com/spine-key-frames
    "IK Constraints" link seems incorrect.

    http://esotericsoftware.com/spine-dopesheet#Timeline-position

    A frame can number ban be typed

    (probably meant "A frame number can be typed")

    http://esotericsoftware.com/spine-weights#Weights-tool

    It is almost always more intuitive to adjust weights only be adding influence.

    (probably meant "only by", but not sure, really.)

    Hope this helps. I think the only thing that could use a bunch more content is the IK section, preferably with a few GIFs to show different use-cases and benefits of them. After playing with a bunch of examples and videos watched, I still feel like I'm missing a bunch of important information on when/how to use that system past the basics of foot placement for uneven grounds, and perhaps hand placement for weapons.

  • Hi Pharan,

    I recently was trying to ramp myself up to spine, and went through the entire user guide. While reading all of it, I came across a few typos and other small issues, but don't know where to send it/post it.

    Where should I send my notes?

    • Michael
  • Is it possible for multiple users to be working within the same spine project, and merging the changes to the project in via version control? I'm curious if two people in my company can be working on the same spine project for adding animations to a particular model at once safely.

  • On my dual monitor setup, I usually have my left monitor be landscape, and my right screen be portrait. Works wonders for coding.

    Just noticed that double clicking the title bar, and clicking "Maximize" incorrectly size the window when I have Spine in the portrait monitor. Clicking on "Fullscreen" does work properly, however.

    Lastly, on Windows 7, I cannot drag the window to an edge of the screen to resize it. I realize this might be due to some of the cross-platform stuff you're doing.

    Since there's workarounds for all of this, no big deal, but I figured I'd mention them. 🙂